From: <dai...@us...> - 2012-01-07 01:04:35
|
Revision: 4792 http://web-erp.svn.sourceforge.net/web-erp/?rev=4792&view=rev Author: daintree Date: 2012-01-07 01:04:29 +0000 (Sat, 07 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/Currencies.php trunk/Shipments.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/doc/Change.log Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2012-01-03 06:35:27 UTC (rev 4791) +++ trunk/Currencies.php 2012-01-07 01:04:29 UTC (rev 4792) @@ -69,7 +69,7 @@ prnMsg(_('The number of decimal places to display for amounts in this currency must be numeric'),'error'); $Errors[$i] = 'DecimalPlaces'; $i++; - }elseif (filter_number_format($_POST['DecimalPlaces'])<=0){ + }elseif (filter_number_format($_POST['DecimalPlaces'])<0){ $InputError = 1; prnMsg(_('The number of decimal places to display for amounts in this currency must be positive or zero'),'error'); $Errors[$i] = 'DecimalPlaces'; Modified: trunk/Shipments.php =================================================================== --- trunk/Shipments.php 2012-01-03 06:35:27 UTC (rev 4791) +++ trunk/Shipments.php 2012-01-07 01:04:29 UTC (rev 4792) @@ -17,7 +17,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; -if (!isset($_SESSION['SupplierID']) AND !isset($_SESSION['Shipment'])){ +if (!isset($_SESSION['SupplierID']) AND !isset($_SESSION['Shipment']) AND !isset($_GET['SelectedShipment'])){ prnMsg( _('To set up a shipment') . ', ' . _('the supplier must first be selected from the Select Supplier page'), 'error'); echo '<table class="selection"> <tr><td class="menu_group_item"> @@ -78,8 +78,6 @@ $_SESSION['Shipment']->Vessel = $myrow['vessel']; $_SESSION['Shipment']->VoyageRef = $myrow['voyageref']; - - /*now populate the shipment details records */ $LineItemsSQL = "SELECT purchorderdetails.podetailitem, @@ -195,7 +193,7 @@ prnMsg(_('Cannot add purchase order lines to the shipment unless the shipment is first initiated - hit update to setup the shipment first'),'info'); $InputError = 1; } - if ($InputError==0){ + if ($InputError==0 AND !isset($_GET['Add'])){ //don't update vessel and voyage on adding a new PO line to the shipment $_SESSION['Shipment']->Vessel = $_POST['Vessel']; $_SESSION['Shipment']->VoyageRef = $_POST['VoyageRef']; } @@ -289,6 +287,7 @@ $myrow['quantityord'], $myrow['quantityrecd'], $StandardCost, + $myrow['decimalplaces'], $db); } @@ -323,9 +322,9 @@ echo '<tr><td>'. _('Expected Arrival Date (ETA)'). ': </td>'; if (isset($_SESSION['Shipment']->ETA)) { - echo '<td><input type="text class="date" alt='.$_SESSION['DefaultDateFormat'].' name="ETA" maxlength="10" size="10" value="' . $ETA . '" /></td>'; + echo '<td><input type="text" name="ETA" class="date" alt='.$_SESSION['DefaultDateFormat'].' maxlength="10" size="10" value="' . $ETA . '" /></td>'; } else { - echo '<td><input type="text class="date" alt='.$_SESSION['DefaultDateFormat'].' name="ETA" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>'; + echo '<td><input type="text" class="date" alt='.$_SESSION['DefaultDateFormat'].' name="ETA" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>'; } echo '<td>'. _('Into').' '; @@ -467,8 +466,8 @@ INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid WHERE qtyinvoiced=0 - AND purchorderdetails.completed=0 - AND purchorders.status='Authorised' + AND purchorders.status <> 'Cancelled' + AND purchorders.status <> 'Rejected' AND purchorders.supplierno ='" . $_SESSION['Shipment']->SupplierID . "' AND purchorderdetails.shiptref=0 AND purchorders.intostocklocation='" . $_POST['StockLocation'] . "'"; Modified: trunk/SupplierCredit.php =================================================================== --- trunk/SupplierCredit.php 2012-01-03 06:35:27 UTC (rev 4791) +++ trunk/SupplierCredit.php 2012-01-07 01:04:29 UTC (rev 4792) @@ -612,7 +612,7 @@ /*First do input reasonableness checks then do the updates and inserts to process the credit note entered */ - + $TaxTotal =0; foreach ($_SESSION['SuppTrans']->Taxes as $Tax) { /*Set the tax rate to what was entered */ @@ -637,14 +637,9 @@ $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount = filter_number_format($_POST['TaxAmount' . $Tax->TaxCalculationOrder]); } + $TaxTotal += $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount } -/*Need to recalc the taxtotal */ - $TaxTotal=0; - foreach ($_SESSION['SuppTrans']->Taxes as $Tax){ - $TaxTotal += $Tax->TaxOvAmount; - } - $InputError = False; if ( $TaxTotal + $_SESSION['SuppTrans']->OvAmount <= 0){ $InputError = True; Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2012-01-03 06:35:27 UTC (rev 4791) +++ trunk/SupplierInvoice.php 2012-01-07 01:04:29 UTC (rev 4792) @@ -584,11 +584,11 @@ <input type="submit" name="PostInvoice" value="' . _('Enter Invoice') . '" /> </div>'; -} else { //do the postings -and dont show the button to process +} else { // $_POST['PostInvoice'] is set so do the postings -and dont show the button to process /*First do input reasonableness checks then do the updates and inserts to process the invoice entered */ - + $TaxTotal =0; foreach ($_SESSION['SuppTrans']->Taxes as $Tax) { /*Set the tax rate to what was entered */ if (isset($_POST['TaxRate' . $Tax->TaxCalculationOrder])){ @@ -596,23 +596,23 @@ } if ($_POST['OverRideTax']=='Auto' OR !isset($_POST['OverRideTax'])){ /*Now recaluclate the tax depending on the method */ + /*Now recaluclate the tax depending on the method */ if ($Tax->TaxOnTax ==1){ + $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount = $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxRate * ($_SESSION['SuppTrans']->OvAmount + $TaxTotal); + } else { /*Calculate tax without the tax on tax */ + $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount = $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxRate * $_SESSION['SuppTrans']->OvAmount; + } } else { /*Tax being entered manually accept the taxamount entered as is*/ $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount = filter_number_format($_POST['TaxAmount' . $Tax->TaxCalculationOrder]); } + $TaxTotal += $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount; } -/*Need to recalc the taxtotal */ - $TaxTotal=0; - foreach ($_SESSION['SuppTrans']->Taxes as $Tax){ - $TaxTotal += $Tax->TaxOvAmount; - } - $InputError = False; if ( $TaxTotal + $_SESSION['SuppTrans']->OvAmount < 0){ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-01-03 06:35:27 UTC (rev 4791) +++ trunk/doc/Change.log 2012-01-07 01:04:29 UTC (rev 4792) @@ -1,5 +1,9 @@ webERP Change Log +7/1/12 Phil: José Roberge (robergej) reported that purchase invoice tax on tax was not being processed correctly although it was appearing on the supplier invoice during entry of the invoice the processing was not calculating the tax on tax. Fixed SupplierInvoice.php +7/1/12 Phil: Brian May reported that was unable to add completed (fully received) lines off a purchase order against a shipment. Removed trap to allow completed (fully received) lines to be added. +5/1/12 Phil: Brian May reported issues with entering shipments discovered parameter DecimalPlaces missed off adding line to shipment also quotation error in entering shipment ETA date. + 3/1/12 Release 4.06.5 30/12/11 Phil: install/index.php now checks for the existence of config.php before attempting to run the installation script This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |