X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fallocations%2Fsupplier_allocate.php;h=d6a4da7c487b3e3a58d1a03a33eacb4b640f5343;hb=95856a739a5eacda8c86dc53bff8e7a0ae7b204e;hp=995b2735da945fc3e30bc1645cb38ebd0663bad2;hpb=c16b7a0f7aa17722568a0695e2fd03a362998372;p=fa-stable.git diff --git a/purchasing/allocations/supplier_allocate.php b/purchasing/allocations/supplier_allocate.php index 995b2735..d6a4da7c 100644 --- a/purchasing/allocations/supplier_allocate.php +++ b/purchasing/allocations/supplier_allocate.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $path_to_root="../.."; $page_security = 3; @@ -74,7 +83,7 @@ function handle_process() begin_transaction(); // clear all the allocations for this payment/credit - clear_supp_alloctions($_SESSION['alloc']->type, $_SESSION['alloc']->trans_no); + clear_supp_alloctions($_SESSION['alloc']->type, $_SESSION['alloc']->trans_no, $_SESSION['alloc']->date_); // now add the new allocations $total_allocated = 0; @@ -88,6 +97,14 @@ function handle_process() update_supp_trans_allocation($alloc_item->type, $alloc_item->type_no, $alloc_item->current_allocated); + + // Exchange Variations Joe Hunt 2008-09-20 //////////////////////////////////////// + + exchange_variation($_SESSION['alloc']->type, $_SESSION['alloc']->trans_no, + $alloc_item->type, $alloc_item->type_no, $_SESSION['alloc']->date_, + $alloc_item->current_allocated, payment_person_types::supplier()); + + /////////////////////////////////////////////////////////////////////////// $total_allocated += $alloc_item->current_allocated; } @@ -168,7 +185,7 @@ function edit_allocations_for_transaction($type, $trans_no) { global $table_style; - start_form(false, true); + start_form(); display_heading(_("Allocation of") . " " . systypes::name($_SESSION['alloc']->type) . " # " . $_SESSION['alloc']->trans_no); @@ -184,7 +201,7 @@ function edit_allocations_for_transaction($type, $trans_no) { start_table($table_style); $th = array(_("Transaction Type"), _("#"), _("Date"), _("Due Date"), _("Amount"), - _("Other Allocations"), _("This Allocation"), _("Left to Allocate"),''); + _("Other Allocations"), _("This Allocation"), _("Left to Allocate"),'',''); table_header($th); $k = $counter = $total_allocated = 0; @@ -216,7 +233,7 @@ function edit_allocations_for_transaction($type, $trans_no) } label_row(_("Total Allocated"), number_format2($total_allocated,user_price_dec()), - "colspan=6 align=right", "align=right id='total_allocated'"); + "colspan=6 align=right", "align=right id='total_allocated'", 3); if (-$_SESSION['alloc']->amount - $total_allocated < 0) { $font1 = ""; @@ -226,21 +243,21 @@ function edit_allocations_for_transaction($type, $trans_no) $font1 = $font2 = ""; $left_to_allocate = price_format(-$_SESSION['alloc']->amount - $total_allocated); label_row(_("Left to Allocate"), $font1 . $left_to_allocate . $font2, "colspan=6 align=right", - "nowrap align=right id='left_to_allocate'"); + "nowrap align=right id='left_to_allocate'", 3); end_table(); hidden('TotalNumberOfAllocs', $counter); submit_center_first('UpdateDisplay', _("Refresh"), _('Start again allocation of selected amount'), true); - submit('Process', _("Process"), true, _('Process allocations'), true); + submit('Process', _("Process"), true, _('Process allocations'), 'default'); submit_center_last('Cancel', _("Back to Allocations"), - _('Abandon allocations and return to selection of allocatable amounts'), true); + _('Abandon allocations and return to selection of allocatable amounts'), 'cancel'); } 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); + _('Abandon allocations and return to selection of allocatable amounts'), 'cancel'); } div_end();