Kaskus

Tech

yuyu2309Avatar border
TS
yuyu2309
Urgent : yg ngerti XML mohon bantuannya donk..:(
]ane ada tugas buat ngubah template di mesin cash register, tapi ane mentok di setting Tax n servicenya gan..tolong kl ada yg ngerti kodingannya, ane mohon banget bantuannya...
ini source code'a gan.. :


{if order.split_payments}
{eval}
splitPayments=[];
for (tp in order.trans_payments) {
splitPayments.push( order.trans_payments[tp].amount);
}
{/eval}
{else}
{eval}
splitPayments=[order.payment_subtotal];
{/eval}
{/if}
{for receivePayment in splitPayments}
[&INIT]
{if duplicate}
[&DWON]${'Bill Copy'|center:21}[&DWOFF]
{/if}
[&QSON]${store.name|center:21}[&QSOFF]
${store.address1|center:40}
${store.address2|center:40}
${store.telephone1|center:40}
${'Opened:'|left:10}${(new Date(order.created * 1000)).toLocaleFormat('%Y-%m-%d %H:%M:%S')}
${'Printed:'|left:10}${(new Date()).toLocaleFormat('%Y-%m-%d %H:%M:%S')}
${'Terminal:'|left:10}${order.terminal_no|left:10} ${'Clerk:'|left:6}${order.proceeds_clerk_displayname|left:15}
${'Seq:'|left:6} ${order.seq|tail:4}
------------------------------------------
{for item in order.items_summary}
${item.qty_subtotal|right:3} X ${item.name|left:20}${item.subtotal|viviFormatPrices:true|right:10}
{if item.discount_subtotal != 0}${item.discount_subtotal|viviFormatPrices:true|right:10}
{/if}
{if item.surcharge_subtotal != 0}${'+' + item.surcharge_subtotal|viviFormatPrices:true|right:10}
{/if}
{/for}
------------------------------------------
{if order.trans_discount_subtotal != 0} ${'Order Discount:'|left:25} ${order.trans_discount_subtotal|viviFormatPrices:true|right:10}
{/if}
{if order.trans_surcharge_subtotal != 0} ${'Order Surcharge:'|left:25} ${order.trans_surcharge_subtotal|viviFormatPrices:true|right:10}
{/if}
{if order.revalue_subtotal != 0} ${'Order Revalue:'|left:25} ${order.revalue_subtotal|viviFormatPrices:true|right:10}
{/if}
{if order.promotion_subtotal != 0} ${'Promotion:'|left:25} ${order.promotion_subtotal|viviFormatPrices:true|right:10}
{/if}
${'Subtotal:'|left:25} ${(order.total - order.tax_subtotal - order.service_charge_subtotal)|viviFormatPrices:true|right:10}
${'Service:'|left:25}${order.service_charge_subtotal|viviFormatPrices:true|right:10}
${'Tax&Service:'|left:25} ${order.tax_subtotal|viviFormatTaxes:true|right:10}
${'Total:'|left:25} ${order.total|viviFormatPrices:true|right:10}
[&CR]
{for payment in order.trans_payments}
{if payment.name == 'cash'}
${'Cash:'|left:25} ${payment.amount|viviFormatPrices:true|right:17}
{else}
${payment.memo1 + ':'|left:15} ${payment.amount|viviFormatPrices:true|right:27}
{/if}
{/for}
[&CR]
${'Received:'|left:15} ${receivePayment|viviFormatPrices:true|right:25}
{if order.remain > 0}
${'BALANCE:'|left:15} ${order.remain|viviFormatPrices:true|right:25}
{else}
${'CHANGE:'|left:15} ${(0 - order.remain)|viviFormatPrices:true|right:25}
{/if}
------------------------------------------
[&CR]
[&RESET]
[&CR]
[&CR]
[&CR]
[&CR]
[&PC]
[&CR]
[&CR]
[&CR]
{/for}
Diubah oleh yuyu2309 11-03-2013 11:43
0
779
7
GuestAvatar border
Komentar yang asik ya
Mari bergabung, dapatkan informasi dan teman baru!
Programmer Forum
Programmer Forum
KASKUS Official
20.2KThread5KAnggota
Urutkan
Terlama
GuestAvatar border
Komentar yang asik ya
Ikuti KASKUS di
© 2026 KASKUS, PT Darta Media Indonesia. All rights reserved.