From: <dai...@us...> - 2016-05-23 07:20:00
|
Revision: 7540 http://sourceforge.net/p/web-erp/reponame/7540 Author: daintree Date: 2016-05-23 07:19:58 +0000 (Mon, 23 May 2016) Log Message: ----------- fix credit_invoice.php for adding tax authorities correctly Modified Paths: -------------- trunk/Credit_Invoice.php trunk/doc/Change.log Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2016-05-21 16:15:10 UTC (rev 7539) +++ trunk/Credit_Invoice.php 2016-05-23 07:19:58 UTC (rev 7540) @@ -233,12 +233,13 @@ $_SESSION['CreditItems' . $identifier]->SalesPerson = $_POST['SalesPerson']; } } -foreach($_SESSION['CreditItems' . $identifier]->FreightTaxes as $FreightTaxLine) { - if(isset($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])) { - $_SESSION['CreditItems' . $identifier]->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])/100; +foreach ($_SESSION['CreditItems'.$identifier]->FreightTaxes as $FreightTaxKey=>$FreightTaxLine) { + if (is_numeric(filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder]))){ + $_SESSION['CreditItems'.$identifier]->FreightTaxes[$FreightTaxKey]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxKey])/100; } } + if($_SESSION['CreditItems' . $identifier]->ItemsOrdered > 0 OR isset($_POST['NewItem'])) { if(isset($_GET['Delete'])) { @@ -262,9 +263,9 @@ $_SESSION['CreditItems' . $identifier]->LineItems[$LineItem->LineNumber]->DiscountPercent=($DiscountPercentage/100); $_SESSION['CreditItems' . $identifier]->LineItems[$LineItem->LineNumber]->Narrative=$Narrative; } - foreach($LineItem->Taxes as $TaxLine) { - if(isset($_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])) { - $_SESSION['CreditItems' . $identifier]->LineItems[$LineItem->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])/100; + foreach ($LineItem->Taxes as $TaxKey=>$TaxLine) { + if (is_numeric(filter_number_format($_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate']))){ + $_SESSION['CreditItems'.$identifier]->LineItems[$LineItem->LineNumber]->Taxes[$TaxKey]->TaxRate = filter_number_format($_POST[$LineItem->LineNumber . $TaxKey . '_TaxRate'])/100; } } } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2016-05-21 16:15:10 UTC (rev 7539) +++ trunk/doc/Change.log 2016-05-23 07:19:58 UTC (rev 7540) @@ -2,6 +2,8 @@ 22/5/16 Release 4.13 +23/5/16 Phil: Credit_Invoice.php now adds correct tax authorities - correcting bug that resulted in foreign key errors when adding taxauthorities as per fix to SelectCreditItems.php on 13/1/16 +20/5/16 Phil: POS upload file now includes assembly items 20/5/16 RChacon: Insert missing script as an utility. 20/5/16 RChacon: In Login.php, add a return link. 20/5/16 Paul Harness: CustomerAllocations.php consistent sort order adding by date and transno sorting for transactions on the same date |