X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep210.php;h=27d56cd704a3ad7f51053bda7a44b284f37b04c4;hb=d1b959c4b73664327c2e17d5bb3fb515aabfa449;hp=1a99195e06e732545999fc611868daa45b36f487;hpb=08e465dd87f4929fcd07ba944c4451bc3437f2b3;p=fa-stable.git diff --git a/reporting/rep210.php b/reporting/rep210.php index 1a99195e..27d56cd7 100644 --- a/reporting/rep210.php +++ b/reporting/rep210.php @@ -90,7 +90,7 @@ function print_remittances() if ($email == 0) { - $rep = new FrontReport(_('PURCHASE ORDER'), "PurchaseOrderBulk", user_pagesize()); + $rep = new FrontReport(_('REMITTANCE'), "RemittanceBulk", user_pagesize()); $rep->currency = $cur; $rep->Font(); $rep->Info($params, $cols, null, $aligns); @@ -98,7 +98,11 @@ function print_remittances() for ($i = $fno[0]; $i <= $tno[0]; $i++) { - for ($j = ST_BANKPAYMENT; $j <= ST_SUPPAYMENT; $j = ($j == ST_BANKPAYMENT ? ST_SUPPAYMENT : 999)) + if ($fno[0] == $tno[0]) + $types = array($fno[1]); + else + $types = array(ST_BANKPAYMENT, ST_SUPPAYMENT, ST_SUPPCREDIT); + foreach ($types as $j) { $myrow = get_remittance($j, $i); if (!$myrow) @@ -120,7 +124,21 @@ function print_remittances() $rep->Header2($myrow, null, $myrow, $baccount, ST_SUPPAYMENT); $result = get_allocations_for_remittance($myrow['supplier_id'], $myrow['type'], $myrow['trans_no']); + $linetype = true; + $doctype = ST_SUPPAYMENT; + if ($rep->currency != $myrow['curr_code']) + { + include($path_to_root . "/reporting/includes/doctext2.inc"); + } + else + { + include($path_to_root . "/reporting/includes/doctext.inc"); + } + $total_allocated = 0; + $rep->TextCol(0, 4, $doc_Towards, -2); + $rep->NewLine(2); + while ($myrow2=db_fetch($result)) { $rep->TextCol(0, 1, $systypes_array[$myrow2['type']], -2); @@ -138,16 +156,6 @@ function print_remittances() } $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight); - $linetype = true; - $doctype = ST_SUPPAYMENT; - if ($rep->currency != $myrow['curr_code']) - { - include($path_to_root . "/reporting/includes/doctext2.inc"); - } - else - { - include($path_to_root . "/reporting/includes/doctext.inc"); - } $rep->TextCol(3, 6, $doc_Total_Allocated, -2); $rep->AmountCol(6, 7, $total_allocated, $dec, -2); @@ -159,6 +167,12 @@ function print_remittances() $rep->Font('bold'); $rep->TextCol(3, 6, $doc_Total_Payment, - 2); $rep->AmountCol(6, 7, $myrow['Total'], $dec, -2); + $words = price_in_words($myrow['Total'], ST_SUPPAYMENT); + if ($words != "") + { + $rep->NewLine(2); + $rep->TextCol(1, 7, $myrow['curr_code'] . ": " . $words, - 2); + } $rep->Font(); if ($email == 1) {