{assign var=totalSell value=0}
{assign var=i value=0}
{foreach $revenues as $item}
| {$item->layingOrder} |
{for $foo = 0 to $item->notes step=1}
{/for}
{$item->customName}
|
{if $item->theValue != 0}
{$item->theValue}
{assign var=totalSell value=$totalSell+$item->theValue}
{/if}
|
{assign var=i value=$i+1}
{/foreach}
|
اجمالى المبيعات
|
{$totalSell}
|
{assign var=allowedDiscountVal value=0}
{assign var=i value=0}
{foreach $allowedDiscount as $item}
| ({$item->layingOrder}) |
{for $foo = 0 to $item->notes step=1}
{/for}
{$item->customName}
|
{$item->theValue}
{assign var=allowedDiscountVal value=$item->theValue}
|
{assign var=i value=$i+1}
{/foreach}
|
صافى المبيعات
|
{assign var=netSell value=$totalSell-$allowedDiscountVal}
{$netSell}
|
{assign var=totalCost value=0}
{assign var=i value=0}
{foreach $WorkingCost as $item}
| {$item->layingOrder} |
{for $foo = 0 to $item->notes step=1}
{/for}
{$item->customName}
|
{$item->theValue}
{assign var=totalCost value=$totalCost + $item->theValue}
|
{assign var=i value=$i+1}
{/foreach}
{assign var=i value=0}
{foreach $workingExpenses as $item}
| {$item->layingOrder} |
{for $foo = 0 to $item->notes step=1}
{/for}
{$item->customName}
|
{$item->theValue}
{assign var=totalCost value=$totalCost + $item->theValue}
|
{assign var=i value=$i+1}
{/foreach}
|
اجمالى التكلفة
|
{$totalCost}
|
|
مجمل الربح
|
{assign var=totalProfit value=$netSell - $totalCost}
{$totalProfit}
|
{assign var=totalgeneralAndManegeralExpenses value=0}
{assign var=i value=0}
{foreach $generalAndManegeralExpenses as $item}
| ({$item->layingOrder}) |
{for $foo = 0 to $item->notes step=1}
{/for}
{$item->customName}
|
{$item->theValue}
{assign var=totalgeneralAndManegeralExpenses value=$totalgeneralAndManegeralExpenses + $item->theValue}
|
{assign var=i value=$i+1}
{/foreach}
{assign var=totalOtherRevenu value=0}
{assign var=i value=0}
{foreach $otherRevenues as $item}
| {$item->layingOrder} |
{for $foo = 0 to $item->notes step=1}
{/for}
{$item->customName}
|
{$item->theValue}
{assign var=totalOtherRevenu value=$totalOtherRevenu + $item->theValue}
|
{assign var=i value=$i+1}
{/foreach}
{assign var=netProfitLoss value=($totalProfit + $totalOtherRevenu - $totalgeneralAndManegeralExpenses)}
= 0}style="background-color: #76c7c0;"{else}style="background-color: #ef9a9a;"{/if}>
|
صافى
{if $netProfitLoss >= 0}
الربح
{else}
الخسارة
{/if}
|
{abs($netProfitLoss)}
|