PHP 8.2 Compatibility Improvement, better implementation.
[fa-stable.git] / includes / ui / allocation_cart.inc
index f21fd2ede4ec459212eee4a34862d0c196540178..fe232f069af586b4255127c7b23ca3432779ff31 100644 (file)
@@ -15,7 +15,7 @@
 */
 //-----------------------------------------------------------------------------------
 
-class allocation 
+class allocation
 {
 
        var $trans_no; 
@@ -26,6 +26,7 @@ class allocation
        var $person_curr;
        var $date_;
        var $amount = 0; /*Total amount of the transaction in FX */
+       var $bank_amount = 0;
        var $currency;
 
        var $allocs; /*array of transactions allocated to */
@@ -396,7 +397,7 @@ function check_allocations()
                        if ($_SESSION['alloc']->allocs[$counter]->type == ST_SALESORDER)
                                $trans = get_sales_order_header($_SESSION['alloc']->allocs[$counter]->type_no, $_SESSION['alloc']->allocs[$counter]->type);
                        else
-                               $trans = get_customer_trans($_SESSION['alloc']->allocs[$counter]->type_no, $_SESSION['alloc']->allocs[$counter]->type);
+                               $trans = get_customer_trans($_SESSION['alloc']->allocs[$counter]->type_no, $_SESSION['alloc']->allocs[$counter]->type,$_SESSION['alloc']->person_id);
 
                        if ($trans['debtor_no'] != $_SESSION['alloc']->person_id) {
                                display_error(_("Allocated transaction allocated is not related to company selected."));
@@ -407,7 +408,7 @@ function check_allocations()
                        if ($_SESSION['alloc']->allocs[$counter]->type == ST_PURCHORDER)
                 $trans = get_po($_SESSION['alloc']->allocs[$counter]->type_no);
             else
-                $trans = get_supp_trans($_SESSION['alloc']->allocs[$counter]->type_no, $_SESSION['alloc']->allocs[$counter]->type);                    
+                $trans = get_supp_trans($_SESSION['alloc']->allocs[$counter]->type_no, $_SESSION['alloc']->allocs[$counter]->type,  $_SESSION['alloc']->person_id);                    
                        if ($trans['supplier_id'] != $_SESSION['alloc']->person_id) {
                                display_error(_("Allocated transaction allocated is not related to company selected."));
                                set_focus('amount'.$counter);