X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fallocations%2Fcustomer_allocate.php;h=0360329551f04bbff3289274a87f6c4d0649d567;hb=7d9fe15f85c15572535c5fa4555b9a72e9d93f04;hp=d92cf39a1c562568a29c5a94aebe3ddf8fd4af76;hpb=c09be0dad6b05131e240349a375af7a4b7bf3444;p=fa-stable.git diff --git a/sales/allocations/customer_allocate.php b/sales/allocations/customer_allocate.php index d92cf39a..03603295 100644 --- a/sales/allocations/customer_allocate.php +++ b/sales/allocations/customer_allocate.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $path_to_root="../.."; $page_security = 3; @@ -54,7 +63,7 @@ function check_data() /*Now check to see that the AllocAmt is no greater than the amount left to be allocated against the transaction under review */ - if (input_num('amount' . $counter) > $_POST['un_allocated' . $counter]) + if (input_num('amount' . $counter) > input_num('un_allocated' . $counter)) { //$_POST['amount' . $counter] = $_POST['un_allocated' . $counter]; } @@ -82,7 +91,7 @@ function handle_process() begin_transaction(); // clear all the allocations for this payment/credit - clear_cust_alloctions($_SESSION['alloc']->type, $_SESSION['alloc']->trans_no); + clear_cust_alloctions($_SESSION['alloc']->type, $_SESSION['alloc']->trans_no, $_SESSION['alloc']->date_); // now add the new allocations $total_allocated = 0; @@ -96,8 +105,15 @@ function handle_process() update_debtor_trans_allocation($allocn_item->type, $allocn_item->type_no, $allocn_item->current_allocated); - $total_allocated += $allocn_item->current_allocated; + // Exchange Variations Joe Hunt 2008-09-20 //////////////////////////////////////// + + exchange_variation($_SESSION['alloc']->type, $_SESSION['alloc']->trans_no, + $allocn_item->type, $allocn_item->type_no, $_SESSION['alloc']->date_, + $allocn_item->current_allocated, payment_person_types::customer()); + + /////////////////////////////////////////////////////////////////////////// + $total_allocated += $allocn_item->current_allocated; } } /*end of the loop through the array of allocations made */ @@ -212,7 +228,7 @@ function edit_allocations_for_transaction($type, $trans_no) label_cell("" . _("All") . ""); label_cell("" - . _("None") . "".hidden("un_allocated" . $counter, $un_allocated, false)); + . _("None") . "".hidden("un_allocated" . $counter, price_format($un_allocated), false)); end_row(); $total_allocated += input_num('amount' . $counter); @@ -220,7 +236,7 @@ function edit_allocations_for_transaction($type, $trans_no) } label_row(_("Total Allocated"), price_format($total_allocated), - "colspan=6 align=right", "nowrap align=right id='total_allocated'"); + "colspan=6 align=right", "nowrap align=right id='total_allocated'", 3); if ($_SESSION['alloc']->amount - $total_allocated < 0) { $font1 = ""; @@ -231,7 +247,7 @@ function edit_allocations_for_transaction($type, $trans_no) $left_to_allocate = $_SESSION['alloc']->amount - $total_allocated; $left_to_allocate = price_format($left_to_allocate); label_row(_("Left to Allocate"), $font1 . $left_to_allocate . $font2, - "colspan=6 align=right ", "nowrap align=right id='left_to_allocate'"); + "colspan=6 align=right ", "nowrap align=right id='left_to_allocate'", 3); end_table(1); hidden('TotalNumberOfAllocs', $counter); @@ -242,7 +258,7 @@ function edit_allocations_for_transaction($type, $trans_no) else { display_note(_("There are no unsettled transactions to allocate."), 0, 1); - + submit_center('Cancel', _("Back to Allocations"), true, _('Abandon allocations and return to selection of allocatable amounts'), true); }