{if $shape == 0} {assign var=debtorByNature value=$lastDebtVal} {assign var=cerditorByNature value=$lastCreditVal} {assign var=lastid value=0} {foreach $allDailyEntery as $dailyEntery} {if $dailyEntery->id !=""} {assign var=lastid value=$dailyEntery->id} {if $dailyEntery->reverseofid != 0 && $dailyEntery->reverseofid != -10}