From: Pak R. <pak...@gm...> - 2014-03-01 01:06:45
|
Hi rafael: In my Counter Sales scripts lines read as: $TotalFromCustomer = $_POST['AmountPaidCash'] + $_POST['AmountPaidCC'] + $_POST['AmountPaidAmex'] + $_POST['AmountReturnedGoods'] + $_POST['AmountVouchers']; if (abs($TotalFromCustomer -($_SESSION['Items'.$identifier]->total+$_POST['TaxTotal']))>=0.01) { prnMsg(_('The amount entered as payment does not equal the amount of the invoice. Please ensure the customer has paid the correct amount and re-enter'),'error'); $InputError = true; and it works OK. Mine is a heavily modified version, but the idea is I calculate it from the _POST. I remember having similar problems loooooooong time ago, so probably this was the fix. Hope it helps Regards, Ricard 2014-03-01 5:58 GMT+08:00 Rafael Chacón <raf...@gm...>: > Hi, > > We are using "Enter Counter Sales" with an item 11 times, with price in > USD (Default Price List is in USD). It is banked to a bank-account in USD, > but Home Currency is in CRC. > > When the cashier enters the Amount Paid (exactly teh total). he gets the > advise "The amount entered as payment does not equal the amount of the > invoice. Please ensure the customer has paid the correct amount and > re-enter". > > I think the problem is in: > > (abs(filter_number_format($_POST['AmountPaid']) > -(round($_SESSION['Items'.$identifier]->total+filter_number_format($_POST['TaxTotal']),$_SESSION['Items'.$identifier]->CurrDecimalPlaces)))>=0.01) > > probably in the way the number format is handled. > > > > Someone has had a similar problem? Why we use "xxx->yyy" instead of > "$zzz" ? > > Regards, Rafael. > > > ------------------------------------------------------------------------------ > Flow-based real-time traffic analytics software. Cisco certified tool. > Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer > Customize your own dashboards, set traffic alerts and generate reports. > Network behavioral analysis & security monitoring. All-in-one tool. > > http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > |