-> Define variables
<?xdoxslt:set_variable($_XDOCTX, 'PaymentTotalVar',
0)?>
<?xdoxslt:set_variable($_XDOCTX, 'ReceiptTotalVar',
0)?>
-> assign some value to variables
-> Using Arrays
setting arrays [key, value] key has to be a number
<?xdoxslt:set_array($_XDOCTX,
‘NetPay’, 2, xdoxslt:get_variable($_XDOCTX, 'PaymentTotalVar'))?>
getting values
<?xdoxslt:get_array($_XDOCTX,
‘NetPay’, 1)?>
<?xdoxslt:get_array($_XDOCTX,
‘NetPay’, 2)?>
-> Calculation
use in rtf tags [subtraction of values]
<?xdoxslt:get_array($_XDOCTX, ‘NetPay’, 2) -xdoxslt:get_array($_XDOCTX, ‘NetPay’, 1)?>
No comments:
Post a Comment