From: <vv...@us...> - 2015-03-30 21:12:20
|
Revision: 7243 http://sourceforge.net/p/web-erp/reponame/7243 Author: vvs2012 Date: 2015-03-30 21:12:13 +0000 (Mon, 30 Mar 2015) Log Message: ----------- Get all taxes for the tax group, even if calculationorder is left at default value 0. Modified Paths: -------------- trunk/doc/Change.log trunk/includes/DefineCartClass.php Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-03-30 09:54:16 UTC (rev 7242) +++ trunk/doc/Change.log 2015-03-30 21:12:13 UTC (rev 7243) @@ -1,5 +1,6 @@ webERP Change Log +30/3/15 Vitaly: Get all taxes for the tax group, even if calculationorder is left at default value 0. 29/3/15 Phil: Allow dummy/service items to be propogated to CounterLogic POS installs through the api 27/03/15 Exson: Remove redundant code from PrintCustTrans.php. 27/03/15 Exson: Make credit not for freight only is printable in PrintCustTrans.php. Modified: trunk/includes/DefineCartClass.php =================================================================== --- trunk/includes/DefineCartClass.php 2015-03-30 09:54:16 UTC (rev 7242) +++ trunk/includes/DefineCartClass.php 2015-03-30 21:12:13 UTC (rev 7243) @@ -310,15 +310,16 @@ $ErrMsg = _('The taxes and rates for this item could not be retrieved because'); $GetTaxRatesResult = DB_query($sql,$ErrMsg); - + $i=1; while ($myrow = DB_fetch_array($GetTaxRatesResult)){ - $this->LineItems[$LineNumber]->Taxes[$myrow['taxcalculationorder']] = new Tax($myrow['taxcalculationorder'], + $this->LineItems[$LineNumber]->Taxes[$i] = new Tax($myrow['taxcalculationorder'], $myrow['taxauthid'], $myrow['description'], $myrow['taxrate'], $myrow['taxontax'], $myrow['taxglcode']); + $i++; } } //end method GetExistingTaxes @@ -350,15 +351,16 @@ if (DB_num_rows($GetTaxRatesResult)==0){ prnMsg(_('It appears that taxes are not defined correctly for this customer tax group') ,'error'); } else { - + $i=1; while ($myrow = DB_fetch_array($GetTaxRatesResult)){ - $this->LineItems[$LineNumber]->Taxes[$myrow['calculationorder']] = new Tax($myrow['calculationorder'], + $this->LineItems[$LineNumber]->Taxes[$i] = new Tax($myrow['calculationorder'], $myrow['taxauthid'], $myrow['description'], $myrow['taxrate'], $myrow['taxontax'], $myrow['taxglcode']); + $i++; } //end loop around different taxes } //end if there are some taxes defined } //end method GetTaxes @@ -397,15 +399,16 @@ $ErrMsg = _('The taxes and rates for this item could not be retrieved because'); $GetTaxRatesResult = DB_query($SQL,$ErrMsg); - + $i=1; while ($myrow = DB_fetch_array($GetTaxRatesResult)){ - $this->FreightTaxes[$myrow['calculationorder']] = new Tax($myrow['calculationorder'], + $this->FreightTaxes[$i] = new Tax($myrow['calculationorder'], $myrow['taxauthid'], $myrow['description'], $myrow['taxrate'], $myrow['taxontax'], $myrow['taxglcode']); + $i++; } } //end method GetFreightTaxes() |