This list is closed, nobody may subscribe to it.
2011 |
Jan
(14) |
Feb
(42) |
Mar
(56) |
Apr
(60) |
May
(54) |
Jun
(48) |
Jul
(74) |
Aug
(52) |
Sep
(68) |
Oct
(64) |
Nov
(42) |
Dec
(62) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(142) |
Feb
(270) |
Mar
(374) |
Apr
(230) |
May
(214) |
Jun
(116) |
Jul
(234) |
Aug
(66) |
Sep
(120) |
Oct
(16) |
Nov
(17) |
Dec
(41) |
2013 |
Jan
(19) |
Feb
(18) |
Mar
(8) |
Apr
(40) |
May
(121) |
Jun
(42) |
Jul
(127) |
Aug
(145) |
Sep
(27) |
Oct
(38) |
Nov
(83) |
Dec
(61) |
2014 |
Jan
(33) |
Feb
(35) |
Mar
(59) |
Apr
(41) |
May
(38) |
Jun
(45) |
Jul
(17) |
Aug
(58) |
Sep
(46) |
Oct
(51) |
Nov
(55) |
Dec
(36) |
2015 |
Jan
(57) |
Feb
(67) |
Mar
(70) |
Apr
(34) |
May
(32) |
Jun
(11) |
Jul
(3) |
Aug
(17) |
Sep
(16) |
Oct
(13) |
Nov
(30) |
Dec
(30) |
2016 |
Jan
(17) |
Feb
(12) |
Mar
(17) |
Apr
(20) |
May
(47) |
Jun
(15) |
Jul
(13) |
Aug
(30) |
Sep
(32) |
Oct
(20) |
Nov
(32) |
Dec
(24) |
2017 |
Jan
(16) |
Feb
|
Mar
(11) |
Apr
(11) |
May
(5) |
Jun
(42) |
Jul
(9) |
Aug
(10) |
Sep
(14) |
Oct
(15) |
Nov
(2) |
Dec
(29) |
2018 |
Jan
(28) |
Feb
(49) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dai...@us...> - 2011-11-21 09:26:04
|
Revision: 4750 http://web-erp.svn.sourceforge.net/web-erp/?rev=4750&view=rev Author: daintree Date: 2011-11-21 09:25:54 +0000 (Mon, 21 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/doc/Change.log Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-21 09:22:06 UTC (rev 4749) +++ trunk/doc/Change.log 2011-11-21 09:25:54 UTC (rev 4750) @@ -1,7 +1,11 @@ webERP Change Log + 21/11/11 Phil: UserSettings.php now checks for at least 5 character passwords WWW_Users.php CustLoginSetup.php and SupplierLoginSetup.php now also check for 4 character userids 21/11/11 Felix Lim: WWW_users.php malfomed <input type="hidden" - with no closing > +20/11/11 Phil: Shipments.php now only allows purchase order items to be added to a shipment where the shipment is authorised. Completed, rejected, cancelled orders no longer show. +20/11/11 Phil: Shipments.php now shows quantities to the number of decimal places defined in the stock master and amounts in the currency of the purchase order. +20/11/11 Phil: PO_Header.php purchase orders cannot be cancelled now if they are on a shipment - need to remove from the shipment first 19/11/11 Release 4.06RC3 - 4.06.1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-21 09:26:00
|
Revision: 4750 http://web-erp.svn.sourceforge.net/web-erp/?rev=4750&view=rev Author: daintree Date: 2011-11-21 09:25:54 +0000 (Mon, 21 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/doc/Change.log Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-21 09:22:06 UTC (rev 4749) +++ trunk/doc/Change.log 2011-11-21 09:25:54 UTC (rev 4750) @@ -1,7 +1,11 @@ webERP Change Log + 21/11/11 Phil: UserSettings.php now checks for at least 5 character passwords WWW_Users.php CustLoginSetup.php and SupplierLoginSetup.php now also check for 4 character userids 21/11/11 Felix Lim: WWW_users.php malfomed <input type="hidden" - with no closing > +20/11/11 Phil: Shipments.php now only allows purchase order items to be added to a shipment where the shipment is authorised. Completed, rejected, cancelled orders no longer show. +20/11/11 Phil: Shipments.php now shows quantities to the number of decimal places defined in the stock master and amounts in the currency of the purchase order. +20/11/11 Phil: PO_Header.php purchase orders cannot be cancelled now if they are on a shipment - need to remove from the shipment first 19/11/11 Release 4.06RC3 - 4.06.1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-21 09:22:13
|
Revision: 4749 http://web-erp.svn.sourceforge.net/web-erp/?rev=4749&view=rev Author: daintree Date: 2011-11-21 09:22:06 +0000 (Mon, 21 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/CustLoginSetup.php trunk/DiscountMatrix.php trunk/GoodsReceived.php trunk/PO_Header.php trunk/Shipments.php trunk/SuppLoginSetup.php trunk/UserSettings.php trunk/WWW_Users.php trunk/doc/Change.log trunk/includes/DefinePOClass.php trunk/includes/DefineShiptClass.php Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/CustLoginSetup.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -43,7 +43,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (mb_strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<4){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID']) OR mb_strstr($_POST['UserID'],' ')) { Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/DiscountMatrix.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -138,7 +138,7 @@ </table> <br /> <div class="centre"> - <input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"> + <input tabindex="5" type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> <br />'; @@ -155,7 +155,7 @@ $result = DB_query($sql,$db); -echo '<table class=selection>'; +echo '<table class="selection">'; echo '<tr> <th>' . _('Sales Type') . '</th> <th>' . _('Discount Category') . '</th> Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/GoodsReceived.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -154,7 +154,8 @@ //Now Display LineItem - echo '<td>' . $LnItm->StockID . '</td> + + echo '<td><a href="' . $rootpath . '/' . $_SESSION['part_pics_dir'] . '/' . $StockID . '.jpg" target="_blank">'. $LnItm->StockID . '</a></td> <td>' . $LnItm->ItemDescription . '</td> <td class="number">' . $DisplaySupplierQtyOrd . '</td> <td>' . $LnItm->SuppliersUnit . '</td> Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/PO_Header.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -106,6 +106,11 @@ _('Prices cannot be altered for lines that have already been received') .' '. _('and quantities cannot be reduced below the quantity already received'),'warn'); } + $ShipmentExists = $_SESSION['PO'.$identifier]->Any_Lines_On_A_Shipment(); + if ($ShipmentExists != false){ + $OKToUpdateStatus = 0; //not ok to update the status + prnMsg( _('This order cannot be cancelled or rejected because there is at least one line that is allocated to a shipment') . '. ' . _('See shipment number') . ' ' . $ShipmentExists,'warn'); + } } if ($OKToUpdateStatus==1){ // none of the order has been received if ($AuthorityLevel>$OrderTotal) { Modified: trunk/Shipments.php =================================================================== --- trunk/Shipments.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/Shipments.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -84,18 +84,18 @@ $LineItemsSQL = "SELECT purchorderdetails.podetailitem, purchorders.orderno, - purchorderdetails.itemcode, - purchorderdetails.itemdescription, - purchorderdetails.deliverydate, - purchorderdetails.glcode, - purchorderdetails.qtyinvoiced, - purchorderdetails.unitprice, - stockmaster.units, - purchorderdetails.quantityord, - purchorderdetails.quantityrecd, - purchorderdetails.stdcostunit, - stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, - purchorders.intostocklocation + purchorderdetails.itemcode, + purchorderdetails.itemdescription, + purchorderdetails.deliverydate, + purchorderdetails.glcode, + purchorderdetails.qtyinvoiced, + purchorderdetails.unitprice, + stockmaster.units, + purchorderdetails.quantityord, + purchorderdetails.quantityrecd, + purchorderdetails.stdcostunit, + stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, + purchorders.intostocklocation FROM purchorderdetails INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid INNER JOIN purchorders @@ -120,17 +120,18 @@ $StandardCost =$myrow['stdcostunit']; } - $_SESSION['Shipment']->LineItems[$myrow['podetailitem']] = new LineDetails($myrow['podetailitem'], - $myrow['orderno'], - $myrow['itemcode'], - $myrow['itemdescription'], - $myrow['qtyinvoiced'], - $myrow['unitprice'], - $myrow['units'], - $myrow['deliverydate'], - $myrow['quantityord'], - $myrow['quantityrecd'], - $StandardCost); + $_SESSION['Shipment']->LineItems[$myrow['podetailitem']] = new LineDetails( + $myrow['podetailitem'], + $myrow['orderno'], + $myrow['itemcode'], + $myrow['itemdescription'], + $myrow['qtyinvoiced'], + $myrow['unitprice'], + $myrow['units'], + $myrow['deliverydate'], + $myrow['quantityord'], + $myrow['quantityrecd'], + $StandardCost); } /* line Shipment from shipment details */ DB_data_Seek($LineItemsResult,0); @@ -147,28 +148,31 @@ $_SESSION['Shipment'] = new Shipment; $sql = "SELECT suppname, - currcode - FROM suppliers + currcode, + decimalplaces AS currdecimalplaces + FROM suppliers INNER JOIN currencies + ON suppliers.currcode=currencies.currabrev WHERE supplierid='" . $_SESSION['SupplierID'] . "'"; $ErrMsg = _('The supplier details for the shipment could not be retrieved because'); $result = DB_query($sql,$db,$ErrMsg); - $myrow = DB_fetch_row($result); + $myrow = DB_fetch_array($result); $_SESSION['Shipment']->SupplierID = $_SESSION['SupplierID']; - $_SESSION['Shipment']->SupplierName = $myrow[0]; - $_SESSION['Shipment']->CurrCode = $myrow[1]; + $_SESSION['Shipment']->SupplierName = $myrow['suppname']; + $_SESSION['Shipment']->CurrCode = $myrow['currcode']; + $_SESSION['Shipment']->CurrDecimalPlaces = $myrow['currdecimalplaces']; $_SESSION['Shipment']->ShiptRef = GetNextTransNo (31, $db); } -if (isset($_POST['Update']) OR (isset($_GET['Add']) AND $_SESSION['Shipment']->Closed==0)) { //user hit the update button +if (isset($_POST['Update']) + OR (isset($_GET['Add']) + AND $_SESSION['Shipment']->Closed==0)) { //user hit the update button $InputError = 0; if (isset($_POST['Update'])){ - $_SESSION['Shipment']->Vessel = $_POST['Vessel']; - $_SESSION['Shipment']->VoyageRef = $_POST['VoyageRef']; if (!Is_Date($_POST['ETA'])){ $InputError=1; @@ -186,19 +190,24 @@ if (mb_strlen($_POST['VoyageRef'])<2){ prnMsg( _('A reference to the voyage (or HAWB in the case of air-freight) of more than 2 characters is expected'), 'error'); } - } elseif(mb_strlen($_SESSION['Shipment']->Vessel)<2 OR mb_strlen($_SESSION['Shipment']->VoyageRef)<2){ + } elseif(mb_strlen($_SESSION['Shipment']->Vessel)<2 + OR mb_strlen($_SESSION['Shipment']->VoyageRef)<2){ 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; } /*The user hit the update the shipment button and there are some lines on the shipment*/ if ($InputError == 0 AND (count($_SESSION['Shipment']->LineItems) > 0 OR isset($_GET['Add']))){ + + $_SESSION['Shipment']->Vessel = $_POST['Vessel']; + $_SESSION['Shipment']->VoyageRef = $_POST['VoyageRef']; + $sql = "SELECT shiptref FROM shipments WHERE shiptref =" . $_SESSION['Shipment']->ShiptRef; $result = DB_query($sql,$db); if (DB_num_rows($result)==1){ $sql = "UPDATE shipments SET vessel='" . $_SESSION['Shipment']->Vessel . "', - voyageref='". $_SESSION['Shipment']->VoyageRef . "', - eta='" . $_SESSION['Shipment']->ETA . "' + voyageref='". $_SESSION['Shipment']->VoyageRef . "', + eta='" . $_SESSION['Shipment']->ETA . "' WHERE shiptref ='" . $_SESSION['Shipment']->ShiptRef . "'"; } else { @@ -225,12 +234,11 @@ $sql = "UPDATE purchorderdetails SET deliverydate ='" . $_SESSION['Shipment']->ETA . "' - WHERE podetailitem='" . $LnItm->PODetailItem . "'"; + WHERE podetailitem='" . $LnItm->PODetailItem . "'"; $result = DB_query($sql,$db); $_SESSION['Shipment']->LineItems[$LnItm->PODetailItem]->DelDate = $_SESSION['Shipment']->ETA; - } } prnMsg( _('Updated the shipment record and delivery dates of order lines as necessary'), 'success'); @@ -239,23 +247,25 @@ } //user hit Update -if (isset($_GET['Add']) AND $_SESSION['Shipment']->Closed==0 AND $InputError==0){ +if (isset($_GET['Add']) + AND $_SESSION['Shipment']->Closed==0 + AND $InputError==0){ $sql = "SELECT purchorderdetails.orderno, - purchorderdetails.itemcode, - purchorderdetails.itemdescription, - purchorderdetails.unitprice, - purchorderdetails.stdcostunit, - stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, - purchorderdetails.quantityord, - purchorderdetails.quantityrecd, - purchorderdetails.deliverydate, - stockmaster.units, - stockmaster.decimalplaces, - purchorderdetails.qtyinvoiced - FROM purchorderdetails INNER JOIN stockmaster + purchorderdetails.itemcode, + purchorderdetails.itemdescription, + purchorderdetails.unitprice, + purchorderdetails.stdcostunit, + stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, + purchorderdetails.quantityord, + purchorderdetails.quantityrecd, + purchorderdetails.deliverydate, + stockmaster.units, + stockmaster.decimalplaces, + purchorderdetails.qtyinvoiced + FROM purchorderdetails INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid - WHERE purchorderdetails.podetailitem='" . $_GET['Add'] . "'"; + WHERE purchorderdetails.podetailitem='" . $_GET['Add'] . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_array($result); @@ -268,7 +278,7 @@ $StandardCost = $myrow['stdcostunit']; } - $_SESSION['Shipment']->add_to_shipment($_GET['Add'], + $_SESSION['Shipment']->Add_To_Shipment($_GET['Add'], $myrow['orderno'], $myrow['itemcode'], $myrow['itemdescription'], @@ -283,7 +293,7 @@ } if (isset($_GET['Delete']) AND $_SESSION['Shipment']->Closed==0){ //shipment is open and user hit delete on a line - $_SESSION['Shipment']->remove_from_shipment($_GET['Delete'],$db); + $_SESSION['Shipment']->Remove_From_Shipment($_GET['Delete'],$db); } @@ -315,24 +325,24 @@ if (isset($_SESSION['Shipment']->ETA)) { echo '<td><input type="text class="date" alt='.$_SESSION['DefaultDateFormat'].' name="ETA" 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').' '; if (count($_SESSION['Shipment']->LineItems)>0){ - if (!isset($_SESSION['Shipment']->StockLocation)){ + if (!isset($_SESSION['Shipment']->StockLocation)){ - $sql = "SELECT purchorders.intostocklocation - FROM purchorders INNER JOIN purchorderdetails - ON purchorders.orderno=purchorderdetails.orderno and podetailitem = '" . key($_SESSION['Shipment']->LineItems) . "'"; + $sql = "SELECT purchorders.intostocklocation + FROM purchorders INNER JOIN purchorderdetails + ON purchorders.orderno=purchorderdetails.orderno AND podetailitem = '" . key($_SESSION['Shipment']->LineItems) . "'"; + + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + + $_SESSION['Shipment']->StockLocation = $myrow[0]; + $_POST['StockLocation']=$_SESSION['Shipment']->StockLocation; - $result = DB_query($sql,$db); - $myrow = DB_fetch_row($result); - - $_SESSION['Shipment']->StockLocation = $myrow[0]; - $_POST['StockLocation']=$_SESSION['Shipment']->StockLocation; - } else { $_POST['StockLocation']=$_SESSION['Shipment']->StockLocation; @@ -373,7 +383,7 @@ $sql = "SELECT locationname FROM locations WHERE loccode='" . $_SESSION['Shipment']->StockLocation . "'"; $resultStkLocs = DB_query($sql,$db); $myrow=DB_fetch_array($resultStkLocs); - echo '<input type=hidden name=StockLocation value='.$_SESSION['Shipment']->StockLocation.'>'; + echo '<input type="hidden" name="StockLocation" value="'.$_SESSION['Shipment']->StockLocation.'" />'; echo $myrow['locationname']; } @@ -382,18 +392,19 @@ if (count($_SESSION['Shipment']->LineItems)>0){ /* Always display all shipment lines */ - echo '<br /><table cellpadding=2 colspan=7 class="selection">'; + echo '<br /><table class="selection">'; echo '<tr><th colspan="9"><font color="navy" size="3">'. _('Order Lines On This Shipment'). '</font></th></tr>'; $TableHeader = '<tr> - <th>'. _('Order'). '</th> - <th>'. _('Item'). '</th> - <th>'. _('Quantity'). '<br />'. _('Ordered'). '</th> - <th>'. _('Units'). '</th> - <th>'. _('Quantity').'<br />'. _('Received'). '</th> - <th>'. _('Quantity').'<br />'. _('Invoiced'). '</th> - <th>'. $_SESSION['Shipment']->CurrCode .' '. _('Price') . '</th> - <th>'. _('Current'). '<br />'. _('Std Cost'). '</th></tr>'; + <th>'. _('Order'). '</th> + <th>'. _('Item'). '</th> + <th>'. _('Quantity'). '<br />'. _('Ordered'). '</th> + <th>'. _('Units'). '</th> + <th>'. _('Quantity').'<br />'. _('Received'). '</th> + <th>'. _('Quantity').'<br />'. _('Invoiced'). '</th> + <th>'. $_SESSION['Shipment']->CurrCode .' '. _('Price') . '</th> + <th>'. _('Current'). '<br />'. _('Std Cost'). '</th> + </tr>'; echo $TableHeader; @@ -420,12 +431,12 @@ echo '<td>'.$LnItm->OrderNo.'</td> - <td>'. $LnItm->StockID .' - '. $LnItm->ItemDescription. '</td><td class="number">' . locale_number_format($LnItm->QuantityOrd,2) . '</td> + <td>'. $LnItm->StockID .' - '. $LnItm->ItemDescription. '</td><td class="number">' . locale_number_format($LnItm->QuantityOrd,$LnItm->DecimalPlaces) . '</td> <td>'. $LnItm->UOM .'</td> - <td class="number">' . locale_number_format($LnItm->QuantityRecd,2) . '</td> - <td class="number">' . locale_number_format($LnItm->QtyInvoiced,2) . '</td> - <td class="number">' . locale_number_format($LnItm->UnitPrice,2) . '</td> - <td class="number">' . locale_number_format($LnItm->StdCostUnit,2) . '</td> + <td class="number">' . locale_number_format($LnItm->QuantityRecd,$LnItm->DecimalPlaces) . '</td> + <td class="number">' . locale_number_format($LnItm->QtyInvoiced,$LnItm->DecimalPlaces) . '</td> + <td class="number">' . locale_number_format($LnItm->UnitPrice, $_SESSION['Shipment']->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($LnItm->StdCostUnit,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $LnItm->PODetailItem . '">'. _('Delete'). '</a></td> </tr>'; }//for each line on the shipment @@ -442,39 +453,43 @@ } $sql = "SELECT purchorderdetails.podetailitem, - purchorders.orderno, - purchorderdetails.itemcode, - purchorderdetails.itemdescription, - purchorderdetails.unitprice, - purchorderdetails.quantityord, - purchorderdetails.quantityrecd, - purchorderdetails.deliverydate, - stockmaster.units, - stockmaster.decimalplaces - FROM purchorderdetails INNER JOIN purchorders - ON purchorderdetails.orderno=purchorders.orderno - INNER JOIN stockmaster + purchorders.orderno, + purchorderdetails.itemcode, + purchorderdetails.itemdescription, + purchorderdetails.unitprice, + purchorderdetails.quantityord, + purchorderdetails.quantityrecd, + purchorderdetails.deliverydate, + stockmaster.units, + stockmaster.decimalplaces + FROM purchorderdetails INNER JOIN purchorders + ON purchorderdetails.orderno=purchorders.orderno + INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid - WHERE qtyinvoiced=0 - AND purchorders.supplierno ='" . $_SESSION['Shipment']->SupplierID . "' - AND purchorderdetails.shiptref=0 - AND purchorders.intostocklocation='" . $_POST['StockLocation'] . "'"; + WHERE qtyinvoiced=0 + AND purchorderdetails.completed=0 + AND purchorders.status='Authorised' + AND purchorders.supplierno ='" . $_SESSION['Shipment']->SupplierID . "' + AND purchorderdetails.shiptref=0 + AND purchorders.intostocklocation='" . $_POST['StockLocation'] . "'"; $result = DB_query($sql,$db); if (DB_num_rows($result)>0){ echo '<table cellpadding="2" colspan="7" class="selection">'; - echo '<tr><th colspan="7"><font color="navy" size="3">'. _('Possible Order Lines To Add To This Shipment').'</font></th></tr>'; + echo '<tr> + <th colspan="7"><font color="navy" size="3">'. _('Possible Order Lines To Add To This Shipment').'</font></th> + </tr>'; $TableHeader = '<tr> - <th>'. _('Order').'</th> - <th>'. _('Item').'</th> - <th>'. _('Quantity').'<br />'. _('Ordered').'</th> - <th>'. _('Units').'</th> - <th>'. _('Quantity').'<br />'. _('Received').'</th> - <th>'. _('Delivery').'<br />'. _('Date').'</th> - </tr>'; + <th>'. _('Order').'</th> + <th>'. _('Item').'</th> + <th>'. _('Quantity').'<br />'. _('Ordered').'</th> + <th>'. _('Units').'</th> + <th>'. _('Quantity').'<br />'. _('Received').'</th> + <th>'. _('Delivery').'<br />'. _('Date').'</th> + </tr>'; echo $TableHeader; @@ -500,12 +515,12 @@ } echo '<td>' . $myrow['orderno'] . '</td> - <td>' . $myrow['itemcode'] . ' - ' . $myrow['itemdescription'] . '</td> - <td class="number">' . locale_number_format($myrow['quantityord'],$myrow['decimalplaces']) . '</td> - <td>' . $myrow['units'] . '</td> - <td class="number">' . locale_number_format($myrow['quantityrecd'],,$myrow['decimalplaces']) . '</td> - <td class="number">' . ConvertSQLDate($myrow['deliverydate']) . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . 'Add=' . $myrow['podetailitem'] . '">'. _('Add').'</a></td> + <td>' . $myrow['itemcode'] . ' - ' . $myrow['itemdescription'] . '</td> + <td class="number">' . locale_number_format($myrow['quantityord'],$myrow['decimalplaces']) . '</td> + <td>' . $myrow['units'] . '</td> + <td class="number">' . locale_number_format($myrow['quantityrecd'],$myrow['decimalplaces']) . '</td> + <td class="number">' . ConvertSQLDate($myrow['deliverydate']) . '</td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . 'Add=' . $myrow['podetailitem'] . '">'. _('Add').'</a></td> </tr>'; } Modified: trunk/SuppLoginSetup.php =================================================================== --- trunk/SuppLoginSetup.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/SuppLoginSetup.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -43,7 +43,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (mb_strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<4){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID'])) { Modified: trunk/UserSettings.php =================================================================== --- trunk/UserSettings.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/UserSettings.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -34,27 +34,34 @@ prnMsg(_('Cannot change password in the demo or others would be locked out!'),'warn'); } */ - $update_pw = 'N'; - if ($_POST['pass'] != ''){ - if ($_POST['pass'] != $_POST['passcheck']){ + $UpdatePassword = 'N'; + if ($_POST['Password'] != ''){ + if ($_POST['Password'] != $_POST['PasswordCheck']){ $InputError = 1; prnMsg(_('The password and password confirmation fields entered do not match'),'error'); }else{ - $update_pw = 'Y'; + $UpdatePassword = 'Y'; } } - if ($_POST['passcheck'] != ''){ - if ($_POST['pass'] != $_POST['passcheck']){ + if ($_POST['PasswordCheck'] != ''){ + if ($_POST['Password'] != $_POST['PasswordCheck']){ $InputError = 1; prnMsg(_('The password and password confirmation fields entered do not match'),'error'); }else{ - $update_pw = 'Y'; + $UpdatePassword = 'Y'; } } + if (mb_strlen($_POST['Password'])<5){ + $InputError = 1; + prnMsg(_('The password entered must be at least 5 characters long'),'error'); + } elseif (mb_strstr($_POST['Password'],$_SESSION['UserID'])!= False){ + $InputError = 1; + prnMsg(_('The password cannot contain the user id'),'error'); + } if ($InputError != 1) { // no errors - if ($update_pw != 'Y'){ + if ($UpdatePassword != 'Y'){ $sql = "UPDATE www_users SET displayrecordsmax='" . $_POST['DisplayRecordsMax'] . "', theme='" . $_POST['Theme'] . "', @@ -76,7 +83,7 @@ language='" . $_POST['Language'] . "', email='". $_POST['email'] ."', pdflanguage='" . $_POST['PDFLanguage'] . "', - password='" . CryptPass($_POST['pass']) . "' + password='" . CryptPass($_POST['Password']) . "' WHERE userid = '" . $_SESSION['UserID'] . "'"; $ErrMsg = _('The user alterations could not be processed because'); @@ -161,20 +168,20 @@ } } -if (!isset($_POST['passcheck'])) { - $_POST['passcheck']=''; +if (!isset($_POST['PasswordCheck'])) { + $_POST['PasswordCheck']=''; } -if (!isset($_POST['pass'])) { - $_POST['pass']=''; +if (!isset($_POST['Password'])) { + $_POST['Password']=''; } echo '</select></td></tr> <tr> <td>' . _('New Password') . ':</td> - <td><input type="password" name="pass" size=20 value="' . $_POST['pass'] . '"></td> + <td><input type="password" name="Password" size="20" value="' . $_POST['Password'] . '" /></td> </tr> <tr> <td>' . _('Confirm Password') . ':</td> - <td><input type="password" name="passcheck" size="20" value="' . $_POST['passcheck'] . '"></td> + <td><input type="password" name="PasswordCheck" size="20" value="' . $_POST['PasswordCheck'] . '" /></td> </tr> <tr> <td colspan=2 align="center"><i>' . _('If you leave the password boxes empty your password will not change') . '</i></td> @@ -189,7 +196,7 @@ $_POST['email'] = $myrow['email']; } -echo '<td><input type="text" name="email" size=40 value="' . $_POST['email'] . '"></td> +echo '<td><input type="text" name="email" size=40 value="' . $_POST['email'] . '" /></td> </tr>'; if (!isset($_POST['PDFLanguage'])){ Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/WWW_Users.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -60,7 +60,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (mb_strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<4){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID'])) { @@ -391,19 +391,23 @@ $_POST['Blocked'] = $myrow['blocked']; $_POST['PDFLanguage'] = $myrow['pdflanguage']; - echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" /'; + echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" />'; echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '" />'; echo '<input type="hidden" name="ModulesAllowed" value="' . $_POST['ModulesAllowed'] . '" />'; - echo '<table class=selection> <tr><td>' . _('User code') . ':</td><td>'; - echo $_POST['UserID'] . '</td></tr>'; + echo '<table class="selection"> + <tr> + <td>' . _('User code') . ':</td> + <td>' . $_POST['UserID'] . '</td> + </tr>'; } else { //end of if $SelectedUser only do the else when a new record is being entered echo '<table class="selection"> <tr> <td>' . _('User Login') . ':</td> - <td><input type="text" name="UserID" size="22" maxlength="20" /></td></tr>'; + <td><input type="text" name="UserID" size="22" maxlength="20" /></td> + </tr>'; /*set the default modules to show to all this had trapped a few people previously*/ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/doc/Change.log 2011-11-21 09:22:06 UTC (rev 4749) @@ -1,5 +1,8 @@ webERP Change Log +21/11/11 Phil: UserSettings.php now checks for at least 5 character passwords WWW_Users.php CustLoginSetup.php and SupplierLoginSetup.php now also check for 4 character userids +21/11/11 Felix Lim: WWW_users.php malfomed <input type="hidden" - with no closing > + 19/11/11 Release 4.06RC3 - 4.06.1 19/11/11 Phil: SupplierAllocations.php fixes for number_formatting Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/includes/DefinePOClass.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -154,6 +154,17 @@ return 0; } + function Any_Lines_On_A_Shipment(){ + /* Checks if any of the line items are on a shipment */ + if (count($this->LineItems)>0){ + foreach ($this->LineItems as $OrderedItems) { + if ($OrderedItems->ShiptRef !=''){ + return $OrderedItems->ShiptRef; + } + } + } + return 0; + } function Some_Already_Received($LineNo){ /* Checks if there have been deliveries or amounts invoiced against a specific line item */ if (count($this->LineItems)>0 and isset($this->LineItems[$LineNo])){ Modified: trunk/includes/DefineShiptClass.php =================================================================== --- trunk/includes/DefineShiptClass.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/includes/DefineShiptClass.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -4,17 +4,17 @@ Class Shipment { - Var $ShiptRef; /*unqique identifier for the shipment */ - + var $ShiptRef; /*unqique identifier for the shipment */ var $LineItems; /*array of objects of class LineDetails using the product id as the pointer */ - Var $SupplierID; + var $SupplierID; var $SupplierName; var $CurrCode; var $VoyageRef; - Var $Vessel; - Var $ETA; - Var $StockLocation; - Var $Closed; + var $Vessel; + var $ETA; + var $StockLocation; + var $Closed; + var $CurrDecimalPlaces; function Shipment(){ /*Constructor function initialises a new Shipment object */ @@ -23,20 +23,32 @@ $this->Closed =0; } - function add_to_shipment($PODetailItem, - $OrderNo, - $StockID, - $ItemDescr, - $QtyInvoiced, - $UnitPrice, - $UOM, - $DelDate, - $QuantityOrd, - $QuantityRecd, - $StdCostUnit, - &$db){ + function Add_To_Shipment($PODetailItem, + $OrderNo, + $StockID, + $ItemDescr, + $QtyInvoiced, + $UnitPrice, + $UOM, + $DelDate, + $QuantityOrd, + $QuantityRecd, + $StdCostUnit, + $DecimalPlaces, + &$db){ - $this->LineItems[$PODetailItem]= new LineDetails($PODetailItem,$OrderNo,$StockID,$ItemDescr, $QtyInvoiced, $UnitPrice, $UOM, $DelDate, $QuantityOrd, $QuantityRecd, $StdCostUnit); + $this->LineItems[$PODetailItem]= new LineDetails($PODetailItem, + $OrderNo, + $StockID, + $ItemDescr, + $QtyInvoiced, + $UnitPrice, + $UOM, + $DelDate, + $QuantityOrd, + $QuantityRecd, + $StdCostUnit, + $DecimalPlaces); $sql = "UPDATE purchorderdetails SET shiptref = '" . $this->ShiptRef . "' WHERE podetailitem = '" . $PODetailItem . "'"; @@ -47,7 +59,7 @@ } - function remove_from_shipment($PODetailItem,&$db){ + function Remove_From_Shipment($PODetailItem,&$db){ if ($this->LineItems[$PODetailItem]->QtyInvoiced==0){ @@ -63,20 +75,32 @@ Class LineDetails { - Var $PODetailItem; - Var $OrderNo; - Var $StockID; - Var $ItemDescription; - Var $QtyInvoiced; - Var $UnitPrice; - Var $UOM; - Var $DelDate; - Var $QuantityOrd; - Var $QuantityRecd; - Var $StdCostUnit; + var $PODetailItem; + var $OrderNo; + var $StockID; + var $ItemDescription; + var $QtyInvoiced; + var $UnitPrice; + var $UOM; + var $DelDate; + var $QuantityOrd; + var $QuantityRecd; + var $StdCostUnit; + var $DecimalPlaces; - function LineDetails ($PODetailItem, $OrderNo, $StockID, $ItemDescr, $QtyInvoiced, $UnitPrice, $UOM, $DelDate, $QuantityOrd, $QuantityRecd, $StdCostUnit){ + function LineDetails ($PODetailItem, + $OrderNo, + $StockID, + $ItemDescr, + $QtyInvoiced, + $UnitPrice, + $UOM, + $DelDate, + $QuantityOrd, + $QuantityRecd, + $StdCostUnit, + $DecimalPlaces=2){ /* Constructor function to add a new LineDetail object with passed params */ $this->PODetailItem = $PODetailItem; @@ -90,6 +114,7 @@ $this->QuantityRecd = $QuantityRecd; $this->QuantityOrd = $QuantityOrd; $this->StdCostUnit = $StdCostUnit; + $this->DecimalPlaces = $DecimalPlaces; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-21 09:22:13
|
Revision: 4749 http://web-erp.svn.sourceforge.net/web-erp/?rev=4749&view=rev Author: daintree Date: 2011-11-21 09:22:06 +0000 (Mon, 21 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/CustLoginSetup.php trunk/DiscountMatrix.php trunk/GoodsReceived.php trunk/PO_Header.php trunk/Shipments.php trunk/SuppLoginSetup.php trunk/UserSettings.php trunk/WWW_Users.php trunk/doc/Change.log trunk/includes/DefinePOClass.php trunk/includes/DefineShiptClass.php Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/CustLoginSetup.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -43,7 +43,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (mb_strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<4){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID']) OR mb_strstr($_POST['UserID'],' ')) { Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/DiscountMatrix.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -138,7 +138,7 @@ </table> <br /> <div class="centre"> - <input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"> + <input tabindex="5" type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> <br />'; @@ -155,7 +155,7 @@ $result = DB_query($sql,$db); -echo '<table class=selection>'; +echo '<table class="selection">'; echo '<tr> <th>' . _('Sales Type') . '</th> <th>' . _('Discount Category') . '</th> Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/GoodsReceived.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -154,7 +154,8 @@ //Now Display LineItem - echo '<td>' . $LnItm->StockID . '</td> + + echo '<td><a href="' . $rootpath . '/' . $_SESSION['part_pics_dir'] . '/' . $StockID . '.jpg" target="_blank">'. $LnItm->StockID . '</a></td> <td>' . $LnItm->ItemDescription . '</td> <td class="number">' . $DisplaySupplierQtyOrd . '</td> <td>' . $LnItm->SuppliersUnit . '</td> Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/PO_Header.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -106,6 +106,11 @@ _('Prices cannot be altered for lines that have already been received') .' '. _('and quantities cannot be reduced below the quantity already received'),'warn'); } + $ShipmentExists = $_SESSION['PO'.$identifier]->Any_Lines_On_A_Shipment(); + if ($ShipmentExists != false){ + $OKToUpdateStatus = 0; //not ok to update the status + prnMsg( _('This order cannot be cancelled or rejected because there is at least one line that is allocated to a shipment') . '. ' . _('See shipment number') . ' ' . $ShipmentExists,'warn'); + } } if ($OKToUpdateStatus==1){ // none of the order has been received if ($AuthorityLevel>$OrderTotal) { Modified: trunk/Shipments.php =================================================================== --- trunk/Shipments.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/Shipments.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -84,18 +84,18 @@ $LineItemsSQL = "SELECT purchorderdetails.podetailitem, purchorders.orderno, - purchorderdetails.itemcode, - purchorderdetails.itemdescription, - purchorderdetails.deliverydate, - purchorderdetails.glcode, - purchorderdetails.qtyinvoiced, - purchorderdetails.unitprice, - stockmaster.units, - purchorderdetails.quantityord, - purchorderdetails.quantityrecd, - purchorderdetails.stdcostunit, - stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, - purchorders.intostocklocation + purchorderdetails.itemcode, + purchorderdetails.itemdescription, + purchorderdetails.deliverydate, + purchorderdetails.glcode, + purchorderdetails.qtyinvoiced, + purchorderdetails.unitprice, + stockmaster.units, + purchorderdetails.quantityord, + purchorderdetails.quantityrecd, + purchorderdetails.stdcostunit, + stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, + purchorders.intostocklocation FROM purchorderdetails INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid INNER JOIN purchorders @@ -120,17 +120,18 @@ $StandardCost =$myrow['stdcostunit']; } - $_SESSION['Shipment']->LineItems[$myrow['podetailitem']] = new LineDetails($myrow['podetailitem'], - $myrow['orderno'], - $myrow['itemcode'], - $myrow['itemdescription'], - $myrow['qtyinvoiced'], - $myrow['unitprice'], - $myrow['units'], - $myrow['deliverydate'], - $myrow['quantityord'], - $myrow['quantityrecd'], - $StandardCost); + $_SESSION['Shipment']->LineItems[$myrow['podetailitem']] = new LineDetails( + $myrow['podetailitem'], + $myrow['orderno'], + $myrow['itemcode'], + $myrow['itemdescription'], + $myrow['qtyinvoiced'], + $myrow['unitprice'], + $myrow['units'], + $myrow['deliverydate'], + $myrow['quantityord'], + $myrow['quantityrecd'], + $StandardCost); } /* line Shipment from shipment details */ DB_data_Seek($LineItemsResult,0); @@ -147,28 +148,31 @@ $_SESSION['Shipment'] = new Shipment; $sql = "SELECT suppname, - currcode - FROM suppliers + currcode, + decimalplaces AS currdecimalplaces + FROM suppliers INNER JOIN currencies + ON suppliers.currcode=currencies.currabrev WHERE supplierid='" . $_SESSION['SupplierID'] . "'"; $ErrMsg = _('The supplier details for the shipment could not be retrieved because'); $result = DB_query($sql,$db,$ErrMsg); - $myrow = DB_fetch_row($result); + $myrow = DB_fetch_array($result); $_SESSION['Shipment']->SupplierID = $_SESSION['SupplierID']; - $_SESSION['Shipment']->SupplierName = $myrow[0]; - $_SESSION['Shipment']->CurrCode = $myrow[1]; + $_SESSION['Shipment']->SupplierName = $myrow['suppname']; + $_SESSION['Shipment']->CurrCode = $myrow['currcode']; + $_SESSION['Shipment']->CurrDecimalPlaces = $myrow['currdecimalplaces']; $_SESSION['Shipment']->ShiptRef = GetNextTransNo (31, $db); } -if (isset($_POST['Update']) OR (isset($_GET['Add']) AND $_SESSION['Shipment']->Closed==0)) { //user hit the update button +if (isset($_POST['Update']) + OR (isset($_GET['Add']) + AND $_SESSION['Shipment']->Closed==0)) { //user hit the update button $InputError = 0; if (isset($_POST['Update'])){ - $_SESSION['Shipment']->Vessel = $_POST['Vessel']; - $_SESSION['Shipment']->VoyageRef = $_POST['VoyageRef']; if (!Is_Date($_POST['ETA'])){ $InputError=1; @@ -186,19 +190,24 @@ if (mb_strlen($_POST['VoyageRef'])<2){ prnMsg( _('A reference to the voyage (or HAWB in the case of air-freight) of more than 2 characters is expected'), 'error'); } - } elseif(mb_strlen($_SESSION['Shipment']->Vessel)<2 OR mb_strlen($_SESSION['Shipment']->VoyageRef)<2){ + } elseif(mb_strlen($_SESSION['Shipment']->Vessel)<2 + OR mb_strlen($_SESSION['Shipment']->VoyageRef)<2){ 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; } /*The user hit the update the shipment button and there are some lines on the shipment*/ if ($InputError == 0 AND (count($_SESSION['Shipment']->LineItems) > 0 OR isset($_GET['Add']))){ + + $_SESSION['Shipment']->Vessel = $_POST['Vessel']; + $_SESSION['Shipment']->VoyageRef = $_POST['VoyageRef']; + $sql = "SELECT shiptref FROM shipments WHERE shiptref =" . $_SESSION['Shipment']->ShiptRef; $result = DB_query($sql,$db); if (DB_num_rows($result)==1){ $sql = "UPDATE shipments SET vessel='" . $_SESSION['Shipment']->Vessel . "', - voyageref='". $_SESSION['Shipment']->VoyageRef . "', - eta='" . $_SESSION['Shipment']->ETA . "' + voyageref='". $_SESSION['Shipment']->VoyageRef . "', + eta='" . $_SESSION['Shipment']->ETA . "' WHERE shiptref ='" . $_SESSION['Shipment']->ShiptRef . "'"; } else { @@ -225,12 +234,11 @@ $sql = "UPDATE purchorderdetails SET deliverydate ='" . $_SESSION['Shipment']->ETA . "' - WHERE podetailitem='" . $LnItm->PODetailItem . "'"; + WHERE podetailitem='" . $LnItm->PODetailItem . "'"; $result = DB_query($sql,$db); $_SESSION['Shipment']->LineItems[$LnItm->PODetailItem]->DelDate = $_SESSION['Shipment']->ETA; - } } prnMsg( _('Updated the shipment record and delivery dates of order lines as necessary'), 'success'); @@ -239,23 +247,25 @@ } //user hit Update -if (isset($_GET['Add']) AND $_SESSION['Shipment']->Closed==0 AND $InputError==0){ +if (isset($_GET['Add']) + AND $_SESSION['Shipment']->Closed==0 + AND $InputError==0){ $sql = "SELECT purchorderdetails.orderno, - purchorderdetails.itemcode, - purchorderdetails.itemdescription, - purchorderdetails.unitprice, - purchorderdetails.stdcostunit, - stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, - purchorderdetails.quantityord, - purchorderdetails.quantityrecd, - purchorderdetails.deliverydate, - stockmaster.units, - stockmaster.decimalplaces, - purchorderdetails.qtyinvoiced - FROM purchorderdetails INNER JOIN stockmaster + purchorderdetails.itemcode, + purchorderdetails.itemdescription, + purchorderdetails.unitprice, + purchorderdetails.stdcostunit, + stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, + purchorderdetails.quantityord, + purchorderdetails.quantityrecd, + purchorderdetails.deliverydate, + stockmaster.units, + stockmaster.decimalplaces, + purchorderdetails.qtyinvoiced + FROM purchorderdetails INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid - WHERE purchorderdetails.podetailitem='" . $_GET['Add'] . "'"; + WHERE purchorderdetails.podetailitem='" . $_GET['Add'] . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_array($result); @@ -268,7 +278,7 @@ $StandardCost = $myrow['stdcostunit']; } - $_SESSION['Shipment']->add_to_shipment($_GET['Add'], + $_SESSION['Shipment']->Add_To_Shipment($_GET['Add'], $myrow['orderno'], $myrow['itemcode'], $myrow['itemdescription'], @@ -283,7 +293,7 @@ } if (isset($_GET['Delete']) AND $_SESSION['Shipment']->Closed==0){ //shipment is open and user hit delete on a line - $_SESSION['Shipment']->remove_from_shipment($_GET['Delete'],$db); + $_SESSION['Shipment']->Remove_From_Shipment($_GET['Delete'],$db); } @@ -315,24 +325,24 @@ if (isset($_SESSION['Shipment']->ETA)) { echo '<td><input type="text class="date" alt='.$_SESSION['DefaultDateFormat'].' name="ETA" 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').' '; if (count($_SESSION['Shipment']->LineItems)>0){ - if (!isset($_SESSION['Shipment']->StockLocation)){ + if (!isset($_SESSION['Shipment']->StockLocation)){ - $sql = "SELECT purchorders.intostocklocation - FROM purchorders INNER JOIN purchorderdetails - ON purchorders.orderno=purchorderdetails.orderno and podetailitem = '" . key($_SESSION['Shipment']->LineItems) . "'"; + $sql = "SELECT purchorders.intostocklocation + FROM purchorders INNER JOIN purchorderdetails + ON purchorders.orderno=purchorderdetails.orderno AND podetailitem = '" . key($_SESSION['Shipment']->LineItems) . "'"; + + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + + $_SESSION['Shipment']->StockLocation = $myrow[0]; + $_POST['StockLocation']=$_SESSION['Shipment']->StockLocation; - $result = DB_query($sql,$db); - $myrow = DB_fetch_row($result); - - $_SESSION['Shipment']->StockLocation = $myrow[0]; - $_POST['StockLocation']=$_SESSION['Shipment']->StockLocation; - } else { $_POST['StockLocation']=$_SESSION['Shipment']->StockLocation; @@ -373,7 +383,7 @@ $sql = "SELECT locationname FROM locations WHERE loccode='" . $_SESSION['Shipment']->StockLocation . "'"; $resultStkLocs = DB_query($sql,$db); $myrow=DB_fetch_array($resultStkLocs); - echo '<input type=hidden name=StockLocation value='.$_SESSION['Shipment']->StockLocation.'>'; + echo '<input type="hidden" name="StockLocation" value="'.$_SESSION['Shipment']->StockLocation.'" />'; echo $myrow['locationname']; } @@ -382,18 +392,19 @@ if (count($_SESSION['Shipment']->LineItems)>0){ /* Always display all shipment lines */ - echo '<br /><table cellpadding=2 colspan=7 class="selection">'; + echo '<br /><table class="selection">'; echo '<tr><th colspan="9"><font color="navy" size="3">'. _('Order Lines On This Shipment'). '</font></th></tr>'; $TableHeader = '<tr> - <th>'. _('Order'). '</th> - <th>'. _('Item'). '</th> - <th>'. _('Quantity'). '<br />'. _('Ordered'). '</th> - <th>'. _('Units'). '</th> - <th>'. _('Quantity').'<br />'. _('Received'). '</th> - <th>'. _('Quantity').'<br />'. _('Invoiced'). '</th> - <th>'. $_SESSION['Shipment']->CurrCode .' '. _('Price') . '</th> - <th>'. _('Current'). '<br />'. _('Std Cost'). '</th></tr>'; + <th>'. _('Order'). '</th> + <th>'. _('Item'). '</th> + <th>'. _('Quantity'). '<br />'. _('Ordered'). '</th> + <th>'. _('Units'). '</th> + <th>'. _('Quantity').'<br />'. _('Received'). '</th> + <th>'. _('Quantity').'<br />'. _('Invoiced'). '</th> + <th>'. $_SESSION['Shipment']->CurrCode .' '. _('Price') . '</th> + <th>'. _('Current'). '<br />'. _('Std Cost'). '</th> + </tr>'; echo $TableHeader; @@ -420,12 +431,12 @@ echo '<td>'.$LnItm->OrderNo.'</td> - <td>'. $LnItm->StockID .' - '. $LnItm->ItemDescription. '</td><td class="number">' . locale_number_format($LnItm->QuantityOrd,2) . '</td> + <td>'. $LnItm->StockID .' - '. $LnItm->ItemDescription. '</td><td class="number">' . locale_number_format($LnItm->QuantityOrd,$LnItm->DecimalPlaces) . '</td> <td>'. $LnItm->UOM .'</td> - <td class="number">' . locale_number_format($LnItm->QuantityRecd,2) . '</td> - <td class="number">' . locale_number_format($LnItm->QtyInvoiced,2) . '</td> - <td class="number">' . locale_number_format($LnItm->UnitPrice,2) . '</td> - <td class="number">' . locale_number_format($LnItm->StdCostUnit,2) . '</td> + <td class="number">' . locale_number_format($LnItm->QuantityRecd,$LnItm->DecimalPlaces) . '</td> + <td class="number">' . locale_number_format($LnItm->QtyInvoiced,$LnItm->DecimalPlaces) . '</td> + <td class="number">' . locale_number_format($LnItm->UnitPrice, $_SESSION['Shipment']->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($LnItm->StdCostUnit,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $LnItm->PODetailItem . '">'. _('Delete'). '</a></td> </tr>'; }//for each line on the shipment @@ -442,39 +453,43 @@ } $sql = "SELECT purchorderdetails.podetailitem, - purchorders.orderno, - purchorderdetails.itemcode, - purchorderdetails.itemdescription, - purchorderdetails.unitprice, - purchorderdetails.quantityord, - purchorderdetails.quantityrecd, - purchorderdetails.deliverydate, - stockmaster.units, - stockmaster.decimalplaces - FROM purchorderdetails INNER JOIN purchorders - ON purchorderdetails.orderno=purchorders.orderno - INNER JOIN stockmaster + purchorders.orderno, + purchorderdetails.itemcode, + purchorderdetails.itemdescription, + purchorderdetails.unitprice, + purchorderdetails.quantityord, + purchorderdetails.quantityrecd, + purchorderdetails.deliverydate, + stockmaster.units, + stockmaster.decimalplaces + FROM purchorderdetails INNER JOIN purchorders + ON purchorderdetails.orderno=purchorders.orderno + INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid - WHERE qtyinvoiced=0 - AND purchorders.supplierno ='" . $_SESSION['Shipment']->SupplierID . "' - AND purchorderdetails.shiptref=0 - AND purchorders.intostocklocation='" . $_POST['StockLocation'] . "'"; + WHERE qtyinvoiced=0 + AND purchorderdetails.completed=0 + AND purchorders.status='Authorised' + AND purchorders.supplierno ='" . $_SESSION['Shipment']->SupplierID . "' + AND purchorderdetails.shiptref=0 + AND purchorders.intostocklocation='" . $_POST['StockLocation'] . "'"; $result = DB_query($sql,$db); if (DB_num_rows($result)>0){ echo '<table cellpadding="2" colspan="7" class="selection">'; - echo '<tr><th colspan="7"><font color="navy" size="3">'. _('Possible Order Lines To Add To This Shipment').'</font></th></tr>'; + echo '<tr> + <th colspan="7"><font color="navy" size="3">'. _('Possible Order Lines To Add To This Shipment').'</font></th> + </tr>'; $TableHeader = '<tr> - <th>'. _('Order').'</th> - <th>'. _('Item').'</th> - <th>'. _('Quantity').'<br />'. _('Ordered').'</th> - <th>'. _('Units').'</th> - <th>'. _('Quantity').'<br />'. _('Received').'</th> - <th>'. _('Delivery').'<br />'. _('Date').'</th> - </tr>'; + <th>'. _('Order').'</th> + <th>'. _('Item').'</th> + <th>'. _('Quantity').'<br />'. _('Ordered').'</th> + <th>'. _('Units').'</th> + <th>'. _('Quantity').'<br />'. _('Received').'</th> + <th>'. _('Delivery').'<br />'. _('Date').'</th> + </tr>'; echo $TableHeader; @@ -500,12 +515,12 @@ } echo '<td>' . $myrow['orderno'] . '</td> - <td>' . $myrow['itemcode'] . ' - ' . $myrow['itemdescription'] . '</td> - <td class="number">' . locale_number_format($myrow['quantityord'],$myrow['decimalplaces']) . '</td> - <td>' . $myrow['units'] . '</td> - <td class="number">' . locale_number_format($myrow['quantityrecd'],,$myrow['decimalplaces']) . '</td> - <td class="number">' . ConvertSQLDate($myrow['deliverydate']) . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . 'Add=' . $myrow['podetailitem'] . '">'. _('Add').'</a></td> + <td>' . $myrow['itemcode'] . ' - ' . $myrow['itemdescription'] . '</td> + <td class="number">' . locale_number_format($myrow['quantityord'],$myrow['decimalplaces']) . '</td> + <td>' . $myrow['units'] . '</td> + <td class="number">' . locale_number_format($myrow['quantityrecd'],$myrow['decimalplaces']) . '</td> + <td class="number">' . ConvertSQLDate($myrow['deliverydate']) . '</td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . 'Add=' . $myrow['podetailitem'] . '">'. _('Add').'</a></td> </tr>'; } Modified: trunk/SuppLoginSetup.php =================================================================== --- trunk/SuppLoginSetup.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/SuppLoginSetup.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -43,7 +43,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (mb_strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<4){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID'])) { Modified: trunk/UserSettings.php =================================================================== --- trunk/UserSettings.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/UserSettings.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -34,27 +34,34 @@ prnMsg(_('Cannot change password in the demo or others would be locked out!'),'warn'); } */ - $update_pw = 'N'; - if ($_POST['pass'] != ''){ - if ($_POST['pass'] != $_POST['passcheck']){ + $UpdatePassword = 'N'; + if ($_POST['Password'] != ''){ + if ($_POST['Password'] != $_POST['PasswordCheck']){ $InputError = 1; prnMsg(_('The password and password confirmation fields entered do not match'),'error'); }else{ - $update_pw = 'Y'; + $UpdatePassword = 'Y'; } } - if ($_POST['passcheck'] != ''){ - if ($_POST['pass'] != $_POST['passcheck']){ + if ($_POST['PasswordCheck'] != ''){ + if ($_POST['Password'] != $_POST['PasswordCheck']){ $InputError = 1; prnMsg(_('The password and password confirmation fields entered do not match'),'error'); }else{ - $update_pw = 'Y'; + $UpdatePassword = 'Y'; } } + if (mb_strlen($_POST['Password'])<5){ + $InputError = 1; + prnMsg(_('The password entered must be at least 5 characters long'),'error'); + } elseif (mb_strstr($_POST['Password'],$_SESSION['UserID'])!= False){ + $InputError = 1; + prnMsg(_('The password cannot contain the user id'),'error'); + } if ($InputError != 1) { // no errors - if ($update_pw != 'Y'){ + if ($UpdatePassword != 'Y'){ $sql = "UPDATE www_users SET displayrecordsmax='" . $_POST['DisplayRecordsMax'] . "', theme='" . $_POST['Theme'] . "', @@ -76,7 +83,7 @@ language='" . $_POST['Language'] . "', email='". $_POST['email'] ."', pdflanguage='" . $_POST['PDFLanguage'] . "', - password='" . CryptPass($_POST['pass']) . "' + password='" . CryptPass($_POST['Password']) . "' WHERE userid = '" . $_SESSION['UserID'] . "'"; $ErrMsg = _('The user alterations could not be processed because'); @@ -161,20 +168,20 @@ } } -if (!isset($_POST['passcheck'])) { - $_POST['passcheck']=''; +if (!isset($_POST['PasswordCheck'])) { + $_POST['PasswordCheck']=''; } -if (!isset($_POST['pass'])) { - $_POST['pass']=''; +if (!isset($_POST['Password'])) { + $_POST['Password']=''; } echo '</select></td></tr> <tr> <td>' . _('New Password') . ':</td> - <td><input type="password" name="pass" size=20 value="' . $_POST['pass'] . '"></td> + <td><input type="password" name="Password" size="20" value="' . $_POST['Password'] . '" /></td> </tr> <tr> <td>' . _('Confirm Password') . ':</td> - <td><input type="password" name="passcheck" size="20" value="' . $_POST['passcheck'] . '"></td> + <td><input type="password" name="PasswordCheck" size="20" value="' . $_POST['PasswordCheck'] . '" /></td> </tr> <tr> <td colspan=2 align="center"><i>' . _('If you leave the password boxes empty your password will not change') . '</i></td> @@ -189,7 +196,7 @@ $_POST['email'] = $myrow['email']; } -echo '<td><input type="text" name="email" size=40 value="' . $_POST['email'] . '"></td> +echo '<td><input type="text" name="email" size=40 value="' . $_POST['email'] . '" /></td> </tr>'; if (!isset($_POST['PDFLanguage'])){ Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/WWW_Users.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -60,7 +60,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (mb_strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<4){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID'])) { @@ -391,19 +391,23 @@ $_POST['Blocked'] = $myrow['blocked']; $_POST['PDFLanguage'] = $myrow['pdflanguage']; - echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" /'; + echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" />'; echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '" />'; echo '<input type="hidden" name="ModulesAllowed" value="' . $_POST['ModulesAllowed'] . '" />'; - echo '<table class=selection> <tr><td>' . _('User code') . ':</td><td>'; - echo $_POST['UserID'] . '</td></tr>'; + echo '<table class="selection"> + <tr> + <td>' . _('User code') . ':</td> + <td>' . $_POST['UserID'] . '</td> + </tr>'; } else { //end of if $SelectedUser only do the else when a new record is being entered echo '<table class="selection"> <tr> <td>' . _('User Login') . ':</td> - <td><input type="text" name="UserID" size="22" maxlength="20" /></td></tr>'; + <td><input type="text" name="UserID" size="22" maxlength="20" /></td> + </tr>'; /*set the default modules to show to all this had trapped a few people previously*/ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/doc/Change.log 2011-11-21 09:22:06 UTC (rev 4749) @@ -1,5 +1,8 @@ webERP Change Log +21/11/11 Phil: UserSettings.php now checks for at least 5 character passwords WWW_Users.php CustLoginSetup.php and SupplierLoginSetup.php now also check for 4 character userids +21/11/11 Felix Lim: WWW_users.php malfomed <input type="hidden" - with no closing > + 19/11/11 Release 4.06RC3 - 4.06.1 19/11/11 Phil: SupplierAllocations.php fixes for number_formatting Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/includes/DefinePOClass.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -154,6 +154,17 @@ return 0; } + function Any_Lines_On_A_Shipment(){ + /* Checks if any of the line items are on a shipment */ + if (count($this->LineItems)>0){ + foreach ($this->LineItems as $OrderedItems) { + if ($OrderedItems->ShiptRef !=''){ + return $OrderedItems->ShiptRef; + } + } + } + return 0; + } function Some_Already_Received($LineNo){ /* Checks if there have been deliveries or amounts invoiced against a specific line item */ if (count($this->LineItems)>0 and isset($this->LineItems[$LineNo])){ Modified: trunk/includes/DefineShiptClass.php =================================================================== --- trunk/includes/DefineShiptClass.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/includes/DefineShiptClass.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -4,17 +4,17 @@ Class Shipment { - Var $ShiptRef; /*unqique identifier for the shipment */ - + var $ShiptRef; /*unqique identifier for the shipment */ var $LineItems; /*array of objects of class LineDetails using the product id as the pointer */ - Var $SupplierID; + var $SupplierID; var $SupplierName; var $CurrCode; var $VoyageRef; - Var $Vessel; - Var $ETA; - Var $StockLocation; - Var $Closed; + var $Vessel; + var $ETA; + var $StockLocation; + var $Closed; + var $CurrDecimalPlaces; function Shipment(){ /*Constructor function initialises a new Shipment object */ @@ -23,20 +23,32 @@ $this->Closed =0; } - function add_to_shipment($PODetailItem, - $OrderNo, - $StockID, - $ItemDescr, - $QtyInvoiced, - $UnitPrice, - $UOM, - $DelDate, - $QuantityOrd, - $QuantityRecd, - $StdCostUnit, - &$db){ + function Add_To_Shipment($PODetailItem, + $OrderNo, + $StockID, + $ItemDescr, + $QtyInvoiced, + $UnitPrice, + $UOM, + $DelDate, + $QuantityOrd, + $QuantityRecd, + $StdCostUnit, + $DecimalPlaces, + &$db){ - $this->LineItems[$PODetailItem]= new LineDetails($PODetailItem,$OrderNo,$StockID,$ItemDescr, $QtyInvoiced, $UnitPrice, $UOM, $DelDate, $QuantityOrd, $QuantityRecd, $StdCostUnit); + $this->LineItems[$PODetailItem]= new LineDetails($PODetailItem, + $OrderNo, + $StockID, + $ItemDescr, + $QtyInvoiced, + $UnitPrice, + $UOM, + $DelDate, + $QuantityOrd, + $QuantityRecd, + $StdCostUnit, + $DecimalPlaces); $sql = "UPDATE purchorderdetails SET shiptref = '" . $this->ShiptRef . "' WHERE podetailitem = '" . $PODetailItem . "'"; @@ -47,7 +59,7 @@ } - function remove_from_shipment($PODetailItem,&$db){ + function Remove_From_Shipment($PODetailItem,&$db){ if ($this->LineItems[$PODetailItem]->QtyInvoiced==0){ @@ -63,20 +75,32 @@ Class LineDetails { - Var $PODetailItem; - Var $OrderNo; - Var $StockID; - Var $ItemDescription; - Var $QtyInvoiced; - Var $UnitPrice; - Var $UOM; - Var $DelDate; - Var $QuantityOrd; - Var $QuantityRecd; - Var $StdCostUnit; + var $PODetailItem; + var $OrderNo; + var $StockID; + var $ItemDescription; + var $QtyInvoiced; + var $UnitPrice; + var $UOM; + var $DelDate; + var $QuantityOrd; + var $QuantityRecd; + var $StdCostUnit; + var $DecimalPlaces; - function LineDetails ($PODetailItem, $OrderNo, $StockID, $ItemDescr, $QtyInvoiced, $UnitPrice, $UOM, $DelDate, $QuantityOrd, $QuantityRecd, $StdCostUnit){ + function LineDetails ($PODetailItem, + $OrderNo, + $StockID, + $ItemDescr, + $QtyInvoiced, + $UnitPrice, + $UOM, + $DelDate, + $QuantityOrd, + $QuantityRecd, + $StdCostUnit, + $DecimalPlaces=2){ /* Constructor function to add a new LineDetail object with passed params */ $this->PODetailItem = $PODetailItem; @@ -90,6 +114,7 @@ $this->QuantityRecd = $QuantityRecd; $this->QuantityOrd = $QuantityOrd; $this->StdCostUnit = $StdCostUnit; + $this->DecimalPlaces = $DecimalPlaces; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-19 04:00:31
|
Revision: 4748 http://web-erp.svn.sourceforge.net/web-erp/?rev=4748&view=rev Author: daintree Date: 2011-11-19 04:00:22 +0000 (Sat, 19 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/ConfirmDispatchControlled_Invoice.php trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/CustomerAllocations.php trunk/SelectOrderItems.php trunk/SupplierAllocations.php trunk/SupplierInvoice.php trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/includes/ConnectDB.inc trunk/includes/DefineCartClass.php trunk/includes/InputSerialItemsExisting.php trunk/includes/InputSerialItemsFile.php trunk/includes/MiscFunctions.php trunk/sql/mysql/upgrade4.05-4.06.sql Modified: trunk/ConfirmDispatchControlled_Invoice.php =================================================================== --- trunk/ConfirmDispatchControlled_Invoice.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/ConfirmDispatchControlled_Invoice.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -10,6 +10,14 @@ /* Session started in header.inc for password checking and authorisation level check */ include('includes/header.inc'); + +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other order entry sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + if (isset($_GET['LineNo'])){ $LineNo = (int)$_GET['LineNo']; } elseif (isset($_POST['LineNo'])){ Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/ConfirmDispatch_Invoice.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -13,6 +13,14 @@ include('includes/FreightCalculation.inc'); include('includes/GetSalesTransGLCodes.inc'); + +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other order entry sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + if (!isset($_GET['OrderNumber']) AND !isset($_SESSION['ProcessingOrder'])) { /* This page can only be called with an order number for invoicing*/ echo '<div class="centre"> @@ -25,12 +33,12 @@ exit; } elseif (isset($_GET['OrderNumber']) and $_GET['OrderNumber']>0) { - unset($_SESSION['Items']->LineItems); - unset ($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset ($_SESSION['Items'.$identifier]); $_SESSION['ProcessingOrder']=(int)$_GET['OrderNumber']; $_GET['OrderNumber']=(int)$_GET['OrderNumber']; - $_SESSION['Items'] = new cart; + $_SESSION['Items'.$identifier] = new cart; /*read in all the guff from the selected order into the Items cart */ @@ -81,41 +89,41 @@ $myrow = DB_fetch_array($GetOrdHdrResult); - $_SESSION['Items']->DebtorNo = $myrow['debtorno']; - $_SESSION['Items']->OrderNo = $myrow['orderno']; - $_SESSION['Items']->Branch = $myrow['branchcode']; - $_SESSION['Items']->CustomerName = $myrow['name']; - $_SESSION['Items']->CustRef = $myrow['customerref']; - $_SESSION['Items']->Comments = $myrow['comments']; - $_SESSION['Items']->DefaultSalesType =$myrow['ordertype']; - $_SESSION['Items']->DefaultCurrency = $myrow['currcode']; - $_SESSION['Items']->CurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['Items'.$identifier]->DebtorNo = $myrow['debtorno']; + $_SESSION['Items'.$identifier]->OrderNo = $myrow['orderno']; + $_SESSION['Items'.$identifier]->Branch = $myrow['branchcode']; + $_SESSION['Items'.$identifier]->CustomerName = $myrow['name']; + $_SESSION['Items'.$identifier]->CustRef = $myrow['customerref']; + $_SESSION['Items'.$identifier]->Comments = $myrow['comments']; + $_SESSION['Items'.$identifier]->DefaultSalesType =$myrow['ordertype']; + $_SESSION['Items'.$identifier]->DefaultCurrency = $myrow['currcode']; + $_SESSION['Items'.$identifier]->CurrDecimalPlaces = $myrow['decimalplaces']; $BestShipper = $myrow['shipvia']; - $_SESSION['Items']->ShipVia = $myrow['shipvia']; + $_SESSION['Items'.$identifier]->ShipVia = $myrow['shipvia']; if (is_null($BestShipper)){ $BestShipper=0; } - $_SESSION['Items']->DeliverTo = $myrow['deliverto']; - $_SESSION['Items']->DeliveryDate = ConvertSQLDate($myrow['deliverydate']); - $_SESSION['Items']->BrAdd1 = $myrow['deladd1']; - $_SESSION['Items']->BrAdd2 = $myrow['deladd2']; - $_SESSION['Items']->BrAdd3 = $myrow['deladd3']; - $_SESSION['Items']->BrAdd4 = $myrow['deladd4']; - $_SESSION['Items']->BrAdd5 = $myrow['deladd5']; - $_SESSION['Items']->BrAdd6 = $myrow['deladd6']; - $_SESSION['Items']->PhoneNo = $myrow['contactphone']; - $_SESSION['Items']->Email = $myrow['contactemail']; - $_SESSION['Items']->Location = $myrow['fromstkloc']; - $_SESSION['Items']->FreightCost = $myrow['freightcost']; + $_SESSION['Items'.$identifier]->DeliverTo = $myrow['deliverto']; + $_SESSION['Items'.$identifier]->DeliveryDate = ConvertSQLDate($myrow['deliverydate']); + $_SESSION['Items'.$identifier]->BrAdd1 = $myrow['deladd1']; + $_SESSION['Items'.$identifier]->BrAdd2 = $myrow['deladd2']; + $_SESSION['Items'.$identifier]->BrAdd3 = $myrow['deladd3']; + $_SESSION['Items'.$identifier]->BrAdd4 = $myrow['deladd4']; + $_SESSION['Items'.$identifier]->BrAdd5 = $myrow['deladd5']; + $_SESSION['Items'.$identifier]->BrAdd6 = $myrow['deladd6']; + $_SESSION['Items'.$identifier]->PhoneNo = $myrow['contactphone']; + $_SESSION['Items'.$identifier]->Email = $myrow['contactemail']; + $_SESSION['Items'.$identifier]->Location = $myrow['fromstkloc']; + $_SESSION['Items'.$identifier]->FreightCost = $myrow['freightcost']; $_SESSION['Old_FreightCost'] = $myrow['freightcost']; // $_POST['ChargeFreightCost'] = $_SESSION['Old_FreightCost']; - $_SESSION['Items']->Orig_OrderDate = $myrow['orddate']; + $_SESSION['Items'.$identifier]->Orig_OrderDate = $myrow['orddate']; $_SESSION['CurrencyRate'] = $myrow['currency_rate']; - $_SESSION['Items']->TaxGroup = $myrow['taxgroupid']; - $_SESSION['Items']->DispatchTaxProvince = $myrow['taxprovinceid']; - $_SESSION['Items']->GetFreightTaxes(); - $_SESSION['Items']->SpecialInstructions = $myrow['specialinstructions']; + $_SESSION['Items'.$identifier]->TaxGroup = $myrow['taxgroupid']; + $_SESSION['Items'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid']; + $_SESSION['Items'.$identifier]->GetFreightTaxes(); + $_SESSION['Items'.$identifier]->SpecialInstructions = $myrow['specialinstructions']; DB_free_result($GetOrdHdrResult); @@ -156,7 +164,7 @@ while ($myrow=db_fetch_array($LineItemsResult)) { - $_SESSION['Items']->add_to_cart($myrow['stkcode'], + $_SESSION['Items'.$identifier]->add_to_cart($myrow['stkcode'], $myrow['quantity'], $myrow['description'], $myrow['unitprice'], @@ -183,7 +191,7 @@ /*Calculate the taxes applicable to this line item from the customer branch Tax Group and Item Tax Category */ - $_SESSION['Items']->GetTaxes($myrow['orderlineno']); + $_SESSION['Items'.$identifier]->GetTaxes($myrow['orderlineno']); } /* line items from sales order details */ } else { /* there are no line items that have a quantity to deliver */ @@ -207,29 +215,29 @@ /* if processing, a dispatch page has been called and ${$StkItm->LineNumber} would have been set from the post set all the necessary session variables changed by the POST */ if (isset($_POST['ShipVia'])){ - $_SESSION['Items']->ShipVia = $_POST['ShipVia']; + $_SESSION['Items'.$identifier]->ShipVia = $_POST['ShipVia']; } if (isset($_POST['ChargeFreightCost'])){ - $_SESSION['Items']->FreightCost = filter_number_format($_POST['ChargeFreightCost']); + $_SESSION['Items'.$identifier]->FreightCost = filter_number_format($_POST['ChargeFreightCost']); } - foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { + foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if (isset($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])){ - $_SESSION['Items']->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])/100; + $_SESSION['Items'.$identifier]->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])/100; } } - foreach ($_SESSION['Items']->LineItems as $Itm) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $Itm) { if (sizeOf($Itm->SerialItems) > 0) { - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = 0; //initialise QtyDispatched + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched = 0; //initialise QtyDispatched foreach ($Itm->SerialItems as $SerialItem) { //calculate QtyDispatched from bundle quantities - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; } - } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items']->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyInv)){ - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); + } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyInv)){ + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); } foreach ($Itm->Taxes as $TaxLine) { if (isset($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ - $_SESSION['Items']->LineItems[$Itm->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])/100; + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])/100; } } } //end foreach lineitem @@ -238,23 +246,23 @@ /* Always display dispatch quantities and recalc freight for items being dispatched */ -if ($_SESSION['Items']->SpecialInstructions) { - prnMsg($_SESSION['Items']->SpecialInstructions,'warn'); +if ($_SESSION['Items'.$identifier]->SpecialInstructions) { + prnMsg($_SESSION['Items'.$identifier]->SpecialInstructions,'warn'); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Confirm Invoice') . '" alt="" />' . ' ' . _('Confirm Dispatch and Invoice'). '</p>'; echo '<table class="selection"> <tr> - <th><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items']->DebtorNo.'</b></th> - <th>' . _('Customer Name') . ' :<b> ' . $_SESSION['Items']->CustomerName. '</b></th> + <th><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items'.$identifier]->DebtorNo.'</b></th> + <th>' . _('Customer Name') . ' :<b> ' . $_SESSION['Items'.$identifier]->CustomerName. '</b></th> </tr> <tr> - <th colspan ="2"><b>' . _('Invoice amounts stated in') . ' ' . $_SESSION['Items']->DefaultCurrency . '</b></th> + <th colspan ="2"><b>' . _('Invoice amounts stated in') . ' ' . $_SESSION['Items'.$identifier]->DefaultCurrency . '</b></th> </tr> </table> <br />'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*************************************************************** @@ -277,9 +285,9 @@ <th>' . _('Total') . '<br />' . _('Incl Tax') . '</th> </tr>'; -$_SESSION['Items']->total = 0; -$_SESSION['Items']->totalVolume = 0; -$_SESSION['Items']->totalWeight = 0; +$_SESSION['Items'.$identifier]->total = 0; +$_SESSION['Items'.$identifier]->totalVolume = 0; +$_SESSION['Items'.$identifier]->totalWeight = 0; $TaxTotals = array(); $TaxGLCodes = array(); $TaxTotal =0; @@ -288,7 +296,7 @@ $k=0; //row colour counter $j=0; -foreach ($_SESSION['Items']->LineItems as $LnItm) { +foreach ($_SESSION['Items'.$identifier]->LineItems as $LnItm) { $j++; if ($k==1){ $RowStarter = '<tr class="EvenTableRows">'; @@ -300,9 +308,9 @@ $LineTotal = $LnItm->QtyDispatched * $LnItm->Price * (1 - $LnItm->DiscountPercent); - $_SESSION['Items']->total += $LineTotal; - $_SESSION['Items']->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume); - $_SESSION['Items']->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight); + $_SESSION['Items'.$identifier]->total += $LineTotal; + $_SESSION['Items'.$identifier]->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume); + $_SESSION['Items'.$identifier]->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight); echo '<td>'.$LnItm->StockID.'</td> <td>'.$LnItm->ItemDescription.'</td> @@ -315,7 +323,7 @@ if (isset($_POST['ProcessInvoice'])) { echo '<td class="number">' . locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</td>'; } else { - echo '<td class="number"><input type=hidden name="' . $LnItm->LineNumber . '_QtyDispatched" value="' . $LnItm->QtyDispatched . '"><a href="' . $rootpath .'/ConfirmDispatchControlled_Invoice.php?LineNo='. $LnItm->LineNumber.'">' .locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</a></td>'; + echo '<td class="number"><input type=hidden name="' . $LnItm->LineNumber . '_QtyDispatched" value="' . $LnItm->QtyDispatched . '"><a href="' . $rootpath .'/ConfirmDispatchControlled_Invoice.php?identifier=' . $identifier . '&LineNo='. $LnItm->LineNumber.'">' .locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</a></td>'; } } else { if (isset($_POST['ProcessInvoice'])) { @@ -325,8 +333,8 @@ } } $DisplayDiscountPercent = locale_number_format($LnItm->DiscountPercent*100,2) . '%'; - $DisplayLineNetTotal = locale_number_format($LineTotal,$_SESSION['Items']->CurrDecimalPlaces); - $DisplayPrice = locale_number_format($LnItm->Price,$_SESSION['Items']->CurrDecimalPlaces); + $DisplayLineNetTotal = locale_number_format($LineTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); + $DisplayPrice = locale_number_format($LnItm->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); echo '<td class="number">'.$DisplayPrice.'</td> <td class="number">'.$DisplayDiscountPercent.'</td> <td class="number">'.$DisplayLineNetTotal.'</td>'; @@ -334,7 +342,7 @@ /*Need to list the taxes applicable to this line */ echo '<td>'; $i=0; - foreach ($_SESSION['Items']->LineItems[$LnItm->LineNumber]->Taxes AS $Tax) { + foreach ($_SESSION['Items'.$identifier]->LineItems[$LnItm->LineNumber]->Taxes AS $Tax) { if ($i>0){ echo '<br />'; } @@ -374,9 +382,9 @@ $TaxTotal += $TaxLineTotal; - $DisplayTaxAmount = locale_number_format($TaxLineTotal ,$_SESSION['Items']->CurrDecimalPlaces); + $DisplayTaxAmount = locale_number_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); - $DisplayGrossLineTotal = locale_number_format($LineTotal+ $TaxLineTotal,$_SESSION['Items']->CurrDecimalPlaces); + $DisplayGrossLineTotal = locale_number_format($LineTotal+ $TaxLineTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); echo '<td class="number">'.$DisplayTaxAmount.'</td> <td class="number">'.$DisplayGrossLineTotal.'</td>'; @@ -404,16 +412,16 @@ It seems unfair to charge the customer twice for freight if the order was not fully delivered the first time ?? */ -if(!isset($_SESSION['Items']->FreightCost)) { +if(!isset($_SESSION['Items'.$identifier]->FreightCost)) { if ($_SESSION['DoFreightCalc']==True){ - list ($FreightCost, $BestShipper) = CalcFreightCost($_SESSION['Items']->total, - $_SESSION['Items']->BrAdd2, - $_SESSION['Items']->BrAdd3, - $_SESSION['Items']->totalVolume, - $_SESSION['Items']->totalWeight, - $_SESSION['Items']->Location, + list ($FreightCost, $BestShipper) = CalcFreightCost($_SESSION['Items'.$identifier]->total, + $_SESSION['Items'.$identifier]->BrAdd2, + $_SESSION['Items'.$identifier]->BrAdd3, + $_SESSION['Items'.$identifier]->totalVolume, + $_SESSION['Items'.$identifier]->totalWeight, + $_SESSION['Items'.$identifier]->Location, $db); - $_SESSION['Items']->ShipVia = $BestShipper; + $_SESSION['Items'.$identifier]->ShipVia = $BestShipper; } if (is_numeric($FreightCost)){ $FreightCost = $FreightCost / $_SESSION['CurrencyRate']; @@ -447,11 +455,11 @@ echo '<tr> <td colspan="5" class="number">' . _('Order Freight Cost'). '</td> - <td class="number">' . locale_number_format($_SESSION['Old_FreightCost'],$_SESSION['Items']->CurrDecimalPlaces) . '</td>'; + <td class="number">' . locale_number_format($_SESSION['Old_FreightCost'],$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; if ($_SESSION['DoFreightCalc']==True){ echo '<td colspan="2" class="number">' ._('Recalculated Freight Cost'). '</td> - <td class="number">' . locale_number_format($FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '</td>'; + <td class="number">' . locale_number_format($FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; } else { // echo '<td colspan="1"></td>'; } @@ -459,18 +467,18 @@ if (!isset($_POST['ChargeFreightCost'])) { $_POST['ChargeFreightCost']=0; } -if ($_SESSION['Items']->Any_Already_Delivered()==1 and (!isset($_SESSION['Items']->FreightCost) or $_POST['ChargeFreightCost']==0)) { +if ($_SESSION['Items'.$identifier]->Any_Already_Delivered()==1 and (!isset($_SESSION['Items'.$identifier]->FreightCost) or $_POST['ChargeFreightCost']==0)) { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td> <td><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0"></td>'; - $_SESSION['Items']->FreightCost=0; + $_SESSION['Items'.$identifier]->FreightCost=0; } else { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td>'; if (isset($_POST['ProcessInvoice'])) { - echo '<td class="number">' . locale_number_format($_SESSION['Items']->FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '</td>'; + echo '<td class="number">' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; } else { - echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items']->FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '" /></td>'; + echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td>'; } - $_POST['ChargeFreightCost'] = $_SESSION['Items']->FreightCost; + $_POST['ChargeFreightCost'] = $_SESSION['Items'.$identifier]->FreightCost; } $FreightTaxTotal =0; //initialise tax total @@ -478,7 +486,7 @@ echo '<td>'; $i=0; // initialise the number of taxes iterated through -foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { +foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if ($i>0){ echo '<br />'; } @@ -489,7 +497,7 @@ echo '</td><td class="number">'; $i=0; -foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { +foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if ($i>0){ echo '<br />'; } @@ -498,41 +506,41 @@ echo $FreightTaxLine->TaxRate * 100 ; } else { echo '<input type="text" class="number" name="FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . - '" maxlength="4" size="4" value="' . locale_number_format($FreightTaxLine->TaxRate * 100,$_SESSION['Items']->CurrDecimalPlaces) . '" />'; + '" maxlength="4" size="4" value="' . locale_number_format($FreightTaxLine->TaxRate * 100,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" />'; } if ($FreightTaxLine->TaxOnTax ==1){ - $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['Items']->FreightCost + $FreightTaxTotal)); - $FreightTaxTotal += ($FreightTaxLine->TaxRate * ($_SESSION['Items']->FreightCost + $FreightTaxTotal)); + $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['Items'.$identifier]->FreightCost + $FreightTaxTotal)); + $FreightTaxTotal += ($FreightTaxLine->TaxRate * ($_SESSION['Items'.$identifier]->FreightCost + $FreightTaxTotal)); } else { - $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * $_SESSION['Items']->FreightCost); - $FreightTaxTotal += ($FreightTaxLine->TaxRate * $_SESSION['Items']->FreightCost); + $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * $_SESSION['Items'.$identifier]->FreightCost); + $FreightTaxTotal += ($FreightTaxLine->TaxRate * $_SESSION['Items'.$identifier]->FreightCost); } $i++; $TaxGLCodes[$FreightTaxLine->TaxAuthID] = $FreightTaxLine->TaxGLCode; } echo '</td>'; -echo '<td class="number">' . locale_number_format($FreightTaxTotal,$_SESSION['Items']->CurrDecimalPlaces) . '</td> - <td class="number">' . locale_number_format($FreightTaxTotal+ $_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces) . '</td> +echo '<td class="number">' . locale_number_format($FreightTaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($FreightTaxTotal+ $_POST['ChargeFreightCost'],$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> </tr>'; $TaxTotal += $FreightTaxTotal; -$DisplaySubTotal = locale_number_format(($_SESSION['Items']->total + $_POST['ChargeFreightCost']),$_SESSION['Items']->CurrDecimalPlaces); +$DisplaySubTotal = locale_number_format(($_SESSION['Items'.$identifier]->total + $_POST['ChargeFreightCost']),$_SESSION['Items'.$identifier]->CurrDecimalPlaces); /* round the totals to avoid silly entries */ -$TaxTotal = round($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces); -$_SESSION['Items']->total = round($_SESSION['Items']->total,$_SESSION['Items']->CurrDecimalPlaces); -$_POST['ChargeFreightCost'] = round($_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces); +$TaxTotal = round($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); +$_SESSION['Items'.$identifier]->total = round($_SESSION['Items'.$identifier]->total,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); +$_POST['ChargeFreightCost'] = round($_POST['ChargeFreightCost'],$_SESSION['Items'.$identifier]->CurrDecimalPlaces); echo '<tr> <td colspan="10" class="number">' . _('Invoice Totals'). '</td> <td class="number:><hr><b>'.$DisplaySubTotal.'</b><hr></td> <td colspan="2"></td> - <td class="number"><hr><b>' . locale_number_format($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces) . '</b><hr></td> - <td class="number"><hr><b>' . locale_number_format($TaxTotal+($_SESSION['Items']->total + $_POST['ChargeFreightCost']),$_SESSION['Items']->CurrDecimalPlaces) . '</b><hr></td> + <td class="number"><hr><b>' . locale_number_format($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</b><hr></td> + <td class="number"><hr><b>' . locale_number_format($TaxTotal+($_SESSION['Items'.$identifier]->total + $_POST['ChargeFreightCost']),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</b><hr></td> </tr>'; if (! isset($_POST['DispatchDate']) OR ! Is_Date($_POST['DispatchDate'])){ @@ -552,7 +560,7 @@ $QuantityInvoicedIsPositive = false; - foreach ($_SESSION['Items']->LineItems as $OrderLine) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { if ($OrderLine->QtyDispatched > 0){ $QuantityInvoicedIsPositive =true; } @@ -566,7 +574,7 @@ if ($_SESSION['ProhibitNegativeStock']==1){ // checks for negative stock after processing invoice //sadly this check does not combine quantities occuring twice on and order and each line is considered individually :-( $NegativesFound = false; - foreach ($_SESSION['Items']->LineItems as $OrderLine) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { $SQL = "SELECT stockmaster.description, locstock.quantity, stockmaster.mbflag @@ -574,7 +582,7 @@ INNER JOIN stockmaster ON stockmaster.stockid=locstock.stockid WHERE stockmaster.stockid='" . $OrderLine->StockID . "' - AND locstock.loccode='" . $_SESSION['Items']->Location . "'"; + AND locstock.loccode='" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('Could not retrieve the quantity left at the location once this order is invoiced (for the purposes of checking that stock will not go negative because)'); $Result = DB_query($SQL,$db,$ErrMsg); @@ -596,7 +604,7 @@ INNER JOIN stockmaster ON stockmaster.stockid=bom.component WHERE bom.parent='" . $OrderLine->StockID . "' - AND locstock.loccode='" . $_SESSION['Items']->Location . "' + AND locstock.loccode='" . $_SESSION['Items'.$identifier]->Location . "' AND effectiveafter <'" . Date('Y-m-d') . "' AND effectiveto >='" . Date('Y-m-d') . "'"; @@ -627,8 +635,8 @@ $SQL = "SELECT area, defaultshipvia FROM custbranch - WHERE custbranch.debtorno ='". $_SESSION['Items']->DebtorNo . "' - AND custbranch.branchcode = '" . $_SESSION['Items']->Branch . "'"; + WHERE custbranch.debtorno ='". $_SESSION['Items'.$identifier]->DebtorNo . "' + AND custbranch.branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "'"; $ErrMsg = _('We were unable to load Area where the Sale is to from the BRANCHES table') . '. ' . _('Please remedy this'); $Result = DB_query($SQL,$db, $ErrMsg); @@ -658,21 +666,21 @@ $Result = DB_query($SQL,$db); - if (DB_num_rows($Result) != count($_SESSION['Items']->LineItems)){ + if (DB_num_rows($Result) != count($_SESSION['Items'.$identifier]->LineItems)){ /*there should be the same number of items returned from this query as there are lines on the invoice - if not then someone has already invoiced or credited some lines */ if ($debug==1){ echo '<br />'.$SQL; echo '<br />' . _('Number of rows returned by SQL') . ':' . DB_num_rows($Result); - echo '<br />' . _('Count of items in the session') . ' ' . count($_SESSION['Items']->LineItems); + echo '<br />' . _('Count of items in the session') . ' ' . count($_SESSION['Items'.$identifier]->LineItems); } echo '<br />'; prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . '. ' . _('Processing halted') . '. ' . _('To enter and confirm this dispatch') . '/' . _('invoice the order must be re-selected and re-read again to update the changes made by the other user'), 'error'); - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset($_SESSION['Items'.$identifier]); unset($_SESSION['ProcessingOrder']); include('includes/footer.inc'); exit; } @@ -681,10 +689,10 @@ while ($myrow = DB_fetch_array($Result)) { - if ($_SESSION['Items']->LineItems[$myrow['orderlineno']]->Quantity != $myrow['quantity'] - OR $_SESSION['Items']->LineItems[$myrow['orderlineno']]->QtyInv != $myrow['qtyinvoiced']) { + if ($_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->Quantity != $myrow['quantity'] + OR $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->QtyInv != $myrow['qtyinvoiced']) { - echo '<br />'. _('Orig order for'). ' ' . $myrow['orderlineno'] . ' '. _('has a quantity of'). ' ' . $myrow['quantity'] . ' '. _('and an invoiced qty of'). ' ' . $myrow['qtyinvoiced'] . ' '. _('the session shows quantity of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->Quantity . ' ' . _('and quantity invoice of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->QtyInv; + echo '<br />'. _('Orig order for'). ' ' . $myrow['orderlineno'] . ' '. _('has a quantity of'). ' ' . $myrow['quantity'] . ' '. _('and an invoiced qty of'). ' ' . $myrow['qtyinvoiced'] . ' '. _('the session shows quantity of'). ' ' . $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->Quantity . ' ' . _('and quantity invoice of'). ' ' . $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->QtyInv; prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . ' ' . _('Processing halted.') . ' ' . _('To enter and confirm this dispatch, it must be re-selected and re-read again to update the changes made by the other user'), 'error'); @@ -692,8 +700,8 @@ echo '<div class="centre"><a href="'. $rootpath . '/SelectSalesOrder.php">'. _('Select a sales order for confirming deliveries and invoicing'). '</a></div>'; - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset($_SESSION['Items'.$identifier]); unset($_SESSION['ProcessingOrder']); include('includes/footer.inc'); exit; @@ -715,11 +723,11 @@ DB_Txn_Begin($db); - if ($DefaultShipVia != $_SESSION['Items']->ShipVia){ + if ($DefaultShipVia != $_SESSION['Items'.$identifier]->ShipVia){ $SQL = "UPDATE custbranch - SET defaultshipvia ='" . $_SESSION['Items']->ShipVia . "' - WHERE debtorno='" . $_SESSION['Items']->DebtorNo . "' - AND branchcode='" . $_SESSION['Items']->Branch . "'"; + SET defaultshipvia ='" . $_SESSION['Items'.$identifier]->ShipVia . "' + WHERE debtorno='" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND branchcode='" . $_SESSION['Items'.$identifier]->Branch . "'"; $ErrMsg = _('Could not update the default shipping carrier for this branch because'); $DbgMsg = _('The SQL used to update the branch default carrier was'); $result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); @@ -758,20 +766,20 @@ VALUES ( '". $InvoiceNo . "', 10, - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $DefaultDispatchDate . "', '" . date('Y-m-d H-i-s') . "', '" . $PeriodNo . "', '', - '" . $_SESSION['Items']->DefaultSalesType . "', + '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', '" . $_SESSION['ProcessingOrder'] . "', - '" . $_SESSION['Items']->total . "', + '" . $_SESSION['Items'.$identifier]->total . "', '" . $TaxTotal . "', '" . filter_number_format($_POST['ChargeFreightCost']) . "', '" . $_SESSION['CurrencyRate'] . "', '" . $_POST['InvoiceText'] . "', - '" . $_SESSION['Items']->ShipVia . "', + '" . $_SESSION['Items'.$identifier]->ShipVia . "', '" . $_POST['Consignment'] . "' )"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction record could not be inserted because'); @@ -798,7 +806,7 @@ /* If balance of the order cancelled update sales order details quantity. Also insert log records for OrderDeliveryDifferencesLog */ - foreach ($_SESSION['Items']->LineItems as $OrderLine) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { /*Test to see if the item being sold is an asset */ if (mb_substr($OrderLine->StockID,0,6)=='ASSET-'){ @@ -841,8 +849,8 @@ '" . $InvoiceNo . "', '" . $OrderLine->StockID . "', '" . ($OrderLine->Quantity - $OrderLine->QtyDispatched) . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', 'CAN')"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The order delivery differences log record could not be inserted because'); @@ -851,7 +859,7 @@ } } elseif (($OrderLine->Quantity - $OrderLine->QtyDispatched)>0 - AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items']->DeliveryDate,'d')>0) { + AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items'.$identifier]->DeliveryDate,'d')>0) { /*The order is being short delivered after the due date - need to insert a delivery differnce log */ @@ -868,8 +876,8 @@ '" . $InvoiceNo . "', '" . $OrderLine->StockID . "', '" . $OrderLine->Quantity - $OrderLine->QtyDispatched . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', 'BO' )"; @@ -920,7 +928,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $OrderLine->StockID . "' - AND loccode= '" . $_SESSION['Items']->Location . "'"; + AND loccode= '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('WARNING') . ': ' . _('Could not retrieve current location stock'); $Result = DB_query($SQL, $db, $ErrMsg); @@ -935,7 +943,7 @@ $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " WHERE locstock.stockid = '" . $OrderLine->StockID . "' - AND loccode = '" . $_SESSION['Items']->Location . "'"; + AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated because'); $DbgMsg = _('The following SQL to update the location stock record was used'); @@ -967,7 +975,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $AssParts['component'] . "' - AND loccode= '" . $_SESSION['Items']->Location . "'"; + AND loccode= '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Can not retrieve assembly components location stock quantities because '); $DbgMsg = _('The SQL that failed was'); @@ -998,10 +1006,10 @@ VALUES ('" . $AssParts['component'] . "', 10, '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', + '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $PeriodNo . "', '" . _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' . $_SESSION['ProcessingOrder'] . "', '" . -$AssParts['quantity'] * $OrderLine->QtyDispatched . "', @@ -1017,7 +1025,7 @@ $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . ($AssParts['quantity'] * $OrderLine->QtyDispatched) . " WHERE locstock.stockid = '" . $AssParts['component'] . "' - AND loccode = '" . $_SESSION['Items']->Location . "'"; + AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated for an assembly component because'); $DbgMsg = _('The following SQL to update the locations stock record for the component was used'); @@ -1025,7 +1033,7 @@ } /* end of assembly explosion and updates */ /*Update the cart with the recalculated standard cost from the explosion of the assembly's components*/ - $_SESSION['Items']->LineItems[$OrderLine->LineNumber]->StandardCost = $StandardCost; + $_SESSION['Items'.$identifier]->LineItems[$OrderLine->LineNumber]->StandardCost = $StandardCost; $OrderLine->StandardCost = $StandardCost; } /* end of its an assembly */ @@ -1054,10 +1062,10 @@ VALUES ('" . $OrderLine->StockID . "', 10, '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', + '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $_SESSION['ProcessingOrder'] . "', @@ -1088,10 +1096,10 @@ VALUES ('" . $OrderLine->StockID . "', 10, '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', + '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $_SESSION['ProcessingOrder'] . "', @@ -1137,7 +1145,7 @@ $SQL = "UPDATE stockserialitems SET quantity= quantity - " . $Item->BundleQty . " WHERE stockid='" . $OrderLine->StockID . "' - AND loccode='" . $_SESSION['Items']->Location . "' + AND loccode='" . $_SESSION['Items'.$identifier]->Location . "' AND serialno='" . DB_escape_string($Item->BundleRef) . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); @@ -1181,10 +1189,10 @@ AND salesanalysis.custbranch=custbranch.branchcode AND salesanalysis.area=custbranch.area AND salesanalysis.salesperson=custbranch.salesman - AND salesanalysis.typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' + AND salesanalysis.typeabbrev ='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' AND salesanalysis.periodno='" . $PeriodNo . "' - AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items']->DebtorNo . "' - AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items']->Branch . "' + AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items'.$identifier]->Branch . "' AND salesanalysis.stockid " . LIKE . " '" . $OrderLine->StockID . "' AND salesanalysis.budgetoractual=1 GROUP BY salesanalysis.stockid, @@ -1210,10 +1218,10 @@ disc=disc+" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . " WHERE salesanalysis.area='" . $myrow[5] . "' AND salesanalysis.salesperson='" . $myrow[8] . "' - AND typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' + AND typeabbrev ='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' AND periodno = '" . $PeriodNo . "' - AND cust " . LIKE . " '" . $_SESSION['Items']->DebtorNo . "' - AND custbranch " . LIKE . " '" . $_SESSION['Items']->Branch . "' + AND cust " . LIKE . " '" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND custbranch " . LIKE . " '" . $_SESSION['Items'.$identifier]->Branch . "' AND stockid " . LIKE . " '" . $OrderLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[2] . "' AND budgetoractual=1"; @@ -1233,12 +1241,12 @@ budgetoractual, salesperson, stkcategory ) - SELECT '" . $_SESSION['Items']->DefaultSalesType . "', + SELECT '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', '" . $PeriodNo . "', '" . round(($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . ($OrderLine->QtyDispatched) . "', '" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $OrderLine->StockID . "', @@ -1249,8 +1257,8 @@ FROM stockmaster, custbranch WHERE stockmaster.stockid = '" . $OrderLine->StockID . "' - AND custbranch.debtorno = '" . $_SESSION['Items']->DebtorNo . "' - AND custbranch.branchcode='" . $_SESSION['Items']->Branch . "'"; + AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "'"; } $ErrMsg = _('Sales analysis record could not be added or updated because'); @@ -1275,8 +1283,8 @@ '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', - '" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db) . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', + '" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db) . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because'); @@ -1299,7 +1307,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', '" . round((-$OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side of the cost of sales GL posting could not be inserted because'); @@ -1311,7 +1319,7 @@ if (!$IsAsset){ // its a normal stock item //Post sales transaction to GL credit sales - $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db); + $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -1326,7 +1334,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales GL posting could not be inserted because'); @@ -1348,7 +1356,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', '" . round(($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales discount GL posting could not be inserted because'); @@ -1394,7 +1402,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['accumdepnact'] . "', - '" . $_SESSION['Items']->DebtorNo . ' - ' . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . ' - ' . $OrderLine->StockID . ' ' . _('disposal') . "', '" . -$DisposalRow['accumdpen'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of accumulated depreciation GL posting on disposal could not be inserted because'); @@ -1416,7 +1424,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['costact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . -$DisposalRow['cost'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of asset cost on dispoal GL posting could not be inserted because'); @@ -1438,7 +1446,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['disposalact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . ($DisposalRow['cost']-$DisposalRow['accumdepn']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal net book value GL posting could not be inserted because'); @@ -1460,7 +1468,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['disposalact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal proceeds GL posting could not be inserted because'); @@ -1512,7 +1520,7 @@ if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /*Post debtors transaction to GL debit debtors, credit freight re-charged and credit sales */ - if (($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal) !=0) { + if (($_SESSION['Items'.$identifier]->total + $_SESSION['Items'.$identifier]->FreightCost + $TaxTotal) !=0) { $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1526,8 +1534,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . round((($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . round((($_SESSION['Items'.$identifier]->total + $_SESSION['Items'.$identifier]->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the total debtors control GLTrans record was used'); @@ -1536,7 +1544,7 @@ /*Could do with setting up a more flexible freight posting schema that looks at the sales type and area of the customer branch to determine where to post the freight recovery */ - if ($_SESSION['Items']->FreightCost !=0) { + if ($_SESSION['Items'.$identifier]->FreightCost !=0) { $SQL = "INSERT INTO gltrans ( type, typeno, @@ -1551,8 +1559,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['freightact'] . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . round((-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . round((-$_SESSION['Items'.$identifier]->FreightCost/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1573,7 +1581,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $TaxGLCodes[$TaxAuthID] . "', - '" . $_SESSION['Items']->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', '" . round((-$TaxAmount/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); @@ -1589,8 +1597,8 @@ // E N D O F I N V O I C E S Q L P R O C E S S I N G // ************************************************************************* - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset($_SESSION['Items'.$identifier]); unset($_SESSION['ProcessingOrder']); echo prnMsg( _('Invoice number'). ' '. $InvoiceNo .' '. _('processed'), 'success'); @@ -1649,7 +1657,7 @@ echo '<br /> <input type="submit" tabindex="'.$j.'" name="ProcessInvoice" value="'._('Process Invoice').'" /> </div> - <input type="hidden" name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '" />'; + <input type="hidden" name="ShipVia" value="' . $_SESSION['Items'.$identifier]->ShipVia . '" />'; } echo '</form>'; Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/CounterSales.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -488,27 +488,35 @@ if (isset($_POST['Quantity_' . $OrderLine->LineNumber])){ - $Quantity = filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]); + $Quantity = round(filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]),$OrderLine->DecimalPlaces); - if (abs($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){ - $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); - $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100); - } else if (abs($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.001) { - //then do a recalculation of the price at this new GP Percentage - $Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100)); - } else { - $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); - } - $DiscountPercentage = filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]); - if ($_SESSION['AllowOrderLineItemNarrative'] == 1) { - $Narrative = $_POST['Narrative_' . $OrderLine->LineNumber]; - } else { - $Narrative = ''; - } + if (ABS($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){ + /*There is a new price being input for the line item */ + + $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); + $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100); + + } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.01) { + /* A GP % has been input so need to do a recalculation of the price at this new GP Percentage */ + + + prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info'); + + + $Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100)); + } else { + $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); + } + $DiscountPercentage = filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]); + if ($_SESSION['AllowOrderLineItemNarrative'] == 1) { + $Narrative = $_POST['Narrative_' . $OrderLine->LineNumber]; + } else { + $Narrative = ''; + } - if (!isset($OrderLine->DiscountPercent)) { - $OrderLine->DiscountPercent = 0; - } + if (!isset($OrderLine->DiscountPercent)) { + $OrderLine->DiscountPercent = 0; + } if ($Quantity<0 or $Price <0 or $DiscountPercentage >100 or $DiscountPercentage <0){ prnMsg(_('The item could not be updated because you are attempting to set the quantity ordered to less than 0 or the price less than 0 or the discount more than 100% or less than 0%'),'warn'); @@ -871,7 +879,9 @@ $BankAccountsResult = DB_query("SELECT bankaccountname, accountcode FROM bankaccounts",$db); - echo '<tr><td>' . _('Banked to') . ':</td><td><select name="BankAccount">'; + echo '<tr> + <td>' . _('Banked to') . ':</td> + <td><select name="BankAccount">'; while ($BankAccountsRow = DB_fetch_array($BankAccountsResult)){ if (isset($_POST['BankAccount']) AND $_POST['BankAccount'] == $BankAccountsRow['accountcode']){ echo '<option selected="True" value="' . $BankAccountsRow['accountcode'] . '">' . $BankAccountsRow['bankaccountname'] . '</option>'; @@ -879,12 +889,13 @@ echo '<option value="' . $BankAccountsRow['accountcode'] . '">' . $BankAccountsRow['bankaccountname'] . '</option>'; } } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; if (!isset($_POST['AmountPaid'])){ $_POST['AmountPaid'] =0; } - echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . filter_number_format($_POST['AmountPaid']) . '" /></td></tr>'; + echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . $_POST['AmountPaid'] . '" /></td></tr>'; echo '</table>'; //end the sub table in the second column of master table echo '</th></tr></table>'; //end of column/row/master table Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/CustomerAllocations.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -582,17 +582,17 @@ if (!isset($Balance)) { $Balance=0; } - echo '<tr class="OddTableRows"> - <td colspan="7" class="number"><b>' . locale_number_format($Balance,$CurrDecimalPlaces) .'</b></td> - <td><b>' . $CurrCode . '</b></td> - <td><b>' . _('Balance') . '</b></td> - </tr> - </table> - <br />'; - if ($NoOfUnallocatedTrans == 0) { prnMsg(_('There are no allocations to be done'),'info'); + } else { + echo '<tr class="OddTableRows"> + <td colspan="7" class="number"><b>' . locale_number_format($Balance,$CurrDecimalPlaces) .'</b></td> + <td><b>' . $CurrCode . '</b></td> + <td><b>' . _('Balance') . '</b></td> + </tr>'; } + echo '</table> + <br />'; } echo '</td> Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/SelectOrderItems.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -1061,10 +1061,18 @@ $Quantity = round(filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]),$OrderLine->DecimalPlaces); if (ABS($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){ + /*There is a new price being input for the line item */ + $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100); - } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.001) { - //then do a recalculation of the price at this new GP Percentage + + } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.01) { + /* A GP % has been input so need to do a recalculation of the price at this new GP Percentage */ + + + prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info'); + + ... [truncated message content] |
From: <dai...@us...> - 2011-11-19 04:00:31
|
Revision: 4748 http://web-erp.svn.sourceforge.net/web-erp/?rev=4748&view=rev Author: daintree Date: 2011-11-19 04:00:22 +0000 (Sat, 19 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/ConfirmDispatchControlled_Invoice.php trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/CustomerAllocations.php trunk/SelectOrderItems.php trunk/SupplierAllocations.php trunk/SupplierInvoice.php trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/includes/ConnectDB.inc trunk/includes/DefineCartClass.php trunk/includes/InputSerialItemsExisting.php trunk/includes/InputSerialItemsFile.php trunk/includes/MiscFunctions.php trunk/sql/mysql/upgrade4.05-4.06.sql Modified: trunk/ConfirmDispatchControlled_Invoice.php =================================================================== --- trunk/ConfirmDispatchControlled_Invoice.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/ConfirmDispatchControlled_Invoice.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -10,6 +10,14 @@ /* Session started in header.inc for password checking and authorisation level check */ include('includes/header.inc'); + +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other order entry sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + if (isset($_GET['LineNo'])){ $LineNo = (int)$_GET['LineNo']; } elseif (isset($_POST['LineNo'])){ Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/ConfirmDispatch_Invoice.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -13,6 +13,14 @@ include('includes/FreightCalculation.inc'); include('includes/GetSalesTransGLCodes.inc'); + +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other order entry sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + if (!isset($_GET['OrderNumber']) AND !isset($_SESSION['ProcessingOrder'])) { /* This page can only be called with an order number for invoicing*/ echo '<div class="centre"> @@ -25,12 +33,12 @@ exit; } elseif (isset($_GET['OrderNumber']) and $_GET['OrderNumber']>0) { - unset($_SESSION['Items']->LineItems); - unset ($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset ($_SESSION['Items'.$identifier]); $_SESSION['ProcessingOrder']=(int)$_GET['OrderNumber']; $_GET['OrderNumber']=(int)$_GET['OrderNumber']; - $_SESSION['Items'] = new cart; + $_SESSION['Items'.$identifier] = new cart; /*read in all the guff from the selected order into the Items cart */ @@ -81,41 +89,41 @@ $myrow = DB_fetch_array($GetOrdHdrResult); - $_SESSION['Items']->DebtorNo = $myrow['debtorno']; - $_SESSION['Items']->OrderNo = $myrow['orderno']; - $_SESSION['Items']->Branch = $myrow['branchcode']; - $_SESSION['Items']->CustomerName = $myrow['name']; - $_SESSION['Items']->CustRef = $myrow['customerref']; - $_SESSION['Items']->Comments = $myrow['comments']; - $_SESSION['Items']->DefaultSalesType =$myrow['ordertype']; - $_SESSION['Items']->DefaultCurrency = $myrow['currcode']; - $_SESSION['Items']->CurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['Items'.$identifier]->DebtorNo = $myrow['debtorno']; + $_SESSION['Items'.$identifier]->OrderNo = $myrow['orderno']; + $_SESSION['Items'.$identifier]->Branch = $myrow['branchcode']; + $_SESSION['Items'.$identifier]->CustomerName = $myrow['name']; + $_SESSION['Items'.$identifier]->CustRef = $myrow['customerref']; + $_SESSION['Items'.$identifier]->Comments = $myrow['comments']; + $_SESSION['Items'.$identifier]->DefaultSalesType =$myrow['ordertype']; + $_SESSION['Items'.$identifier]->DefaultCurrency = $myrow['currcode']; + $_SESSION['Items'.$identifier]->CurrDecimalPlaces = $myrow['decimalplaces']; $BestShipper = $myrow['shipvia']; - $_SESSION['Items']->ShipVia = $myrow['shipvia']; + $_SESSION['Items'.$identifier]->ShipVia = $myrow['shipvia']; if (is_null($BestShipper)){ $BestShipper=0; } - $_SESSION['Items']->DeliverTo = $myrow['deliverto']; - $_SESSION['Items']->DeliveryDate = ConvertSQLDate($myrow['deliverydate']); - $_SESSION['Items']->BrAdd1 = $myrow['deladd1']; - $_SESSION['Items']->BrAdd2 = $myrow['deladd2']; - $_SESSION['Items']->BrAdd3 = $myrow['deladd3']; - $_SESSION['Items']->BrAdd4 = $myrow['deladd4']; - $_SESSION['Items']->BrAdd5 = $myrow['deladd5']; - $_SESSION['Items']->BrAdd6 = $myrow['deladd6']; - $_SESSION['Items']->PhoneNo = $myrow['contactphone']; - $_SESSION['Items']->Email = $myrow['contactemail']; - $_SESSION['Items']->Location = $myrow['fromstkloc']; - $_SESSION['Items']->FreightCost = $myrow['freightcost']; + $_SESSION['Items'.$identifier]->DeliverTo = $myrow['deliverto']; + $_SESSION['Items'.$identifier]->DeliveryDate = ConvertSQLDate($myrow['deliverydate']); + $_SESSION['Items'.$identifier]->BrAdd1 = $myrow['deladd1']; + $_SESSION['Items'.$identifier]->BrAdd2 = $myrow['deladd2']; + $_SESSION['Items'.$identifier]->BrAdd3 = $myrow['deladd3']; + $_SESSION['Items'.$identifier]->BrAdd4 = $myrow['deladd4']; + $_SESSION['Items'.$identifier]->BrAdd5 = $myrow['deladd5']; + $_SESSION['Items'.$identifier]->BrAdd6 = $myrow['deladd6']; + $_SESSION['Items'.$identifier]->PhoneNo = $myrow['contactphone']; + $_SESSION['Items'.$identifier]->Email = $myrow['contactemail']; + $_SESSION['Items'.$identifier]->Location = $myrow['fromstkloc']; + $_SESSION['Items'.$identifier]->FreightCost = $myrow['freightcost']; $_SESSION['Old_FreightCost'] = $myrow['freightcost']; // $_POST['ChargeFreightCost'] = $_SESSION['Old_FreightCost']; - $_SESSION['Items']->Orig_OrderDate = $myrow['orddate']; + $_SESSION['Items'.$identifier]->Orig_OrderDate = $myrow['orddate']; $_SESSION['CurrencyRate'] = $myrow['currency_rate']; - $_SESSION['Items']->TaxGroup = $myrow['taxgroupid']; - $_SESSION['Items']->DispatchTaxProvince = $myrow['taxprovinceid']; - $_SESSION['Items']->GetFreightTaxes(); - $_SESSION['Items']->SpecialInstructions = $myrow['specialinstructions']; + $_SESSION['Items'.$identifier]->TaxGroup = $myrow['taxgroupid']; + $_SESSION['Items'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid']; + $_SESSION['Items'.$identifier]->GetFreightTaxes(); + $_SESSION['Items'.$identifier]->SpecialInstructions = $myrow['specialinstructions']; DB_free_result($GetOrdHdrResult); @@ -156,7 +164,7 @@ while ($myrow=db_fetch_array($LineItemsResult)) { - $_SESSION['Items']->add_to_cart($myrow['stkcode'], + $_SESSION['Items'.$identifier]->add_to_cart($myrow['stkcode'], $myrow['quantity'], $myrow['description'], $myrow['unitprice'], @@ -183,7 +191,7 @@ /*Calculate the taxes applicable to this line item from the customer branch Tax Group and Item Tax Category */ - $_SESSION['Items']->GetTaxes($myrow['orderlineno']); + $_SESSION['Items'.$identifier]->GetTaxes($myrow['orderlineno']); } /* line items from sales order details */ } else { /* there are no line items that have a quantity to deliver */ @@ -207,29 +215,29 @@ /* if processing, a dispatch page has been called and ${$StkItm->LineNumber} would have been set from the post set all the necessary session variables changed by the POST */ if (isset($_POST['ShipVia'])){ - $_SESSION['Items']->ShipVia = $_POST['ShipVia']; + $_SESSION['Items'.$identifier]->ShipVia = $_POST['ShipVia']; } if (isset($_POST['ChargeFreightCost'])){ - $_SESSION['Items']->FreightCost = filter_number_format($_POST['ChargeFreightCost']); + $_SESSION['Items'.$identifier]->FreightCost = filter_number_format($_POST['ChargeFreightCost']); } - foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { + foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if (isset($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])){ - $_SESSION['Items']->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])/100; + $_SESSION['Items'.$identifier]->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])/100; } } - foreach ($_SESSION['Items']->LineItems as $Itm) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $Itm) { if (sizeOf($Itm->SerialItems) > 0) { - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = 0; //initialise QtyDispatched + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched = 0; //initialise QtyDispatched foreach ($Itm->SerialItems as $SerialItem) { //calculate QtyDispatched from bundle quantities - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; } - } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items']->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyInv)){ - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); + } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyInv)){ + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); } foreach ($Itm->Taxes as $TaxLine) { if (isset($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ - $_SESSION['Items']->LineItems[$Itm->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])/100; + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])/100; } } } //end foreach lineitem @@ -238,23 +246,23 @@ /* Always display dispatch quantities and recalc freight for items being dispatched */ -if ($_SESSION['Items']->SpecialInstructions) { - prnMsg($_SESSION['Items']->SpecialInstructions,'warn'); +if ($_SESSION['Items'.$identifier]->SpecialInstructions) { + prnMsg($_SESSION['Items'.$identifier]->SpecialInstructions,'warn'); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Confirm Invoice') . '" alt="" />' . ' ' . _('Confirm Dispatch and Invoice'). '</p>'; echo '<table class="selection"> <tr> - <th><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items']->DebtorNo.'</b></th> - <th>' . _('Customer Name') . ' :<b> ' . $_SESSION['Items']->CustomerName. '</b></th> + <th><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items'.$identifier]->DebtorNo.'</b></th> + <th>' . _('Customer Name') . ' :<b> ' . $_SESSION['Items'.$identifier]->CustomerName. '</b></th> </tr> <tr> - <th colspan ="2"><b>' . _('Invoice amounts stated in') . ' ' . $_SESSION['Items']->DefaultCurrency . '</b></th> + <th colspan ="2"><b>' . _('Invoice amounts stated in') . ' ' . $_SESSION['Items'.$identifier]->DefaultCurrency . '</b></th> </tr> </table> <br />'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*************************************************************** @@ -277,9 +285,9 @@ <th>' . _('Total') . '<br />' . _('Incl Tax') . '</th> </tr>'; -$_SESSION['Items']->total = 0; -$_SESSION['Items']->totalVolume = 0; -$_SESSION['Items']->totalWeight = 0; +$_SESSION['Items'.$identifier]->total = 0; +$_SESSION['Items'.$identifier]->totalVolume = 0; +$_SESSION['Items'.$identifier]->totalWeight = 0; $TaxTotals = array(); $TaxGLCodes = array(); $TaxTotal =0; @@ -288,7 +296,7 @@ $k=0; //row colour counter $j=0; -foreach ($_SESSION['Items']->LineItems as $LnItm) { +foreach ($_SESSION['Items'.$identifier]->LineItems as $LnItm) { $j++; if ($k==1){ $RowStarter = '<tr class="EvenTableRows">'; @@ -300,9 +308,9 @@ $LineTotal = $LnItm->QtyDispatched * $LnItm->Price * (1 - $LnItm->DiscountPercent); - $_SESSION['Items']->total += $LineTotal; - $_SESSION['Items']->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume); - $_SESSION['Items']->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight); + $_SESSION['Items'.$identifier]->total += $LineTotal; + $_SESSION['Items'.$identifier]->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume); + $_SESSION['Items'.$identifier]->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight); echo '<td>'.$LnItm->StockID.'</td> <td>'.$LnItm->ItemDescription.'</td> @@ -315,7 +323,7 @@ if (isset($_POST['ProcessInvoice'])) { echo '<td class="number">' . locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</td>'; } else { - echo '<td class="number"><input type=hidden name="' . $LnItm->LineNumber . '_QtyDispatched" value="' . $LnItm->QtyDispatched . '"><a href="' . $rootpath .'/ConfirmDispatchControlled_Invoice.php?LineNo='. $LnItm->LineNumber.'">' .locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</a></td>'; + echo '<td class="number"><input type=hidden name="' . $LnItm->LineNumber . '_QtyDispatched" value="' . $LnItm->QtyDispatched . '"><a href="' . $rootpath .'/ConfirmDispatchControlled_Invoice.php?identifier=' . $identifier . '&LineNo='. $LnItm->LineNumber.'">' .locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</a></td>'; } } else { if (isset($_POST['ProcessInvoice'])) { @@ -325,8 +333,8 @@ } } $DisplayDiscountPercent = locale_number_format($LnItm->DiscountPercent*100,2) . '%'; - $DisplayLineNetTotal = locale_number_format($LineTotal,$_SESSION['Items']->CurrDecimalPlaces); - $DisplayPrice = locale_number_format($LnItm->Price,$_SESSION['Items']->CurrDecimalPlaces); + $DisplayLineNetTotal = locale_number_format($LineTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); + $DisplayPrice = locale_number_format($LnItm->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); echo '<td class="number">'.$DisplayPrice.'</td> <td class="number">'.$DisplayDiscountPercent.'</td> <td class="number">'.$DisplayLineNetTotal.'</td>'; @@ -334,7 +342,7 @@ /*Need to list the taxes applicable to this line */ echo '<td>'; $i=0; - foreach ($_SESSION['Items']->LineItems[$LnItm->LineNumber]->Taxes AS $Tax) { + foreach ($_SESSION['Items'.$identifier]->LineItems[$LnItm->LineNumber]->Taxes AS $Tax) { if ($i>0){ echo '<br />'; } @@ -374,9 +382,9 @@ $TaxTotal += $TaxLineTotal; - $DisplayTaxAmount = locale_number_format($TaxLineTotal ,$_SESSION['Items']->CurrDecimalPlaces); + $DisplayTaxAmount = locale_number_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); - $DisplayGrossLineTotal = locale_number_format($LineTotal+ $TaxLineTotal,$_SESSION['Items']->CurrDecimalPlaces); + $DisplayGrossLineTotal = locale_number_format($LineTotal+ $TaxLineTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); echo '<td class="number">'.$DisplayTaxAmount.'</td> <td class="number">'.$DisplayGrossLineTotal.'</td>'; @@ -404,16 +412,16 @@ It seems unfair to charge the customer twice for freight if the order was not fully delivered the first time ?? */ -if(!isset($_SESSION['Items']->FreightCost)) { +if(!isset($_SESSION['Items'.$identifier]->FreightCost)) { if ($_SESSION['DoFreightCalc']==True){ - list ($FreightCost, $BestShipper) = CalcFreightCost($_SESSION['Items']->total, - $_SESSION['Items']->BrAdd2, - $_SESSION['Items']->BrAdd3, - $_SESSION['Items']->totalVolume, - $_SESSION['Items']->totalWeight, - $_SESSION['Items']->Location, + list ($FreightCost, $BestShipper) = CalcFreightCost($_SESSION['Items'.$identifier]->total, + $_SESSION['Items'.$identifier]->BrAdd2, + $_SESSION['Items'.$identifier]->BrAdd3, + $_SESSION['Items'.$identifier]->totalVolume, + $_SESSION['Items'.$identifier]->totalWeight, + $_SESSION['Items'.$identifier]->Location, $db); - $_SESSION['Items']->ShipVia = $BestShipper; + $_SESSION['Items'.$identifier]->ShipVia = $BestShipper; } if (is_numeric($FreightCost)){ $FreightCost = $FreightCost / $_SESSION['CurrencyRate']; @@ -447,11 +455,11 @@ echo '<tr> <td colspan="5" class="number">' . _('Order Freight Cost'). '</td> - <td class="number">' . locale_number_format($_SESSION['Old_FreightCost'],$_SESSION['Items']->CurrDecimalPlaces) . '</td>'; + <td class="number">' . locale_number_format($_SESSION['Old_FreightCost'],$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; if ($_SESSION['DoFreightCalc']==True){ echo '<td colspan="2" class="number">' ._('Recalculated Freight Cost'). '</td> - <td class="number">' . locale_number_format($FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '</td>'; + <td class="number">' . locale_number_format($FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; } else { // echo '<td colspan="1"></td>'; } @@ -459,18 +467,18 @@ if (!isset($_POST['ChargeFreightCost'])) { $_POST['ChargeFreightCost']=0; } -if ($_SESSION['Items']->Any_Already_Delivered()==1 and (!isset($_SESSION['Items']->FreightCost) or $_POST['ChargeFreightCost']==0)) { +if ($_SESSION['Items'.$identifier]->Any_Already_Delivered()==1 and (!isset($_SESSION['Items'.$identifier]->FreightCost) or $_POST['ChargeFreightCost']==0)) { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td> <td><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0"></td>'; - $_SESSION['Items']->FreightCost=0; + $_SESSION['Items'.$identifier]->FreightCost=0; } else { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td>'; if (isset($_POST['ProcessInvoice'])) { - echo '<td class="number">' . locale_number_format($_SESSION['Items']->FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '</td>'; + echo '<td class="number">' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; } else { - echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items']->FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '" /></td>'; + echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td>'; } - $_POST['ChargeFreightCost'] = $_SESSION['Items']->FreightCost; + $_POST['ChargeFreightCost'] = $_SESSION['Items'.$identifier]->FreightCost; } $FreightTaxTotal =0; //initialise tax total @@ -478,7 +486,7 @@ echo '<td>'; $i=0; // initialise the number of taxes iterated through -foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { +foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if ($i>0){ echo '<br />'; } @@ -489,7 +497,7 @@ echo '</td><td class="number">'; $i=0; -foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { +foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if ($i>0){ echo '<br />'; } @@ -498,41 +506,41 @@ echo $FreightTaxLine->TaxRate * 100 ; } else { echo '<input type="text" class="number" name="FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . - '" maxlength="4" size="4" value="' . locale_number_format($FreightTaxLine->TaxRate * 100,$_SESSION['Items']->CurrDecimalPlaces) . '" />'; + '" maxlength="4" size="4" value="' . locale_number_format($FreightTaxLine->TaxRate * 100,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" />'; } if ($FreightTaxLine->TaxOnTax ==1){ - $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['Items']->FreightCost + $FreightTaxTotal)); - $FreightTaxTotal += ($FreightTaxLine->TaxRate * ($_SESSION['Items']->FreightCost + $FreightTaxTotal)); + $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['Items'.$identifier]->FreightCost + $FreightTaxTotal)); + $FreightTaxTotal += ($FreightTaxLine->TaxRate * ($_SESSION['Items'.$identifier]->FreightCost + $FreightTaxTotal)); } else { - $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * $_SESSION['Items']->FreightCost); - $FreightTaxTotal += ($FreightTaxLine->TaxRate * $_SESSION['Items']->FreightCost); + $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * $_SESSION['Items'.$identifier]->FreightCost); + $FreightTaxTotal += ($FreightTaxLine->TaxRate * $_SESSION['Items'.$identifier]->FreightCost); } $i++; $TaxGLCodes[$FreightTaxLine->TaxAuthID] = $FreightTaxLine->TaxGLCode; } echo '</td>'; -echo '<td class="number">' . locale_number_format($FreightTaxTotal,$_SESSION['Items']->CurrDecimalPlaces) . '</td> - <td class="number">' . locale_number_format($FreightTaxTotal+ $_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces) . '</td> +echo '<td class="number">' . locale_number_format($FreightTaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($FreightTaxTotal+ $_POST['ChargeFreightCost'],$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> </tr>'; $TaxTotal += $FreightTaxTotal; -$DisplaySubTotal = locale_number_format(($_SESSION['Items']->total + $_POST['ChargeFreightCost']),$_SESSION['Items']->CurrDecimalPlaces); +$DisplaySubTotal = locale_number_format(($_SESSION['Items'.$identifier]->total + $_POST['ChargeFreightCost']),$_SESSION['Items'.$identifier]->CurrDecimalPlaces); /* round the totals to avoid silly entries */ -$TaxTotal = round($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces); -$_SESSION['Items']->total = round($_SESSION['Items']->total,$_SESSION['Items']->CurrDecimalPlaces); -$_POST['ChargeFreightCost'] = round($_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces); +$TaxTotal = round($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); +$_SESSION['Items'.$identifier]->total = round($_SESSION['Items'.$identifier]->total,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); +$_POST['ChargeFreightCost'] = round($_POST['ChargeFreightCost'],$_SESSION['Items'.$identifier]->CurrDecimalPlaces); echo '<tr> <td colspan="10" class="number">' . _('Invoice Totals'). '</td> <td class="number:><hr><b>'.$DisplaySubTotal.'</b><hr></td> <td colspan="2"></td> - <td class="number"><hr><b>' . locale_number_format($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces) . '</b><hr></td> - <td class="number"><hr><b>' . locale_number_format($TaxTotal+($_SESSION['Items']->total + $_POST['ChargeFreightCost']),$_SESSION['Items']->CurrDecimalPlaces) . '</b><hr></td> + <td class="number"><hr><b>' . locale_number_format($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</b><hr></td> + <td class="number"><hr><b>' . locale_number_format($TaxTotal+($_SESSION['Items'.$identifier]->total + $_POST['ChargeFreightCost']),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</b><hr></td> </tr>'; if (! isset($_POST['DispatchDate']) OR ! Is_Date($_POST['DispatchDate'])){ @@ -552,7 +560,7 @@ $QuantityInvoicedIsPositive = false; - foreach ($_SESSION['Items']->LineItems as $OrderLine) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { if ($OrderLine->QtyDispatched > 0){ $QuantityInvoicedIsPositive =true; } @@ -566,7 +574,7 @@ if ($_SESSION['ProhibitNegativeStock']==1){ // checks for negative stock after processing invoice //sadly this check does not combine quantities occuring twice on and order and each line is considered individually :-( $NegativesFound = false; - foreach ($_SESSION['Items']->LineItems as $OrderLine) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { $SQL = "SELECT stockmaster.description, locstock.quantity, stockmaster.mbflag @@ -574,7 +582,7 @@ INNER JOIN stockmaster ON stockmaster.stockid=locstock.stockid WHERE stockmaster.stockid='" . $OrderLine->StockID . "' - AND locstock.loccode='" . $_SESSION['Items']->Location . "'"; + AND locstock.loccode='" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('Could not retrieve the quantity left at the location once this order is invoiced (for the purposes of checking that stock will not go negative because)'); $Result = DB_query($SQL,$db,$ErrMsg); @@ -596,7 +604,7 @@ INNER JOIN stockmaster ON stockmaster.stockid=bom.component WHERE bom.parent='" . $OrderLine->StockID . "' - AND locstock.loccode='" . $_SESSION['Items']->Location . "' + AND locstock.loccode='" . $_SESSION['Items'.$identifier]->Location . "' AND effectiveafter <'" . Date('Y-m-d') . "' AND effectiveto >='" . Date('Y-m-d') . "'"; @@ -627,8 +635,8 @@ $SQL = "SELECT area, defaultshipvia FROM custbranch - WHERE custbranch.debtorno ='". $_SESSION['Items']->DebtorNo . "' - AND custbranch.branchcode = '" . $_SESSION['Items']->Branch . "'"; + WHERE custbranch.debtorno ='". $_SESSION['Items'.$identifier]->DebtorNo . "' + AND custbranch.branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "'"; $ErrMsg = _('We were unable to load Area where the Sale is to from the BRANCHES table') . '. ' . _('Please remedy this'); $Result = DB_query($SQL,$db, $ErrMsg); @@ -658,21 +666,21 @@ $Result = DB_query($SQL,$db); - if (DB_num_rows($Result) != count($_SESSION['Items']->LineItems)){ + if (DB_num_rows($Result) != count($_SESSION['Items'.$identifier]->LineItems)){ /*there should be the same number of items returned from this query as there are lines on the invoice - if not then someone has already invoiced or credited some lines */ if ($debug==1){ echo '<br />'.$SQL; echo '<br />' . _('Number of rows returned by SQL') . ':' . DB_num_rows($Result); - echo '<br />' . _('Count of items in the session') . ' ' . count($_SESSION['Items']->LineItems); + echo '<br />' . _('Count of items in the session') . ' ' . count($_SESSION['Items'.$identifier]->LineItems); } echo '<br />'; prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . '. ' . _('Processing halted') . '. ' . _('To enter and confirm this dispatch') . '/' . _('invoice the order must be re-selected and re-read again to update the changes made by the other user'), 'error'); - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset($_SESSION['Items'.$identifier]); unset($_SESSION['ProcessingOrder']); include('includes/footer.inc'); exit; } @@ -681,10 +689,10 @@ while ($myrow = DB_fetch_array($Result)) { - if ($_SESSION['Items']->LineItems[$myrow['orderlineno']]->Quantity != $myrow['quantity'] - OR $_SESSION['Items']->LineItems[$myrow['orderlineno']]->QtyInv != $myrow['qtyinvoiced']) { + if ($_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->Quantity != $myrow['quantity'] + OR $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->QtyInv != $myrow['qtyinvoiced']) { - echo '<br />'. _('Orig order for'). ' ' . $myrow['orderlineno'] . ' '. _('has a quantity of'). ' ' . $myrow['quantity'] . ' '. _('and an invoiced qty of'). ' ' . $myrow['qtyinvoiced'] . ' '. _('the session shows quantity of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->Quantity . ' ' . _('and quantity invoice of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->QtyInv; + echo '<br />'. _('Orig order for'). ' ' . $myrow['orderlineno'] . ' '. _('has a quantity of'). ' ' . $myrow['quantity'] . ' '. _('and an invoiced qty of'). ' ' . $myrow['qtyinvoiced'] . ' '. _('the session shows quantity of'). ' ' . $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->Quantity . ' ' . _('and quantity invoice of'). ' ' . $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->QtyInv; prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . ' ' . _('Processing halted.') . ' ' . _('To enter and confirm this dispatch, it must be re-selected and re-read again to update the changes made by the other user'), 'error'); @@ -692,8 +700,8 @@ echo '<div class="centre"><a href="'. $rootpath . '/SelectSalesOrder.php">'. _('Select a sales order for confirming deliveries and invoicing'). '</a></div>'; - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset($_SESSION['Items'.$identifier]); unset($_SESSION['ProcessingOrder']); include('includes/footer.inc'); exit; @@ -715,11 +723,11 @@ DB_Txn_Begin($db); - if ($DefaultShipVia != $_SESSION['Items']->ShipVia){ + if ($DefaultShipVia != $_SESSION['Items'.$identifier]->ShipVia){ $SQL = "UPDATE custbranch - SET defaultshipvia ='" . $_SESSION['Items']->ShipVia . "' - WHERE debtorno='" . $_SESSION['Items']->DebtorNo . "' - AND branchcode='" . $_SESSION['Items']->Branch . "'"; + SET defaultshipvia ='" . $_SESSION['Items'.$identifier]->ShipVia . "' + WHERE debtorno='" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND branchcode='" . $_SESSION['Items'.$identifier]->Branch . "'"; $ErrMsg = _('Could not update the default shipping carrier for this branch because'); $DbgMsg = _('The SQL used to update the branch default carrier was'); $result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); @@ -758,20 +766,20 @@ VALUES ( '". $InvoiceNo . "', 10, - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $DefaultDispatchDate . "', '" . date('Y-m-d H-i-s') . "', '" . $PeriodNo . "', '', - '" . $_SESSION['Items']->DefaultSalesType . "', + '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', '" . $_SESSION['ProcessingOrder'] . "', - '" . $_SESSION['Items']->total . "', + '" . $_SESSION['Items'.$identifier]->total . "', '" . $TaxTotal . "', '" . filter_number_format($_POST['ChargeFreightCost']) . "', '" . $_SESSION['CurrencyRate'] . "', '" . $_POST['InvoiceText'] . "', - '" . $_SESSION['Items']->ShipVia . "', + '" . $_SESSION['Items'.$identifier]->ShipVia . "', '" . $_POST['Consignment'] . "' )"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction record could not be inserted because'); @@ -798,7 +806,7 @@ /* If balance of the order cancelled update sales order details quantity. Also insert log records for OrderDeliveryDifferencesLog */ - foreach ($_SESSION['Items']->LineItems as $OrderLine) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { /*Test to see if the item being sold is an asset */ if (mb_substr($OrderLine->StockID,0,6)=='ASSET-'){ @@ -841,8 +849,8 @@ '" . $InvoiceNo . "', '" . $OrderLine->StockID . "', '" . ($OrderLine->Quantity - $OrderLine->QtyDispatched) . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', 'CAN')"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The order delivery differences log record could not be inserted because'); @@ -851,7 +859,7 @@ } } elseif (($OrderLine->Quantity - $OrderLine->QtyDispatched)>0 - AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items']->DeliveryDate,'d')>0) { + AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items'.$identifier]->DeliveryDate,'d')>0) { /*The order is being short delivered after the due date - need to insert a delivery differnce log */ @@ -868,8 +876,8 @@ '" . $InvoiceNo . "', '" . $OrderLine->StockID . "', '" . $OrderLine->Quantity - $OrderLine->QtyDispatched . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', 'BO' )"; @@ -920,7 +928,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $OrderLine->StockID . "' - AND loccode= '" . $_SESSION['Items']->Location . "'"; + AND loccode= '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('WARNING') . ': ' . _('Could not retrieve current location stock'); $Result = DB_query($SQL, $db, $ErrMsg); @@ -935,7 +943,7 @@ $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " WHERE locstock.stockid = '" . $OrderLine->StockID . "' - AND loccode = '" . $_SESSION['Items']->Location . "'"; + AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated because'); $DbgMsg = _('The following SQL to update the location stock record was used'); @@ -967,7 +975,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $AssParts['component'] . "' - AND loccode= '" . $_SESSION['Items']->Location . "'"; + AND loccode= '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Can not retrieve assembly components location stock quantities because '); $DbgMsg = _('The SQL that failed was'); @@ -998,10 +1006,10 @@ VALUES ('" . $AssParts['component'] . "', 10, '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', + '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $PeriodNo . "', '" . _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' . $_SESSION['ProcessingOrder'] . "', '" . -$AssParts['quantity'] * $OrderLine->QtyDispatched . "', @@ -1017,7 +1025,7 @@ $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . ($AssParts['quantity'] * $OrderLine->QtyDispatched) . " WHERE locstock.stockid = '" . $AssParts['component'] . "' - AND loccode = '" . $_SESSION['Items']->Location . "'"; + AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated for an assembly component because'); $DbgMsg = _('The following SQL to update the locations stock record for the component was used'); @@ -1025,7 +1033,7 @@ } /* end of assembly explosion and updates */ /*Update the cart with the recalculated standard cost from the explosion of the assembly's components*/ - $_SESSION['Items']->LineItems[$OrderLine->LineNumber]->StandardCost = $StandardCost; + $_SESSION['Items'.$identifier]->LineItems[$OrderLine->LineNumber]->StandardCost = $StandardCost; $OrderLine->StandardCost = $StandardCost; } /* end of its an assembly */ @@ -1054,10 +1062,10 @@ VALUES ('" . $OrderLine->StockID . "', 10, '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', + '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $_SESSION['ProcessingOrder'] . "', @@ -1088,10 +1096,10 @@ VALUES ('" . $OrderLine->StockID . "', 10, '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', + '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $_SESSION['ProcessingOrder'] . "', @@ -1137,7 +1145,7 @@ $SQL = "UPDATE stockserialitems SET quantity= quantity - " . $Item->BundleQty . " WHERE stockid='" . $OrderLine->StockID . "' - AND loccode='" . $_SESSION['Items']->Location . "' + AND loccode='" . $_SESSION['Items'.$identifier]->Location . "' AND serialno='" . DB_escape_string($Item->BundleRef) . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); @@ -1181,10 +1189,10 @@ AND salesanalysis.custbranch=custbranch.branchcode AND salesanalysis.area=custbranch.area AND salesanalysis.salesperson=custbranch.salesman - AND salesanalysis.typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' + AND salesanalysis.typeabbrev ='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' AND salesanalysis.periodno='" . $PeriodNo . "' - AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items']->DebtorNo . "' - AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items']->Branch . "' + AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items'.$identifier]->Branch . "' AND salesanalysis.stockid " . LIKE . " '" . $OrderLine->StockID . "' AND salesanalysis.budgetoractual=1 GROUP BY salesanalysis.stockid, @@ -1210,10 +1218,10 @@ disc=disc+" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . " WHERE salesanalysis.area='" . $myrow[5] . "' AND salesanalysis.salesperson='" . $myrow[8] . "' - AND typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' + AND typeabbrev ='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' AND periodno = '" . $PeriodNo . "' - AND cust " . LIKE . " '" . $_SESSION['Items']->DebtorNo . "' - AND custbranch " . LIKE . " '" . $_SESSION['Items']->Branch . "' + AND cust " . LIKE . " '" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND custbranch " . LIKE . " '" . $_SESSION['Items'.$identifier]->Branch . "' AND stockid " . LIKE . " '" . $OrderLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[2] . "' AND budgetoractual=1"; @@ -1233,12 +1241,12 @@ budgetoractual, salesperson, stkcategory ) - SELECT '" . $_SESSION['Items']->DefaultSalesType . "', + SELECT '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', '" . $PeriodNo . "', '" . round(($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . ($OrderLine->QtyDispatched) . "', '" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $OrderLine->StockID . "', @@ -1249,8 +1257,8 @@ FROM stockmaster, custbranch WHERE stockmaster.stockid = '" . $OrderLine->StockID . "' - AND custbranch.debtorno = '" . $_SESSION['Items']->DebtorNo . "' - AND custbranch.branchcode='" . $_SESSION['Items']->Branch . "'"; + AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "'"; } $ErrMsg = _('Sales analysis record could not be added or updated because'); @@ -1275,8 +1283,8 @@ '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', - '" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db) . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', + '" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db) . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because'); @@ -1299,7 +1307,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', '" . round((-$OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side of the cost of sales GL posting could not be inserted because'); @@ -1311,7 +1319,7 @@ if (!$IsAsset){ // its a normal stock item //Post sales transaction to GL credit sales - $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db); + $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -1326,7 +1334,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales GL posting could not be inserted because'); @@ -1348,7 +1356,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', '" . round(($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales discount GL posting could not be inserted because'); @@ -1394,7 +1402,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['accumdepnact'] . "', - '" . $_SESSION['Items']->DebtorNo . ' - ' . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . ' - ' . $OrderLine->StockID . ' ' . _('disposal') . "', '" . -$DisposalRow['accumdpen'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of accumulated depreciation GL posting on disposal could not be inserted because'); @@ -1416,7 +1424,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['costact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . -$DisposalRow['cost'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of asset cost on dispoal GL posting could not be inserted because'); @@ -1438,7 +1446,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['disposalact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . ($DisposalRow['cost']-$DisposalRow['accumdepn']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal net book value GL posting could not be inserted because'); @@ -1460,7 +1468,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['disposalact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal proceeds GL posting could not be inserted because'); @@ -1512,7 +1520,7 @@ if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /*Post debtors transaction to GL debit debtors, credit freight re-charged and credit sales */ - if (($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal) !=0) { + if (($_SESSION['Items'.$identifier]->total + $_SESSION['Items'.$identifier]->FreightCost + $TaxTotal) !=0) { $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1526,8 +1534,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . round((($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . round((($_SESSION['Items'.$identifier]->total + $_SESSION['Items'.$identifier]->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the total debtors control GLTrans record was used'); @@ -1536,7 +1544,7 @@ /*Could do with setting up a more flexible freight posting schema that looks at the sales type and area of the customer branch to determine where to post the freight recovery */ - if ($_SESSION['Items']->FreightCost !=0) { + if ($_SESSION['Items'.$identifier]->FreightCost !=0) { $SQL = "INSERT INTO gltrans ( type, typeno, @@ -1551,8 +1559,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['freightact'] . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . round((-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . round((-$_SESSION['Items'.$identifier]->FreightCost/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1573,7 +1581,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $TaxGLCodes[$TaxAuthID] . "', - '" . $_SESSION['Items']->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', '" . round((-$TaxAmount/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); @@ -1589,8 +1597,8 @@ // E N D O F I N V O I C E S Q L P R O C E S S I N G // ************************************************************************* - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset($_SESSION['Items'.$identifier]); unset($_SESSION['ProcessingOrder']); echo prnMsg( _('Invoice number'). ' '. $InvoiceNo .' '. _('processed'), 'success'); @@ -1649,7 +1657,7 @@ echo '<br /> <input type="submit" tabindex="'.$j.'" name="ProcessInvoice" value="'._('Process Invoice').'" /> </div> - <input type="hidden" name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '" />'; + <input type="hidden" name="ShipVia" value="' . $_SESSION['Items'.$identifier]->ShipVia . '" />'; } echo '</form>'; Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/CounterSales.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -488,27 +488,35 @@ if (isset($_POST['Quantity_' . $OrderLine->LineNumber])){ - $Quantity = filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]); + $Quantity = round(filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]),$OrderLine->DecimalPlaces); - if (abs($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){ - $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); - $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100); - } else if (abs($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.001) { - //then do a recalculation of the price at this new GP Percentage - $Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100)); - } else { - $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); - } - $DiscountPercentage = filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]); - if ($_SESSION['AllowOrderLineItemNarrative'] == 1) { - $Narrative = $_POST['Narrative_' . $OrderLine->LineNumber]; - } else { - $Narrative = ''; - } + if (ABS($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){ + /*There is a new price being input for the line item */ + + $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); + $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100); + + } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.01) { + /* A GP % has been input so need to do a recalculation of the price at this new GP Percentage */ + + + prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info'); + + + $Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100)); + } else { + $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); + } + $DiscountPercentage = filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]); + if ($_SESSION['AllowOrderLineItemNarrative'] == 1) { + $Narrative = $_POST['Narrative_' . $OrderLine->LineNumber]; + } else { + $Narrative = ''; + } - if (!isset($OrderLine->DiscountPercent)) { - $OrderLine->DiscountPercent = 0; - } + if (!isset($OrderLine->DiscountPercent)) { + $OrderLine->DiscountPercent = 0; + } if ($Quantity<0 or $Price <0 or $DiscountPercentage >100 or $DiscountPercentage <0){ prnMsg(_('The item could not be updated because you are attempting to set the quantity ordered to less than 0 or the price less than 0 or the discount more than 100% or less than 0%'),'warn'); @@ -871,7 +879,9 @@ $BankAccountsResult = DB_query("SELECT bankaccountname, accountcode FROM bankaccounts",$db); - echo '<tr><td>' . _('Banked to') . ':</td><td><select name="BankAccount">'; + echo '<tr> + <td>' . _('Banked to') . ':</td> + <td><select name="BankAccount">'; while ($BankAccountsRow = DB_fetch_array($BankAccountsResult)){ if (isset($_POST['BankAccount']) AND $_POST['BankAccount'] == $BankAccountsRow['accountcode']){ echo '<option selected="True" value="' . $BankAccountsRow['accountcode'] . '">' . $BankAccountsRow['bankaccountname'] . '</option>'; @@ -879,12 +889,13 @@ echo '<option value="' . $BankAccountsRow['accountcode'] . '">' . $BankAccountsRow['bankaccountname'] . '</option>'; } } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; if (!isset($_POST['AmountPaid'])){ $_POST['AmountPaid'] =0; } - echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . filter_number_format($_POST['AmountPaid']) . '" /></td></tr>'; + echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . $_POST['AmountPaid'] . '" /></td></tr>'; echo '</table>'; //end the sub table in the second column of master table echo '</th></tr></table>'; //end of column/row/master table Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/CustomerAllocations.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -582,17 +582,17 @@ if (!isset($Balance)) { $Balance=0; } - echo '<tr class="OddTableRows"> - <td colspan="7" class="number"><b>' . locale_number_format($Balance,$CurrDecimalPlaces) .'</b></td> - <td><b>' . $CurrCode . '</b></td> - <td><b>' . _('Balance') . '</b></td> - </tr> - </table> - <br />'; - if ($NoOfUnallocatedTrans == 0) { prnMsg(_('There are no allocations to be done'),'info'); + } else { + echo '<tr class="OddTableRows"> + <td colspan="7" class="number"><b>' . locale_number_format($Balance,$CurrDecimalPlaces) .'</b></td> + <td><b>' . $CurrCode . '</b></td> + <td><b>' . _('Balance') . '</b></td> + </tr>'; } + echo '</table> + <br />'; } echo '</td> Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/SelectOrderItems.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -1061,10 +1061,18 @@ $Quantity = round(filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]),$OrderLine->DecimalPlaces); if (ABS($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){ + /*There is a new price being input for the line item */ + $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100); - } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.001) { - //then do a recalculation of the price at this new GP Percentage + + } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.01) { + /* A GP % has been input so need to do a recalculation of the price at this new GP Percentage */ + + + prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info'); + + ... [truncated message content] |
From: <dai...@us...> - 2011-11-16 09:23:13
|
Revision: 4747 http://web-erp.svn.sourceforge.net/web-erp/?rev=4747&view=rev Author: daintree Date: 2011-11-16 09:23:02 +0000 (Wed, 16 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/SelectOrderItems.php trunk/includes/SQL_CommonFunctions.inc Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-11-16 07:04:20 UTC (rev 4746) +++ trunk/SelectOrderItems.php 2011-11-16 09:23:02 UTC (rev 4747) @@ -294,7 +294,9 @@ } //Customer logins are not allowed to select other customers henc in_array(2,$_SESSION['AllowedPageSecurityTokens']) -if (isset($_POST['SearchCust']) AND $_SESSION['RequireCustomerSelection']==1 AND in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ +if (isset($_POST['SearchCust']) + AND $_SESSION['RequireCustomerSelection']==1 + AND in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ if (($_POST['CustKeywords']=='') AND ($_POST['CustCode']=='') AND ($_POST['CustPhone']=='')) { prnMsg(_('At least one Customer Branch Name keyword OR an extract of a Customer Branch Code or Branch Phone Number must be entered for the search'), 'warn'); @@ -339,7 +341,7 @@ if (isset($_POST['JustSelectedACustomer'])){ /*Need to figure out the number of the form variable that the user clicked on */ - for ($i=1;$i<count($_POST);$i++){ //loop through the returned customers + for ($i=0;$i<count($_POST);$i++){ //loop through the returned customers if(isset($_POST['SubmitCustomerSelection'.$i])){ break; } @@ -547,20 +549,20 @@ $DbgMsg = _('SQL used to retrieve the branch details was'); $result =DB_query($sql,$db,$ErrMsg, $DbgMsg); - $myrow = DB_fetch_row($result); - $_SESSION['Items'.$identifier]->DeliverTo = $myrow[0]; - $_SESSION['Items'.$identifier]->DelAdd1 = $myrow[1]; - $_SESSION['Items'.$identifier]->DelAdd2 = $myrow[2]; - $_SESSION['Items'.$identifier]->DelAdd3 = $myrow[3]; - $_SESSION['Items'.$identifier]->DelAdd4 = $myrow[4]; - $_SESSION['Items'.$identifier]->DelAdd5 = $myrow[5]; - $_SESSION['Items'.$identifier]->DelAdd6 = $myrow[6]; - $_SESSION['Items'.$identifier]->PhoneNo = $myrow[7]; - $_SESSION['Items'.$identifier]->Email = $myrow[8]; - $_SESSION['Items'.$identifier]->Location = $myrow[9]; - $_SESSION['Items'.$identifier]->DeliverBlind = $myrow[10]; - $_SESSION['Items'.$identifier]->DeliveryDays = $myrow[11]; - $_SESSION['Items'.$identifier]->LocationName = $myrow[12]; + $myrow = DB_fetch_array($result); + $_SESSION['Items'.$identifier]->DeliverTo = $myrow['brname']; + $_SESSION['Items'.$identifier]->DelAdd1 = $myrow['braddress1']; + $_SESSION['Items'.$identifier]->DelAdd2 = $myrow['braddress2']; + $_SESSION['Items'.$identifier]->DelAdd3 = $myrow['braddress3']; + $_SESSION['Items'.$identifier]->DelAdd4 = $myrow['braddress4']; + $_SESSION['Items'.$identifier]->DelAdd5 = $myrow['braddress5']; + $_SESSION['Items'.$identifier]->DelAdd6 = $myrow['braddress6']; + $_SESSION['Items'.$identifier]->PhoneNo = $myrow['phoneno']; + $_SESSION['Items'.$identifier]->Email = $myrow['email']; + $_SESSION['Items'.$identifier]->Location = $myrow['defaultlocation']; + $_SESSION['Items'.$identifier]->DeliverBlind = $myrow['deliverblind']; + $_SESSION['Items'.$identifier]->DeliveryDays = $myrow['estdeliverydays']; + $_SESSION['Items'.$identifier]->LocationName = $myrow['locationname']; } else { prnMsg(_('Sorry, your account has been put on hold for some reason, please contact the credit control personnel.'),'warn'); include('includes/footer.inc'); @@ -581,21 +583,21 @@ echo '<table cellpadding="3" colspan="4" class="selection"> <tr> <td><h5>' . _('Part of the Customer Branch Name') . ':</h5></td> - <td><input tabindex=1 type="Text" name="CustKeywords" size=20 maxlength=25></td> + <td><input tabindex="1" type="text" name="CustKeywords" size="20" maxlength="25" /></td> <td><h2><b>' . _('OR') . '</b></h2></td> <td><h5>' . _('Part of the Customer Branch Code') . ':</h5></td> - <td><input tabindex=2 type="text" name="CustCode" size=15 maxlength=18></td> + <td><input tabindex=2 type="text" name="CustCode" size="15" maxlength="18" /></td> <td><h2><b>' . _('OR') . '</b></h2></td> <td><h5>' . _('Part of the Branch Phone Number') . ':</h5></td> - <td><input tabindex=3 type="text" name="CustPhone" size=15 maxlength=18></td> + <td><input tabindex=3 type="text" name="CustPhone" size="15" maxlength="18" /></td> </tr> </table> - <br /><div class="centre"><input tabindex=4 type="submit" name="SearchCust" value="' . _('Search Now') . '" /> - <input tabindex=5 type="submit" action="reset" value="' . _('Reset') . '"></div>'; + <br /><div class="centre"><input tabindex="4" type="submit" name="SearchCust" value="' . _('Search Now') . '" /> + <input tabindex=5 type="submit" action="reset" value="' . _('Reset') . '" /></div>'; if (isset($result_CustSelect)) { - echo '<table cellpadding=2 colspan=7>'; + echo '<table class="selection">'; $TableHeader = '<br /><tr> <th>' . _('Customer') . '</th> @@ -625,8 +627,9 @@ } else { echo '<td></td>'; } - echo '<td><input tabindex='.($j+5).' type=submit name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '"></td> - <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'"><input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /> + echo '<td><input tabindex="'.strval($j+5).'" type="submit" name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '" /></td> + <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'" /> + <input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /> <td>'.$myrow['contactname'].'</td> <td>'.$myrow['phoneno'].'</td> <td>'.$myrow['faxno'].'</td> @@ -636,7 +639,7 @@ //end of page full new headings if } //end of while loop - echo '<input type="hidden" name="JustSelectedACustomer" value="Yes">'; + echo '<input type="hidden" name="JustSelectedACustomer" value="Yes" />'; echo '</table></form>'; }//end if results to show @@ -1094,7 +1097,7 @@ prnMsg( _('You are attempting to make the quantity ordered a quantity less than has already been invoiced') . '. ' . _('The quantity delivered and invoiced cannot be modified retrospectively'),'warn'); } elseif ($OrderLine->Quantity !=$Quantity OR $OrderLine->Price != $Price - OR ABS($OrderLine->DiscountPercent -$DiscountPercentage/100) >0.001 + OR ABS($OrderLine->DiscountPercent - $DiscountPercentage/100) >0.001 OR $OrderLine->Narrative != $Narrative OR $OrderLine->ItemDue != $_POST['ItemDue_' . $OrderLine->LineNumber] OR $OrderLine->POLine != $_POST['POLine_' . $OrderLine->LineNumber]) { @@ -1356,17 +1359,17 @@ echo $RowStarter; if($_SESSION['Items'.$identifier]->DefaultPOLine ==1){ //show the input field only if required - echo '<td><input tabindex=1 type="text" name="POLine_' . $OrderLine->LineNumber . '" size=20 maxlength=20 value=' . $OrderLine->POLine . '></td>'; + echo '<td><input tabindex="1" type="text" name="POLine_' . $OrderLine->LineNumber . '" size="20" maxlength="20" value="' . $OrderLine->POLine . '" /></td>'; } else { - echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="">'; + echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="" />'; } echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> <td>' . $OrderLine->ItemDescription . '</td>'; - echo '<td><input class="number" tabindex=2 type=tect name="Quantity_' . $OrderLine->LineNumber . '" size=6 maxlength=6 value=' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '>'; + echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . $OrderLine->LineNumber . '" size="6" maxlength="6" value="' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '" />'; if ($QtyRemain != $QtyOrdered){ - echo '<br />'.locale_number_format($OrderLine->QtyInv,$OrderLine->DecimalPlaces) .' of '.locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces).' invoiced'; + echo '<br />'.locale_number_format($OrderLine->QtyInv,$OrderLine->DecimalPlaces) .' ' . _('of') . ' ' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces).' ' . _('invoiced'); } echo '</td> <td class="number">' . locale_number_format($OrderLine->QOHatLoc,$OrderLine->DecimalPlaces) . '</td> @@ -1374,12 +1377,12 @@ if (in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ /*OK to display with discount if it is an internal user with appropriate permissions */ - echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size=16 maxlength=16 value=' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '></td> - <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size=5 maxlength=4 value=' . locale_number_format(($OrderLine->DiscountPercent * 100),2) . '></td> - <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size=3 maxlength=40 value=' . locale_number_format($OrderLine->GPPercent,2) . '></td>'; + echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size="16" maxlength="16" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td> + <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size="5" maxlength="4" value="' . locale_number_format(($OrderLine->DiscountPercent * 100),2) . '" /></td> + <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size="4" maxlength="40" value="' . locale_number_format($OrderLine->GPPercent,2) . '" /></td>'; } else { echo '<td class="number">' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td><td></td>'; - echo '<input type="hidden" name="Price_' . $OrderLine->LineNumber . '" value=' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '>'; + echo '<input type="hidden" name="Price_' . $OrderLine->LineNumber . '" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" />'; } if ($_SESSION['Items'.$identifier]->Some_Already_Delivered($OrderLine->LineNumber)){ $RemTxt = _('Clear Remaining'); @@ -1434,8 +1437,8 @@ echo '<br /> <div class="centre"> - <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '"> - <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '"> + <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" /> + <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '" /> </div> <hr />'; } # end of if lines Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2011-11-16 07:04:20 UTC (rev 4746) +++ trunk/includes/SQL_CommonFunctions.inc 2011-11-16 09:23:02 UTC (rev 4747) @@ -128,7 +128,7 @@ if (DB_num_rows($GetAccountBalanceResult)==1){ $myrow = DB_fetch_array($GetAccountBalanceResult); - $CreditAvailable = filter_number_format($myrow['creditlimit'] - $myrow['balance']); + $CreditAvailable = $myrow['creditlimit'] - $myrow['balance']; } else { $sql = "SELECT creditlimit FROM debtorsmaster @@ -180,7 +180,7 @@ '" . $PeriodNo . "', '" . $StockGLCode['adjglact'] . "', '" . $StockID . ' ' . _('cost was') . ' ' . $OldCost . ' ' . _('changed to') . ' ' . $NewCost . ' x ' . _('Quantity on hand of') . ' ' . $QOH . "', - '" . filter_number_format(-$ValueOfChange) . "')"; + '" . -$ValueOfChange . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL credit for the stock cost adjustment posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -199,7 +199,7 @@ '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', '" . $StockID . ' ' . _('cost was') . ' ' . $OldCost . ' ' . _('changed to') .' ' . $NewCost . ' x ' . _('Quantity on hand of') . ' ' . $QOH . "', - '" . filter_number_format($ValueOfChange) . "')"; + '" . $ValueOfChange . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL debit for stock cost adjustment posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -248,7 +248,7 @@ } /* Accepts work order information and iterates through the bom, inserting real components (dissolving phantom assemblies) */ -function WoRealRequirements($db, $WO, $LocCode, $StockID, $Qty=1, $ParentID="") { +function WoRealRequirements($db, $WO, $LocCode, $StockID, $Qty=1, $ParentID='') { // remember, 'G' is for ghost (phantom part type) @@ -267,7 +267,7 @@ SELECT '" . $WO . "', '" . $ParentID . "', bom.component, - bom.quantity*" . filter_number_format($Qty) . ", + bom.quantity*" . $Qty . ", materialcost+labourcost+overheadcost, bom.autoissue FROM bom INNER JOIN stockmaster This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-16 09:23:09
|
Revision: 4747 http://web-erp.svn.sourceforge.net/web-erp/?rev=4747&view=rev Author: daintree Date: 2011-11-16 09:23:02 +0000 (Wed, 16 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/SelectOrderItems.php trunk/includes/SQL_CommonFunctions.inc Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-11-16 07:04:20 UTC (rev 4746) +++ trunk/SelectOrderItems.php 2011-11-16 09:23:02 UTC (rev 4747) @@ -294,7 +294,9 @@ } //Customer logins are not allowed to select other customers henc in_array(2,$_SESSION['AllowedPageSecurityTokens']) -if (isset($_POST['SearchCust']) AND $_SESSION['RequireCustomerSelection']==1 AND in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ +if (isset($_POST['SearchCust']) + AND $_SESSION['RequireCustomerSelection']==1 + AND in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ if (($_POST['CustKeywords']=='') AND ($_POST['CustCode']=='') AND ($_POST['CustPhone']=='')) { prnMsg(_('At least one Customer Branch Name keyword OR an extract of a Customer Branch Code or Branch Phone Number must be entered for the search'), 'warn'); @@ -339,7 +341,7 @@ if (isset($_POST['JustSelectedACustomer'])){ /*Need to figure out the number of the form variable that the user clicked on */ - for ($i=1;$i<count($_POST);$i++){ //loop through the returned customers + for ($i=0;$i<count($_POST);$i++){ //loop through the returned customers if(isset($_POST['SubmitCustomerSelection'.$i])){ break; } @@ -547,20 +549,20 @@ $DbgMsg = _('SQL used to retrieve the branch details was'); $result =DB_query($sql,$db,$ErrMsg, $DbgMsg); - $myrow = DB_fetch_row($result); - $_SESSION['Items'.$identifier]->DeliverTo = $myrow[0]; - $_SESSION['Items'.$identifier]->DelAdd1 = $myrow[1]; - $_SESSION['Items'.$identifier]->DelAdd2 = $myrow[2]; - $_SESSION['Items'.$identifier]->DelAdd3 = $myrow[3]; - $_SESSION['Items'.$identifier]->DelAdd4 = $myrow[4]; - $_SESSION['Items'.$identifier]->DelAdd5 = $myrow[5]; - $_SESSION['Items'.$identifier]->DelAdd6 = $myrow[6]; - $_SESSION['Items'.$identifier]->PhoneNo = $myrow[7]; - $_SESSION['Items'.$identifier]->Email = $myrow[8]; - $_SESSION['Items'.$identifier]->Location = $myrow[9]; - $_SESSION['Items'.$identifier]->DeliverBlind = $myrow[10]; - $_SESSION['Items'.$identifier]->DeliveryDays = $myrow[11]; - $_SESSION['Items'.$identifier]->LocationName = $myrow[12]; + $myrow = DB_fetch_array($result); + $_SESSION['Items'.$identifier]->DeliverTo = $myrow['brname']; + $_SESSION['Items'.$identifier]->DelAdd1 = $myrow['braddress1']; + $_SESSION['Items'.$identifier]->DelAdd2 = $myrow['braddress2']; + $_SESSION['Items'.$identifier]->DelAdd3 = $myrow['braddress3']; + $_SESSION['Items'.$identifier]->DelAdd4 = $myrow['braddress4']; + $_SESSION['Items'.$identifier]->DelAdd5 = $myrow['braddress5']; + $_SESSION['Items'.$identifier]->DelAdd6 = $myrow['braddress6']; + $_SESSION['Items'.$identifier]->PhoneNo = $myrow['phoneno']; + $_SESSION['Items'.$identifier]->Email = $myrow['email']; + $_SESSION['Items'.$identifier]->Location = $myrow['defaultlocation']; + $_SESSION['Items'.$identifier]->DeliverBlind = $myrow['deliverblind']; + $_SESSION['Items'.$identifier]->DeliveryDays = $myrow['estdeliverydays']; + $_SESSION['Items'.$identifier]->LocationName = $myrow['locationname']; } else { prnMsg(_('Sorry, your account has been put on hold for some reason, please contact the credit control personnel.'),'warn'); include('includes/footer.inc'); @@ -581,21 +583,21 @@ echo '<table cellpadding="3" colspan="4" class="selection"> <tr> <td><h5>' . _('Part of the Customer Branch Name') . ':</h5></td> - <td><input tabindex=1 type="Text" name="CustKeywords" size=20 maxlength=25></td> + <td><input tabindex="1" type="text" name="CustKeywords" size="20" maxlength="25" /></td> <td><h2><b>' . _('OR') . '</b></h2></td> <td><h5>' . _('Part of the Customer Branch Code') . ':</h5></td> - <td><input tabindex=2 type="text" name="CustCode" size=15 maxlength=18></td> + <td><input tabindex=2 type="text" name="CustCode" size="15" maxlength="18" /></td> <td><h2><b>' . _('OR') . '</b></h2></td> <td><h5>' . _('Part of the Branch Phone Number') . ':</h5></td> - <td><input tabindex=3 type="text" name="CustPhone" size=15 maxlength=18></td> + <td><input tabindex=3 type="text" name="CustPhone" size="15" maxlength="18" /></td> </tr> </table> - <br /><div class="centre"><input tabindex=4 type="submit" name="SearchCust" value="' . _('Search Now') . '" /> - <input tabindex=5 type="submit" action="reset" value="' . _('Reset') . '"></div>'; + <br /><div class="centre"><input tabindex="4" type="submit" name="SearchCust" value="' . _('Search Now') . '" /> + <input tabindex=5 type="submit" action="reset" value="' . _('Reset') . '" /></div>'; if (isset($result_CustSelect)) { - echo '<table cellpadding=2 colspan=7>'; + echo '<table class="selection">'; $TableHeader = '<br /><tr> <th>' . _('Customer') . '</th> @@ -625,8 +627,9 @@ } else { echo '<td></td>'; } - echo '<td><input tabindex='.($j+5).' type=submit name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '"></td> - <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'"><input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /> + echo '<td><input tabindex="'.strval($j+5).'" type="submit" name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '" /></td> + <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'" /> + <input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /> <td>'.$myrow['contactname'].'</td> <td>'.$myrow['phoneno'].'</td> <td>'.$myrow['faxno'].'</td> @@ -636,7 +639,7 @@ //end of page full new headings if } //end of while loop - echo '<input type="hidden" name="JustSelectedACustomer" value="Yes">'; + echo '<input type="hidden" name="JustSelectedACustomer" value="Yes" />'; echo '</table></form>'; }//end if results to show @@ -1094,7 +1097,7 @@ prnMsg( _('You are attempting to make the quantity ordered a quantity less than has already been invoiced') . '. ' . _('The quantity delivered and invoiced cannot be modified retrospectively'),'warn'); } elseif ($OrderLine->Quantity !=$Quantity OR $OrderLine->Price != $Price - OR ABS($OrderLine->DiscountPercent -$DiscountPercentage/100) >0.001 + OR ABS($OrderLine->DiscountPercent - $DiscountPercentage/100) >0.001 OR $OrderLine->Narrative != $Narrative OR $OrderLine->ItemDue != $_POST['ItemDue_' . $OrderLine->LineNumber] OR $OrderLine->POLine != $_POST['POLine_' . $OrderLine->LineNumber]) { @@ -1356,17 +1359,17 @@ echo $RowStarter; if($_SESSION['Items'.$identifier]->DefaultPOLine ==1){ //show the input field only if required - echo '<td><input tabindex=1 type="text" name="POLine_' . $OrderLine->LineNumber . '" size=20 maxlength=20 value=' . $OrderLine->POLine . '></td>'; + echo '<td><input tabindex="1" type="text" name="POLine_' . $OrderLine->LineNumber . '" size="20" maxlength="20" value="' . $OrderLine->POLine . '" /></td>'; } else { - echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="">'; + echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="" />'; } echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> <td>' . $OrderLine->ItemDescription . '</td>'; - echo '<td><input class="number" tabindex=2 type=tect name="Quantity_' . $OrderLine->LineNumber . '" size=6 maxlength=6 value=' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '>'; + echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . $OrderLine->LineNumber . '" size="6" maxlength="6" value="' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '" />'; if ($QtyRemain != $QtyOrdered){ - echo '<br />'.locale_number_format($OrderLine->QtyInv,$OrderLine->DecimalPlaces) .' of '.locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces).' invoiced'; + echo '<br />'.locale_number_format($OrderLine->QtyInv,$OrderLine->DecimalPlaces) .' ' . _('of') . ' ' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces).' ' . _('invoiced'); } echo '</td> <td class="number">' . locale_number_format($OrderLine->QOHatLoc,$OrderLine->DecimalPlaces) . '</td> @@ -1374,12 +1377,12 @@ if (in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ /*OK to display with discount if it is an internal user with appropriate permissions */ - echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size=16 maxlength=16 value=' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '></td> - <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size=5 maxlength=4 value=' . locale_number_format(($OrderLine->DiscountPercent * 100),2) . '></td> - <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size=3 maxlength=40 value=' . locale_number_format($OrderLine->GPPercent,2) . '></td>'; + echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size="16" maxlength="16" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td> + <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size="5" maxlength="4" value="' . locale_number_format(($OrderLine->DiscountPercent * 100),2) . '" /></td> + <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size="4" maxlength="40" value="' . locale_number_format($OrderLine->GPPercent,2) . '" /></td>'; } else { echo '<td class="number">' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td><td></td>'; - echo '<input type="hidden" name="Price_' . $OrderLine->LineNumber . '" value=' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '>'; + echo '<input type="hidden" name="Price_' . $OrderLine->LineNumber . '" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" />'; } if ($_SESSION['Items'.$identifier]->Some_Already_Delivered($OrderLine->LineNumber)){ $RemTxt = _('Clear Remaining'); @@ -1434,8 +1437,8 @@ echo '<br /> <div class="centre"> - <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '"> - <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '"> + <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" /> + <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '" /> </div> <hr />'; } # end of if lines Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2011-11-16 07:04:20 UTC (rev 4746) +++ trunk/includes/SQL_CommonFunctions.inc 2011-11-16 09:23:02 UTC (rev 4747) @@ -128,7 +128,7 @@ if (DB_num_rows($GetAccountBalanceResult)==1){ $myrow = DB_fetch_array($GetAccountBalanceResult); - $CreditAvailable = filter_number_format($myrow['creditlimit'] - $myrow['balance']); + $CreditAvailable = $myrow['creditlimit'] - $myrow['balance']; } else { $sql = "SELECT creditlimit FROM debtorsmaster @@ -180,7 +180,7 @@ '" . $PeriodNo . "', '" . $StockGLCode['adjglact'] . "', '" . $StockID . ' ' . _('cost was') . ' ' . $OldCost . ' ' . _('changed to') . ' ' . $NewCost . ' x ' . _('Quantity on hand of') . ' ' . $QOH . "', - '" . filter_number_format(-$ValueOfChange) . "')"; + '" . -$ValueOfChange . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL credit for the stock cost adjustment posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -199,7 +199,7 @@ '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', '" . $StockID . ' ' . _('cost was') . ' ' . $OldCost . ' ' . _('changed to') .' ' . $NewCost . ' x ' . _('Quantity on hand of') . ' ' . $QOH . "', - '" . filter_number_format($ValueOfChange) . "')"; + '" . $ValueOfChange . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL debit for stock cost adjustment posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -248,7 +248,7 @@ } /* Accepts work order information and iterates through the bom, inserting real components (dissolving phantom assemblies) */ -function WoRealRequirements($db, $WO, $LocCode, $StockID, $Qty=1, $ParentID="") { +function WoRealRequirements($db, $WO, $LocCode, $StockID, $Qty=1, $ParentID='') { // remember, 'G' is for ghost (phantom part type) @@ -267,7 +267,7 @@ SELECT '" . $WO . "', '" . $ParentID . "', bom.component, - bom.quantity*" . filter_number_format($Qty) . ", + bom.quantity*" . $Qty . ", materialcost+labourcost+overheadcost, bom.autoissue FROM bom INNER JOIN stockmaster This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-16 07:04:31
|
Revision: 4746 http://web-erp.svn.sourceforge.net/web-erp/?rev=4746&view=rev Author: daintree Date: 2011-11-16 07:04:20 +0000 (Wed, 16 Nov 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/AgedDebtors.php trunk/Customers.php trunk/Prices_Customer.php trunk/StockAdjustments.php trunk/StockSerialItems.php trunk/doc/Change.log trunk/doc/Manual/ManualContributors.html trunk/doc/README.txt trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/LanguageSetup.php trunk/includes/session.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/ReportCreator.php Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/AgedDebtors.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -46,7 +46,7 @@ THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END ) AS due, - Sum( + SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") @@ -57,7 +57,7 @@ ELSE 0 END END ) AS overdue1, - Sum( + SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays2'] . ") @@ -92,7 +92,7 @@ holdreasons.dissallowinvoices, holdreasons.reasondescription HAVING - Sum(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) <>0"; + ABS(SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)) >0.005"; } elseif ($_POST['All_Or_Overdues']=='OverduesOnly') { @@ -165,7 +165,7 @@ debtorsmaster.creditlimit, holdreasons.dissallowinvoices, holdreasons.reasondescription - HAVING Sum( + HAVING SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") @@ -176,7 +176,7 @@ THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END - ) > 0"; + ) > 0.01"; } elseif ($_POST['All_Or_Overdues']=='HeldOnly'){ @@ -254,13 +254,12 @@ debtorsmaster.creditlimit, holdreasons.dissallowinvoices, holdreasons.reasondescription - HAVING Sum( + HAVING ABS(SUM( debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - - debtortrans.alloc - ) <>0"; + debtortrans.alloc)) >0.005"; } $CustomerResult = DB_query($SQL,$db,'','',False,False); /*dont trap errors handled below*/ Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/Customers.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -501,18 +501,27 @@ <td><input tabindex=10 type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" value="' . $DateString . '" size=12 maxlength=10></td></tr>'; echo '</table></td> - <td><table class="selection">'; - - echo '<tr><td>' . _('Discount Percent') . ':</td> - <td><input tabindex=11 type="textbox" class="number" name="Discount" value=0 size=5 maxlength=4></td></tr>'; - echo '<tr><td>' . _('Discount Code') . ':</td> - <td><input tabindex=12 type="text" name="DiscountCode" size=3 maxlength=2></td></tr>'; - echo '<tr><td>' . _('Payment Discount Percent') . ':</td> - <td><input tabindex=13 type="textbox" class ="number" name="PymtDiscount" value=0 size=5 maxlength=4></td></tr>'; - echo '<tr><td>' . _('Credit Limit') . ':</td> - <td><input tabindex=14 type="text" class="number" name="CreditLimit" value=' . $_SESSION['DefaultCreditLimit'] . ' size=16 maxlength=14></td></tr>'; - echo '<tr><td>' . _('Tax Reference') . ':</td> - <td><input tabindex=15 type="text" name="TaxRef" size=22 maxlength=20></td></tr>'; + <td><table class="selection"> + <tr> + <td>' . _('Discount Percent') . ':</td> + <td><input tabindex="11" type="textbox" class="number" name="Discount" value=0 size="5" maxlength="4" /></td> + </tr> + <tr> + <td>' . _('Discount Code') . ':</td> + <td><input tabindex="12" type="text" name="DiscountCode" size="3" maxlength="2" /></td> + </tr> + <tr> + <td>' . _('Payment Discount Percent') . ':</td> + <td><input tabindex="13" type="textbox" class ="number" name="PymtDiscount" value="0" size="5" maxlength="4" /></td> + </tr> + <tr> + <td>' . _('Credit Limit') . ':</td> + <td><input tabindex="14" type="text" class="number" name="CreditLimit" value="' . locale_number_format($_SESSION['DefaultCreditLimit'],0) . '" size="16" maxlength="14" /></td> + </tr> + <tr> + <td>' . _('Tax Reference') . ':</td> + <td><input tabindex=15 type="text" name="TaxRef" size="22" maxlength="20" /></td> + </tr>'; $result=DB_query("SELECT terms, termsindicator FROM paymentterms",$db); if (DB_num_rows($result)==0){ @@ -520,8 +529,9 @@ echo '<tr><td colspan=2>' . prnMsg(_('There are no payment terms currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; } else { - echo '<tr><td>' . _('Payment Terms') . ':</td> - <td><select tabindex=15 name="PaymentTerms">'; + echo '<tr> + <td>' . _('Payment Terms') . ':</td> + <td><select tabindex=15 name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; @@ -530,12 +540,16 @@ echo '</select></td></tr>'; } - echo '<tr><td>' . _('Credit Status') . ':</td><td><select tabindex=16 name="HoldReason">'; + echo '<tr> + <td>' . _('Credit Status') . ':</td> + <td><select tabindex="16" name="HoldReason">'; $result=DB_query("SELECT reasoncode, reasondescription FROM holdreasons",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr> + <td colspan="2">' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td> + </tr>'; } else { while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; @@ -547,7 +561,9 @@ $result=DB_query("SELECT currency, currabrev FROM currencies",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr> + <td colspan="2">' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td> + </tr>'; } else { if (!isset($_POST['CurrCode'])){ $CurrResult = DB_query("SELECT currencydefault FROM companies WHERE coycode=1",$db); @@ -573,8 +589,8 @@ echo '<tr> <td>' . _('Customer PO Line on SO') . ':</td> <td><select tabindex="18" name="CustomerPOLine"> - <option selected value=0>' . _('No') . '</option> - <option value=1>' . _('Yes') . '</option> + <option selected value="0">' . _('No') . '</option> + <option value="1">' . _('Yes') . '</option> </select> </td> </tr> @@ -957,11 +973,11 @@ <td>' . _('Invoice Addressing') . ':</td> <td><select name="AddrInvBranch">'; if ($_POST['InvAddrBranch']==0){ - echo '<option selected value=0>' . _('Address to HO') . '</option>'; - echo '<option value=1>' . _('Address to Branch') . '</option>'; + echo '<option selected value="0">' . _('Address to HO') . '</option>'; + echo '<option value="1">' . _('Address to Branch') . '</option>'; } else { - echo '<option value=0>' . _('Address to HO') . '</option>'; - echo '<option selected value=1>' . _('Address to Branch') . '</option>'; + echo '<option value="0">' . _('Address to HO') . '</option>'; + echo '<option selected value="1">' . _('Address to Branch') . '</option>'; } } @@ -1009,7 +1025,7 @@ <th>' . _('Email') . '</th> <th>' . _('Notes') . '</th> <th>' . _('Edit') . '</th> - <th colspan="2"><input type="Submit" name="AddContact" value="' . _('Add Contact') . '" /></th> + <th colspan="2"><input type="submit" name="AddContact" value="' . _('Add Contact') . '" /></th> </tr>'; } $k=0; //row colour counter Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/Prices_Customer.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -7,7 +7,8 @@ debtorsmaster.currcode, debtorsmaster.salestype, currencies.decimalplaces AS currdecimalplaces - FROM debtorsmaster + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev WHERE debtorsmaster.debtorno='" . $_SESSION['CustomerID'] . "'",$db); $myrow = DB_fetch_array($result); @@ -267,15 +268,16 @@ $EndDateDisplay = ConvertSQLDate($myrow['enddate']); } echo '<tr bgcolor="#CCCCCC"> - <td class="number">'.locale_number_format($myrow['price'],$CurrDecimalPlaces).'</td> - <td>' . $Branch.'</td> - <td>'.$myrow['units'].'</td> - <td class="number">'.$myrow['conversionfactor'].'</td> - <td>'.ConvertSQLDate($myrow['startdate']).'</td> - <td>'.$EndDateDisplay.'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. - '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td></tr>'; + <td class="number">'.locale_number_format($myrow['price'],$CurrDecimalPlaces).'</td> + <td>' . $Branch.'</td> + <td>'.$myrow['units'].'</td> + <td class="number">'.$myrow['conversionfactor'].'</td> + <td>'.ConvertSQLDate($myrow['startdate']).'</td> + <td>'.$EndDateDisplay.'</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. + '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td> + </tr>'; } //END WHILE LIST LOOP Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/StockAdjustments.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -27,7 +27,8 @@ $result = DB_query("SELECT description, controlled, serialised, - decimalplaces + decimalplaces, + perishable FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); $myrow = DB_fetch_array($result); @@ -213,13 +214,14 @@ loccode, serialno, qualitytext, - quantity) + quantity, + expirationdate) VALUES ('" . $_SESSION['Adjustment']->StockID . "', '" . $_SESSION['Adjustment']->StockLocation . "', '" . $Item->BundleRef . "', '', - '" . $Item->BundleQty . "' - )"; + '" . $Item->BundleQty . "', + '" . FormatDateForSQL($Item->ExpiryDate) ."')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); $DbgMsg = _('The following SQL to update the serial stock item record was used'); @@ -471,4 +473,4 @@ echo '</div></form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/StockSerialItems.php =================================================================== --- trunk/StockSerialItems.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/StockSerialItems.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -85,7 +85,7 @@ <th colspan="11"><font color="navy" size="2">' . $StockID .'-'. $Description .'</b> (' . _('In units of') . ' ' . $UOM . ')</font></th> </tr>'; -if ($Serialised == 1){ +if ($Serialised == 1 and $Perishable==0){ $tableheader = '<tr> <th>' . _('Serial Number') . '</th> <th></th> @@ -93,6 +93,15 @@ <th></th> <th>' . _('Serial Number') . '</th> </tr>'; +} else if ($Serialised == 1 and $Perishable==1){ + $tableheader = '<tr> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + </tr>'; } else if ($Serialised == 0 and $Perishable==0){ $tableheader = '<tr> <th>' . _('Batch/Bundle Ref') . '</th> @@ -136,9 +145,12 @@ $TotalQuantity += $myrow['quantity']; - if ($Serialised == 1){ + if ($Serialised == 1 and $Perishable==0){ echo '<td>'.$myrow['serialno'].'</td>'; echo '<th></th>'; + } else if ($Serialised == 1 and $Perishable==1) { + echo '<td>'.$myrow['serialno'].'</td> + echo '<td>' . ConvertSQLDate($myrow['expirationdate']). '</td>'; } else if ($Serialised == 0 and $Perishable==0) { echo '<td>'.$myrow['serialno'].'</td> <td class="number">'.locale_number_format($myrow['quantity'],$DecimalPlaces).'</td>'; @@ -168,4 +180,4 @@ echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/Change.log 2011-11-16 07:04:20 UTC (rev 4746) @@ -1,5 +1,11 @@ webERP Change Log +16/11/11 Phil: Prices_Customer.php sql error had neglected to include currencies table to get the number of decimalplaces to show +16/11/11 Phil: reportwriter/WriteReport.inc modified to use OutputD function in class.pdf.inc +15/11/11 Phil: includes/LanguageSetup.php was not including LanguagesArray.php in reportwriter as PathPrefix was not prepended +14/11/11 Don Grames: AgedDebtors.php now ignores balances with an absolute value of < 0.005 +14/11/11 Dafydd Crosby: Allow serialised perishible items to have expiration dates. + 13/11/11 Release 4.06RC2 12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines Modified: trunk/doc/Manual/ManualContributors.html =================================================================== --- trunk/doc/Manual/ManualContributors.html 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/Manual/ManualContributors.html 2011-11-16 07:04:20 UTC (rev 4746) @@ -17,6 +17,8 @@ <br /><br /> Danie Brink <br /><br /> +Daffyd Crosby +<br /><br /> Phil Daintree <br /><br /> Murray Dancey Modified: trunk/doc/README.txt =================================================================== --- trunk/doc/README.txt 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/README.txt 2011-11-16 07:04:20 UTC (rev 4746) @@ -4,7 +4,7 @@ Version 4.x of webERP -Now fully utf-8 compatible. Now reports can be created in any language using the utf-8 character set, the resultant pdf reports use Adobe CID fonts and the fonts that come with the Adobe Acrobat reader on client computers. This avoids the problem of large pdf downloads on the creation of reports as the alternative is to bundle the enormous utf-8 fonts with the reports. +Now fully utf-8 compatible. Now reports can be created in any language using the utf-8 character set, the resultant pdf reports use Adobe CID fonts and the fonts that come with the Adobe Acrobat reader on client computers. This avoids the problem of large pdf downloads on the creation of reports as the alternative is to bundle the enormous utf-8 fonts with the reports. Also, this release comes with an automated database upgrade system, so that database changes in later versions will be applied automatically on upgrade of the scripts. @@ -38,7 +38,7 @@ DEVELOPING -Contributions of code are documents including HOW-TOs with screen-shots etc are encouraged. Contributions in the form of bug reports or other feedback through the mainling lists above are also encouraged. +Contributions of code are documents including HOW-TOs with screen-shots etc are encouraged. This can be done directly on the wiki at http://www.weberp.org by any registered user of the wiki. Contributions in the form of bug reports or other feedback through the mainling lists above are also encouraged. Guidelines for contributing code are in the document at http://www.weberp.org/wikidocs/ContributingtowebERP developers should read this document carefully and follow the guidelines therein. Standards and conventions used in the code are rigorously applied in the interests of consistency and readability. Code submitted that does not conform to these standards will be changed so it does where possible. If the job to make the code conform to webERP standards is too large then the code will not be included. TRANSLATIONS Modified: trunk/includes/InputSerialItems.php =================================================================== --- trunk/includes/InputSerialItems.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/InputSerialItems.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -95,9 +95,16 @@ $myrow=DB_fetch_array($result); $Perishable=$myrow['perishable']; if ($LineItem->Serialised==1){ - $tableheader .= '<tr> - <th>'. _('Serial No').'</th> - </tr>'; + if ($Perishable==0) { + $tableheader .= '<tr> + <th>'. _('Serial No'). '</th> + </tr>'; + } else { + $tableheader .= '<tr> + <th>'. _('Serial No'). '</th> + <th>'. _('Expiry Date'). '<th> + </tr>'; + } } else if ($LineItem->Serialised==0 AND $Perishable==1){ $tableheader = '<tr> <th>'. _('Batch/Roll/Bundle'). ' #</th> @@ -119,4 +126,4 @@ } else { /*KEYED or BARCODE */ include('includes/InputSerialItemsKeyed.php'); } -?> \ No newline at end of file +?> Modified: trunk/includes/InputSerialItemsKeyed.php =================================================================== --- trunk/includes/InputSerialItemsKeyed.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/InputSerialItemsKeyed.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -49,10 +49,10 @@ echo '<td>' . $Bundle->BundleRef . '</td>'; - if ($LineItem->Serialised==0 and $Perishable==0){ + if ($LineItem->Serialised==0){ echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; - } else if ($LineItem->Serialised==0 and $Perishable==1){ - echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; + } + if ($Perishable==1){ echo '<td class="number">' . $Bundle->ExpiryDate . '</td>'; } echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'&identifier='.$identifier.'">'. _('Delete'). '</a></td> @@ -129,7 +129,12 @@ into the form for entry of quantities manually */ if ($LineItem->Serialised==1){ - echo '<input type=hidden name="Qty' . ($StartAddingAt+$i) .'" value=1></td></tr>'; + if ($Perishable==0) { + echo '<input type="hidden" name="Qty' . ($StartAddingAt+$i) .'" value="1" /></tr>'; + } else { + echo '<td><input type="hidden" name="Qty' . ($StartAddingAt+$i) .'" value="1" /><input type="text" class="date" name="ExpiryDate' . ($StartAddingAt+$i) .'" size="11" + value="" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" /></td></tr>'; + } } else if ($LineItem->Serialised==0 and $Perishable==1) { echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$i) .'" size=11 maxlength="10" /></td>'; echo '<td><input type="text" class="date" name="ExpiryDate' . ($StartAddingAt+$i) .'" size=11 @@ -159,4 +164,4 @@ document.Ga6uF5Wa.SerialNo0.focus(); //]]> </script>'; /*end of nested table */ -?> \ No newline at end of file +?> Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/LanguageSetup.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -60,9 +60,9 @@ return $text; } } - include('includes/LanguagesArray.php'); + include($PathPrefix . 'includes/LanguagesArray.php'); } else { - include('includes/LanguagesArray.php'); + include($PathPrefix . 'includes/LanguagesArray.php'); $LocaleSet = setlocale (LC_ALL, $_SESSION['Language'],$LanguagesArray[$_SESSION['Language']]['WindowsLocale']); $LocaleSet = setlocale (LC_NUMERIC, 'C','en_GB.utf8','en_GB','en_US','english-us'); Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/session.inc 2011-11-16 07:04:20 UTC (rev 4746) @@ -73,6 +73,7 @@ include($PathPrefix . 'includes/LanguageSetup.php'); + if (!isset($AllowAnyone)){ /* only do security checks if AllowAnyone is not true */ include $PathPrefix . 'includes/UserLogin.php'; /* Login checking and setup */ Modified: trunk/reportwriter/WriteReport.inc =================================================================== --- trunk/reportwriter/WriteReport.inc 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/reportwriter/WriteReport.inc 2011-11-16 07:04:20 UTC (rev 4746) @@ -583,18 +583,8 @@ function GeneratePDFFile($Data, $Prefs) { $pdf=new PDF(); $pdf->ReportTable($Data); - $pdfcode = $pdf->output(); - $len = mb_strlen($pdfcode); $ReportName = ReplaceNonAllowedCharacters($Prefs['reportname']) .'.pdf'; - - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename="' . $ReportName . '"'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Stream($ReportName); + $pdf->OutputD($ReportName); exit(); // needs to be here to properly render the pdf file. } Modified: trunk/reportwriter/admin/ReportCreator.php =================================================================== --- trunk/reportwriter/admin/ReportCreator.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/reportwriter/admin/ReportCreator.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -1,5 +1,4 @@ <?php -/* $Revision: 1.6 $ */ /* This script has the responsibility to gather basic information necessary to retrieve data for reports. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-16 07:04:31
|
Revision: 4746 http://web-erp.svn.sourceforge.net/web-erp/?rev=4746&view=rev Author: daintree Date: 2011-11-16 07:04:20 +0000 (Wed, 16 Nov 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/AgedDebtors.php trunk/Customers.php trunk/Prices_Customer.php trunk/StockAdjustments.php trunk/StockSerialItems.php trunk/doc/Change.log trunk/doc/Manual/ManualContributors.html trunk/doc/README.txt trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/LanguageSetup.php trunk/includes/session.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/ReportCreator.php Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/AgedDebtors.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -46,7 +46,7 @@ THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END ) AS due, - Sum( + SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") @@ -57,7 +57,7 @@ ELSE 0 END END ) AS overdue1, - Sum( + SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays2'] . ") @@ -92,7 +92,7 @@ holdreasons.dissallowinvoices, holdreasons.reasondescription HAVING - Sum(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) <>0"; + ABS(SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)) >0.005"; } elseif ($_POST['All_Or_Overdues']=='OverduesOnly') { @@ -165,7 +165,7 @@ debtorsmaster.creditlimit, holdreasons.dissallowinvoices, holdreasons.reasondescription - HAVING Sum( + HAVING SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") @@ -176,7 +176,7 @@ THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END - ) > 0"; + ) > 0.01"; } elseif ($_POST['All_Or_Overdues']=='HeldOnly'){ @@ -254,13 +254,12 @@ debtorsmaster.creditlimit, holdreasons.dissallowinvoices, holdreasons.reasondescription - HAVING Sum( + HAVING ABS(SUM( debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - - debtortrans.alloc - ) <>0"; + debtortrans.alloc)) >0.005"; } $CustomerResult = DB_query($SQL,$db,'','',False,False); /*dont trap errors handled below*/ Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/Customers.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -501,18 +501,27 @@ <td><input tabindex=10 type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" value="' . $DateString . '" size=12 maxlength=10></td></tr>'; echo '</table></td> - <td><table class="selection">'; - - echo '<tr><td>' . _('Discount Percent') . ':</td> - <td><input tabindex=11 type="textbox" class="number" name="Discount" value=0 size=5 maxlength=4></td></tr>'; - echo '<tr><td>' . _('Discount Code') . ':</td> - <td><input tabindex=12 type="text" name="DiscountCode" size=3 maxlength=2></td></tr>'; - echo '<tr><td>' . _('Payment Discount Percent') . ':</td> - <td><input tabindex=13 type="textbox" class ="number" name="PymtDiscount" value=0 size=5 maxlength=4></td></tr>'; - echo '<tr><td>' . _('Credit Limit') . ':</td> - <td><input tabindex=14 type="text" class="number" name="CreditLimit" value=' . $_SESSION['DefaultCreditLimit'] . ' size=16 maxlength=14></td></tr>'; - echo '<tr><td>' . _('Tax Reference') . ':</td> - <td><input tabindex=15 type="text" name="TaxRef" size=22 maxlength=20></td></tr>'; + <td><table class="selection"> + <tr> + <td>' . _('Discount Percent') . ':</td> + <td><input tabindex="11" type="textbox" class="number" name="Discount" value=0 size="5" maxlength="4" /></td> + </tr> + <tr> + <td>' . _('Discount Code') . ':</td> + <td><input tabindex="12" type="text" name="DiscountCode" size="3" maxlength="2" /></td> + </tr> + <tr> + <td>' . _('Payment Discount Percent') . ':</td> + <td><input tabindex="13" type="textbox" class ="number" name="PymtDiscount" value="0" size="5" maxlength="4" /></td> + </tr> + <tr> + <td>' . _('Credit Limit') . ':</td> + <td><input tabindex="14" type="text" class="number" name="CreditLimit" value="' . locale_number_format($_SESSION['DefaultCreditLimit'],0) . '" size="16" maxlength="14" /></td> + </tr> + <tr> + <td>' . _('Tax Reference') . ':</td> + <td><input tabindex=15 type="text" name="TaxRef" size="22" maxlength="20" /></td> + </tr>'; $result=DB_query("SELECT terms, termsindicator FROM paymentterms",$db); if (DB_num_rows($result)==0){ @@ -520,8 +529,9 @@ echo '<tr><td colspan=2>' . prnMsg(_('There are no payment terms currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; } else { - echo '<tr><td>' . _('Payment Terms') . ':</td> - <td><select tabindex=15 name="PaymentTerms">'; + echo '<tr> + <td>' . _('Payment Terms') . ':</td> + <td><select tabindex=15 name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; @@ -530,12 +540,16 @@ echo '</select></td></tr>'; } - echo '<tr><td>' . _('Credit Status') . ':</td><td><select tabindex=16 name="HoldReason">'; + echo '<tr> + <td>' . _('Credit Status') . ':</td> + <td><select tabindex="16" name="HoldReason">'; $result=DB_query("SELECT reasoncode, reasondescription FROM holdreasons",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr> + <td colspan="2">' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td> + </tr>'; } else { while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; @@ -547,7 +561,9 @@ $result=DB_query("SELECT currency, currabrev FROM currencies",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr> + <td colspan="2">' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td> + </tr>'; } else { if (!isset($_POST['CurrCode'])){ $CurrResult = DB_query("SELECT currencydefault FROM companies WHERE coycode=1",$db); @@ -573,8 +589,8 @@ echo '<tr> <td>' . _('Customer PO Line on SO') . ':</td> <td><select tabindex="18" name="CustomerPOLine"> - <option selected value=0>' . _('No') . '</option> - <option value=1>' . _('Yes') . '</option> + <option selected value="0">' . _('No') . '</option> + <option value="1">' . _('Yes') . '</option> </select> </td> </tr> @@ -957,11 +973,11 @@ <td>' . _('Invoice Addressing') . ':</td> <td><select name="AddrInvBranch">'; if ($_POST['InvAddrBranch']==0){ - echo '<option selected value=0>' . _('Address to HO') . '</option>'; - echo '<option value=1>' . _('Address to Branch') . '</option>'; + echo '<option selected value="0">' . _('Address to HO') . '</option>'; + echo '<option value="1">' . _('Address to Branch') . '</option>'; } else { - echo '<option value=0>' . _('Address to HO') . '</option>'; - echo '<option selected value=1>' . _('Address to Branch') . '</option>'; + echo '<option value="0">' . _('Address to HO') . '</option>'; + echo '<option selected value="1">' . _('Address to Branch') . '</option>'; } } @@ -1009,7 +1025,7 @@ <th>' . _('Email') . '</th> <th>' . _('Notes') . '</th> <th>' . _('Edit') . '</th> - <th colspan="2"><input type="Submit" name="AddContact" value="' . _('Add Contact') . '" /></th> + <th colspan="2"><input type="submit" name="AddContact" value="' . _('Add Contact') . '" /></th> </tr>'; } $k=0; //row colour counter Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/Prices_Customer.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -7,7 +7,8 @@ debtorsmaster.currcode, debtorsmaster.salestype, currencies.decimalplaces AS currdecimalplaces - FROM debtorsmaster + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev WHERE debtorsmaster.debtorno='" . $_SESSION['CustomerID'] . "'",$db); $myrow = DB_fetch_array($result); @@ -267,15 +268,16 @@ $EndDateDisplay = ConvertSQLDate($myrow['enddate']); } echo '<tr bgcolor="#CCCCCC"> - <td class="number">'.locale_number_format($myrow['price'],$CurrDecimalPlaces).'</td> - <td>' . $Branch.'</td> - <td>'.$myrow['units'].'</td> - <td class="number">'.$myrow['conversionfactor'].'</td> - <td>'.ConvertSQLDate($myrow['startdate']).'</td> - <td>'.$EndDateDisplay.'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. - '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td></tr>'; + <td class="number">'.locale_number_format($myrow['price'],$CurrDecimalPlaces).'</td> + <td>' . $Branch.'</td> + <td>'.$myrow['units'].'</td> + <td class="number">'.$myrow['conversionfactor'].'</td> + <td>'.ConvertSQLDate($myrow['startdate']).'</td> + <td>'.$EndDateDisplay.'</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. + '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td> + </tr>'; } //END WHILE LIST LOOP Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/StockAdjustments.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -27,7 +27,8 @@ $result = DB_query("SELECT description, controlled, serialised, - decimalplaces + decimalplaces, + perishable FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); $myrow = DB_fetch_array($result); @@ -213,13 +214,14 @@ loccode, serialno, qualitytext, - quantity) + quantity, + expirationdate) VALUES ('" . $_SESSION['Adjustment']->StockID . "', '" . $_SESSION['Adjustment']->StockLocation . "', '" . $Item->BundleRef . "', '', - '" . $Item->BundleQty . "' - )"; + '" . $Item->BundleQty . "', + '" . FormatDateForSQL($Item->ExpiryDate) ."')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); $DbgMsg = _('The following SQL to update the serial stock item record was used'); @@ -471,4 +473,4 @@ echo '</div></form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/StockSerialItems.php =================================================================== --- trunk/StockSerialItems.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/StockSerialItems.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -85,7 +85,7 @@ <th colspan="11"><font color="navy" size="2">' . $StockID .'-'. $Description .'</b> (' . _('In units of') . ' ' . $UOM . ')</font></th> </tr>'; -if ($Serialised == 1){ +if ($Serialised == 1 and $Perishable==0){ $tableheader = '<tr> <th>' . _('Serial Number') . '</th> <th></th> @@ -93,6 +93,15 @@ <th></th> <th>' . _('Serial Number') . '</th> </tr>'; +} else if ($Serialised == 1 and $Perishable==1){ + $tableheader = '<tr> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + </tr>'; } else if ($Serialised == 0 and $Perishable==0){ $tableheader = '<tr> <th>' . _('Batch/Bundle Ref') . '</th> @@ -136,9 +145,12 @@ $TotalQuantity += $myrow['quantity']; - if ($Serialised == 1){ + if ($Serialised == 1 and $Perishable==0){ echo '<td>'.$myrow['serialno'].'</td>'; echo '<th></th>'; + } else if ($Serialised == 1 and $Perishable==1) { + echo '<td>'.$myrow['serialno'].'</td> + echo '<td>' . ConvertSQLDate($myrow['expirationdate']). '</td>'; } else if ($Serialised == 0 and $Perishable==0) { echo '<td>'.$myrow['serialno'].'</td> <td class="number">'.locale_number_format($myrow['quantity'],$DecimalPlaces).'</td>'; @@ -168,4 +180,4 @@ echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/Change.log 2011-11-16 07:04:20 UTC (rev 4746) @@ -1,5 +1,11 @@ webERP Change Log +16/11/11 Phil: Prices_Customer.php sql error had neglected to include currencies table to get the number of decimalplaces to show +16/11/11 Phil: reportwriter/WriteReport.inc modified to use OutputD function in class.pdf.inc +15/11/11 Phil: includes/LanguageSetup.php was not including LanguagesArray.php in reportwriter as PathPrefix was not prepended +14/11/11 Don Grames: AgedDebtors.php now ignores balances with an absolute value of < 0.005 +14/11/11 Dafydd Crosby: Allow serialised perishible items to have expiration dates. + 13/11/11 Release 4.06RC2 12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines Modified: trunk/doc/Manual/ManualContributors.html =================================================================== --- trunk/doc/Manual/ManualContributors.html 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/Manual/ManualContributors.html 2011-11-16 07:04:20 UTC (rev 4746) @@ -17,6 +17,8 @@ <br /><br /> Danie Brink <br /><br /> +Daffyd Crosby +<br /><br /> Phil Daintree <br /><br /> Murray Dancey Modified: trunk/doc/README.txt =================================================================== --- trunk/doc/README.txt 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/README.txt 2011-11-16 07:04:20 UTC (rev 4746) @@ -4,7 +4,7 @@ Version 4.x of webERP -Now fully utf-8 compatible. Now reports can be created in any language using the utf-8 character set, the resultant pdf reports use Adobe CID fonts and the fonts that come with the Adobe Acrobat reader on client computers. This avoids the problem of large pdf downloads on the creation of reports as the alternative is to bundle the enormous utf-8 fonts with the reports. +Now fully utf-8 compatible. Now reports can be created in any language using the utf-8 character set, the resultant pdf reports use Adobe CID fonts and the fonts that come with the Adobe Acrobat reader on client computers. This avoids the problem of large pdf downloads on the creation of reports as the alternative is to bundle the enormous utf-8 fonts with the reports. Also, this release comes with an automated database upgrade system, so that database changes in later versions will be applied automatically on upgrade of the scripts. @@ -38,7 +38,7 @@ DEVELOPING -Contributions of code are documents including HOW-TOs with screen-shots etc are encouraged. Contributions in the form of bug reports or other feedback through the mainling lists above are also encouraged. +Contributions of code are documents including HOW-TOs with screen-shots etc are encouraged. This can be done directly on the wiki at http://www.weberp.org by any registered user of the wiki. Contributions in the form of bug reports or other feedback through the mainling lists above are also encouraged. Guidelines for contributing code are in the document at http://www.weberp.org/wikidocs/ContributingtowebERP developers should read this document carefully and follow the guidelines therein. Standards and conventions used in the code are rigorously applied in the interests of consistency and readability. Code submitted that does not conform to these standards will be changed so it does where possible. If the job to make the code conform to webERP standards is too large then the code will not be included. TRANSLATIONS Modified: trunk/includes/InputSerialItems.php =================================================================== --- trunk/includes/InputSerialItems.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/InputSerialItems.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -95,9 +95,16 @@ $myrow=DB_fetch_array($result); $Perishable=$myrow['perishable']; if ($LineItem->Serialised==1){ - $tableheader .= '<tr> - <th>'. _('Serial No').'</th> - </tr>'; + if ($Perishable==0) { + $tableheader .= '<tr> + <th>'. _('Serial No'). '</th> + </tr>'; + } else { + $tableheader .= '<tr> + <th>'. _('Serial No'). '</th> + <th>'. _('Expiry Date'). '<th> + </tr>'; + } } else if ($LineItem->Serialised==0 AND $Perishable==1){ $tableheader = '<tr> <th>'. _('Batch/Roll/Bundle'). ' #</th> @@ -119,4 +126,4 @@ } else { /*KEYED or BARCODE */ include('includes/InputSerialItemsKeyed.php'); } -?> \ No newline at end of file +?> Modified: trunk/includes/InputSerialItemsKeyed.php =================================================================== --- trunk/includes/InputSerialItemsKeyed.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/InputSerialItemsKeyed.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -49,10 +49,10 @@ echo '<td>' . $Bundle->BundleRef . '</td>'; - if ($LineItem->Serialised==0 and $Perishable==0){ + if ($LineItem->Serialised==0){ echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; - } else if ($LineItem->Serialised==0 and $Perishable==1){ - echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; + } + if ($Perishable==1){ echo '<td class="number">' . $Bundle->ExpiryDate . '</td>'; } echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'&identifier='.$identifier.'">'. _('Delete'). '</a></td> @@ -129,7 +129,12 @@ into the form for entry of quantities manually */ if ($LineItem->Serialised==1){ - echo '<input type=hidden name="Qty' . ($StartAddingAt+$i) .'" value=1></td></tr>'; + if ($Perishable==0) { + echo '<input type="hidden" name="Qty' . ($StartAddingAt+$i) .'" value="1" /></tr>'; + } else { + echo '<td><input type="hidden" name="Qty' . ($StartAddingAt+$i) .'" value="1" /><input type="text" class="date" name="ExpiryDate' . ($StartAddingAt+$i) .'" size="11" + value="" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" /></td></tr>'; + } } else if ($LineItem->Serialised==0 and $Perishable==1) { echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$i) .'" size=11 maxlength="10" /></td>'; echo '<td><input type="text" class="date" name="ExpiryDate' . ($StartAddingAt+$i) .'" size=11 @@ -159,4 +164,4 @@ document.Ga6uF5Wa.SerialNo0.focus(); //]]> </script>'; /*end of nested table */ -?> \ No newline at end of file +?> Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/LanguageSetup.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -60,9 +60,9 @@ return $text; } } - include('includes/LanguagesArray.php'); + include($PathPrefix . 'includes/LanguagesArray.php'); } else { - include('includes/LanguagesArray.php'); + include($PathPrefix . 'includes/LanguagesArray.php'); $LocaleSet = setlocale (LC_ALL, $_SESSION['Language'],$LanguagesArray[$_SESSION['Language']]['WindowsLocale']); $LocaleSet = setlocale (LC_NUMERIC, 'C','en_GB.utf8','en_GB','en_US','english-us'); Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/session.inc 2011-11-16 07:04:20 UTC (rev 4746) @@ -73,6 +73,7 @@ include($PathPrefix . 'includes/LanguageSetup.php'); + if (!isset($AllowAnyone)){ /* only do security checks if AllowAnyone is not true */ include $PathPrefix . 'includes/UserLogin.php'; /* Login checking and setup */ Modified: trunk/reportwriter/WriteReport.inc =================================================================== --- trunk/reportwriter/WriteReport.inc 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/reportwriter/WriteReport.inc 2011-11-16 07:04:20 UTC (rev 4746) @@ -583,18 +583,8 @@ function GeneratePDFFile($Data, $Prefs) { $pdf=new PDF(); $pdf->ReportTable($Data); - $pdfcode = $pdf->output(); - $len = mb_strlen($pdfcode); $ReportName = ReplaceNonAllowedCharacters($Prefs['reportname']) .'.pdf'; - - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename="' . $ReportName . '"'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Stream($ReportName); + $pdf->OutputD($ReportName); exit(); // needs to be here to properly render the pdf file. } Modified: trunk/reportwriter/admin/ReportCreator.php =================================================================== --- trunk/reportwriter/admin/ReportCreator.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/reportwriter/admin/ReportCreator.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -1,5 +1,4 @@ <?php -/* $Revision: 1.6 $ */ /* This script has the responsibility to gather basic information necessary to retrieve data for reports. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-12 21:50:45
|
Revision: 4745 http://web-erp.svn.sourceforge.net/web-erp/?rev=4745&view=rev Author: daintree Date: 2011-11-12 21:50:32 +0000 (Sat, 12 Nov 2011) Log Message: ----------- pre 4.06RC2 Modified Paths: -------------- trunk/doc/Change.log trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-12 09:42:34 UTC (rev 4744) +++ trunk/doc/Change.log 2011-11-12 21:50:32 UTC (rev 4745) @@ -1,5 +1,7 @@ webERP Change Log +13/11/11 Release 4.06RC2 + 12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines 12/11/11 Phil: Removed old Numbers to words class code - this code was not in keeping with the rest of the system and not PHP 5 compatible anyway. Replaced with a much simpler function. This code is only used for pre-printed cheques - so it is in that script only. The new function may not effective for other languages but will be easily adapted as needed. The PrintCheque.php script needs to be modified specifically for the business stationery. 10/11/11 Phil: added a function in includes/SQL_CommonFunctions.inc EnsureGLTransBalance that looks at the gltrans entries for a given transaction type and type number and if the total is not zero and less than 0.05 it fudges the largest gltrans record to make the gltrans balance in total - added to ConfirmDispatch_Invoice.php Credit_Invoice.php SelectCreditItems.php CounterSales.php Payments.php CustomerReceipt.php Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-12 09:42:34 UTC (rev 4744) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-12 21:50:32 UTC (rev 4745) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-06 19:49+1300\n" +"POT-Creation-Date: 2011-11-13 10:46+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -140,21 +140,22 @@ #: Areas.php:116 Areas.php:125 BankAccounts.php:158 CreditStatus.php:125 #: Currencies.php:166 Currencies.php:174 Currencies.php:182 #: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306 -#: CustomerBranches.php:316 CustomerTypes.php:147 CustomerTypes.php:157 -#: Customers.php:289 Customers.php:298 Customers.php:306 Customers.php:314 -#: Factors.php:134 FixedAssetCategories.php:133 GLAccounts.php:80 -#: GLAccounts.php:96 Locations.php:237 Locations.php:245 Locations.php:256 -#: Locations.php:265 Locations.php:274 Locations.php:283 Locations.php:292 -#: Locations.php:301 MRPDemandTypes.php:87 PaymentMethods.php:138 -#: PaymentTerms.php:146 PaymentTerms.php:153 PcExpenses.php:158 -#: SalesCategories.php:124 SalesCategories.php:131 SalesPeople.php:150 -#: SalesPeople.php:157 SalesPeople.php:163 SalesTypes.php:140 -#: SalesTypes.php:150 Shippers.php:82 Shippers.php:94 StockCategories.php:181 -#: Stocks.php:615 Stocks.php:624 Stocks.php:632 Stocks.php:640 Stocks.php:648 -#: Stocks.php:656 SupplierTypes.php:145 Suppliers.php:612 Suppliers.php:621 -#: Suppliers.php:629 TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 -#: TaxProvinces.php:129 UnitsOfMeasure.php:135 WWW_Access.php:83 -#: WorkCentres.php:89 WorkCentres.php:95 +#: CustomerBranches.php:316 Customers.php:289 Customers.php:298 +#: Customers.php:306 Customers.php:314 CustomerTypes.php:147 +#: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:133 +#: GLAccounts.php:80 GLAccounts.php:96 Locations.php:237 Locations.php:245 +#: Locations.php:256 Locations.php:265 Locations.php:274 Locations.php:283 +#: Locations.php:292 Locations.php:301 MRPDemandTypes.php:87 +#: PaymentMethods.php:138 PaymentTerms.php:146 PaymentTerms.php:153 +#: PcExpenses.php:158 SalesCategories.php:124 SalesCategories.php:131 +#: SalesPeople.php:150 SalesPeople.php:157 SalesPeople.php:163 +#: SalesTypes.php:140 SalesTypes.php:150 Shippers.php:82 Shippers.php:94 +#: StockCategories.php:181 Stocks.php:615 Stocks.php:624 Stocks.php:632 +#: Stocks.php:640 Stocks.php:648 Stocks.php:656 Suppliers.php:612 +#: Suppliers.php:621 Suppliers.php:629 SupplierTypes.php:145 +#: TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 +#: TaxProvinces.php:129 UnitsOfMeasure.php:135 WorkCentres.php:89 +#: WorkCentres.php:95 WWW_Access.php:83 msgid "There are" msgstr "Jsou zde" @@ -202,25 +203,25 @@ #: AccountGroups.php:223 AccountSections.php:175 AddCustomerContacts.php:25 #: AddCustomerContacts.php:28 AddCustomerNotes.php:103 #: AddCustomerTypeNotes.php:97 AgedDebtors.php:451 AgedSuppliers.php:278 -#: Areas.php:144 AuditTrail.php:11 BOMExtendedQty.php:261 BOMIndented.php:246 -#: BOMIndentedReverse.php:235 BOMInquiry.php:187 BOMListing.php:109 -#: BOMs.php:213 BOMs.php:832 BankReconciliation.php:13 COGSGLPostings.php:18 -#: CompanyPreferences.php:153 CounterSales.php:2010 CounterSales.php:2135 -#: CreditStatus.php:21 Credit_Invoice.php:255 Currencies.php:28 -#: CustEDISetup.php:17 DailyBankTransactions.php:11 DebtorsAtPeriodEnd.php:125 -#: DiscountCategories.php:10 DiscountCategories.php:131 DiscountMatrix.php:16 -#: EDIMessageFormat.php:104 FixedAssetLocations.php:9 -#: FixedAssetRegister.php:13 FixedAssetRegister.php:243 -#: FixedAssetTransfer.php:31 FormDesigner.php:129 GLBalanceSheet.php:362 -#: GLBudgets.php:29 GLJournal.php:246 InventoryPlanning.php:374 -#: InventoryPlanningPrefSupplier.php:467 Labels.php:115 Labels.php:270 -#: MRPReport.php:515 OutstandingGRNs.php:160 PDFPickingList.php:28 -#: PDFPrintLabel.php:140 PDFStockLocTransfer.php:17 POReport.php:60 -#: POReport.php:64 POReport.php:68 PO_AuthorisationLevels.php:10 -#: PO_SelectOSPurchOrder.php:135 PcAssignCashToTab.php:56 -#: PcAssignCashToTab.php:130 PcAssignCashToTab.php:146 -#: PcAssignCashToTab.php:187 Prices.php:30 PricesBasedOnMarkUp.php:8 -#: Prices_Customer.php:34 PurchData.php:137 PurchData.php:258 +#: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:13 +#: BOMExtendedQty.php:261 BOMIndented.php:246 BOMIndentedReverse.php:235 +#: BOMInquiry.php:187 BOMListing.php:109 BOMs.php:213 BOMs.php:832 +#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2014 +#: CounterSales.php:2140 Credit_Invoice.php:255 CreditStatus.php:21 +#: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:11 +#: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10 +#: DiscountCategories.php:131 DiscountMatrix.php:16 EDIMessageFormat.php:104 +#: FixedAssetLocations.php:9 FixedAssetRegister.php:13 +#: FixedAssetRegister.php:243 FixedAssetTransfer.php:31 FormDesigner.php:129 +#: GLBalanceSheet.php:362 GLBudgets.php:29 GLJournal.php:246 +#: InventoryPlanning.php:374 InventoryPlanningPrefSupplier.php:467 +#: Labels.php:115 Labels.php:270 MRPReport.php:515 OutstandingGRNs.php:160 +#: PcAssignCashToTab.php:56 PcAssignCashToTab.php:130 +#: PcAssignCashToTab.php:146 PcAssignCashToTab.php:187 PDFPickingList.php:28 +#: PDFPrintLabel.php:140 PDFStockLocTransfer.php:17 +#: PO_AuthorisationLevels.php:10 POReport.php:60 POReport.php:64 +#: POReport.php:68 PO_SelectOSPurchOrder.php:135 PricesBasedOnMarkUp.php:8 +#: Prices_Customer.php:34 Prices.php:30 PurchData.php:137 PurchData.php:258 #: PurchData.php:282 RecurringSalesOrders.php:309 SalesAnalReptCols.php:51 #: SalesAnalRepts.php:11 SalesCategories.php:11 SalesGLPostings.php:17 #: SalesGraph.php:34 SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:45 @@ -231,13 +232,13 @@ #: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:9 #: SelectWorkOrder.php:151 ShipmentCosting.php:11 Shipments.php:17 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:8 -#: StockLocMovements.php:13 StockLocStatus.php:27 SupplierTenders.php:260 -#: SupplierTenders.php:317 SupplierTransInquiry.php:10 Suppliers.php:302 -#: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 WWW_Access.php:11 -#: WWW_Users.php:31 WhereUsedInquiry.php:18 WorkCentres.php:111 -#: WorkCentres.php:162 WorkOrderCosting.php:13 WorkOrderEntry.php:11 -#: WorkOrderIssue.php:22 WorkOrderReceive.php:15 WorkOrderStatus.php:42 -#: Z_BottomUpCosts.php:56 +#: StockLocMovements.php:13 StockLocStatus.php:27 Suppliers.php:302 +#: SupplierTenders.php:260 SupplierTenders.php:317 SupplierTransInquiry.php:10 +#: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 +#: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:162 +#: WorkOrderCosting.php:13 WorkOrderEntry.php:11 WorkOrderIssue.php:22 +#: WorkOrderReceive.php:15 WorkOrderStatus.php:42 WWW_Access.php:11 +#: WWW_Users.php:31 Z_BottomUpCosts.php:56 msgid "Search" msgstr "Vyhledávání" @@ -271,90 +272,90 @@ #: ContractCosting.php:198 CustomerBranches.php:410 Customers.php:577 #: Customers.php:925 Customers.php:934 Customers.php:937 #: DeliveryDetails.php:1079 DeliveryDetails.php:1118 DeliveryDetails.php:1121 -#: GLTransInquiry.php:69 MRP.php:529 MRP.php:533 MRP.php:537 MRP.php:541 -#: MRPCalendar.php:224 PDFChequeListing.php:63 PDFDIFOT.php:75 -#: PDFDeliveryDifferences.php:75 PO_AuthorisationLevels.php:134 -#: PO_AuthorisationLevels.php:139 PO_Header.php:777 PO_PDFPurchOrder.php:382 -#: PO_PDFPurchOrder.php:385 PaymentMethods.php:197 PaymentMethods.php:198 +#: GLTransInquiry.php:69 MRPCalendar.php:224 MRP.php:529 MRP.php:533 +#: MRP.php:537 MRP.php:541 PaymentMethods.php:197 PaymentMethods.php:198 #: PaymentMethods.php:199 PaymentMethods.php:262 PaymentMethods.php:268 -#: PaymentMethods.php:275 PcAuthorizeExpenses.php:244 PurchData.php:189 -#: PurchData.php:514 PurchData.php:517 RecurringSalesOrders.php:482 -#: RecurringSalesOrders.php:485 SalesAnalReptCols.php:284 -#: SalesAnalReptCols.php:419 SalesAnalReptCols.php:422 SalesAnalRepts.php:415 -#: SalesAnalRepts.php:418 SalesAnalRepts.php:443 SalesAnalRepts.php:446 -#: SalesAnalRepts.php:471 SalesAnalRepts.php:474 SalesPeople.php:219 -#: SalesPeople.php:354 SalesPeople.php:356 SelectProduct.php:381 -#: ShipmentCosting.php:663 Stocks.php:1013 Stocks.php:1015 Stocks.php:1038 -#: Stocks.php:1040 SuppContractChgs.php:90 SystemParameters.php:389 -#: SystemParameters.php:412 SystemParameters.php:428 SystemParameters.php:491 -#: SystemParameters.php:499 SystemParameters.php:539 SystemParameters.php:612 -#: SystemParameters.php:621 SystemParameters.php:629 SystemParameters.php:647 -#: SystemParameters.php:654 SystemParameters.php:781 SystemParameters.php:916 -#: SystemParameters.php:918 SystemParameters.php:928 SystemParameters.php:930 -#: SystemParameters.php:984 SystemParameters.php:996 SystemParameters.php:998 -#: TaxGroups.php:307 TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:632 -#: WWW_Users.php:634 +#: PaymentMethods.php:275 PcAuthorizeExpenses.php:244 PDFChequeListing.php:63 +#: PDFDeliveryDifferences.php:75 PDFDIFOT.php:75 +#: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 +#: PO_Header.php:777 PO_PDFPurchOrder.php:382 PO_PDFPurchOrder.php:385 +#: PurchData.php:189 PurchData.php:514 PurchData.php:517 +#: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485 +#: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419 +#: SalesAnalReptCols.php:422 SalesAnalRepts.php:415 SalesAnalRepts.php:418 +#: SalesAnalRepts.php:443 SalesAnalRepts.php:446 SalesAnalRepts.php:471 +#: SalesAnalRepts.php:474 SalesPeople.php:219 SalesPeople.php:354 +#: SalesPeople.php:356 SelectProduct.php:381 ShipmentCosting.php:663 +#: Stocks.php:1015 Stocks.php:1017 Stocks.php:1040 Stocks.php:1042 +#: SuppContractChgs.php:90 SystemParameters.php:389 SystemParameters.php:412 +#: SystemParameters.php:428 SystemParameters.php:491 SystemParameters.php:499 +#: SystemParameters.php:539 SystemParameters.php:612 SystemParameters.php:621 +#: SystemParameters.php:629 SystemParameters.php:647 SystemParameters.php:654 +#: SystemParameters.php:781 SystemParameters.php:916 SystemParameters.php:918 +#: SystemParameters.php:928 SystemParameters.php:930 SystemParameters.php:984 +#: SystemParameters.php:996 SystemParameters.php:998 TaxGroups.php:307 +#: TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:632 WWW_Users.php:634 msgid "Yes" msgstr "Ano" #: AccountGroups.php:253 AccountGroups.php:385 AccountGroups.php:387 -#: BOMs.php:124 BOMs.php:745 BOMs.php:749 BankAccounts.php:210 -#: BankAccounts.php:371 BankAccounts.php:373 BankAccounts.php:377 -#: BankAccounts.php:385 CompanyPreferences.php:475 CompanyPreferences.php:479 +#: BankAccounts.php:210 BankAccounts.php:371 BankAccounts.php:373 +#: BankAccounts.php:377 BankAccounts.php:385 BOMs.php:124 BOMs.php:745 +#: BOMs.php:749 CompanyPreferences.php:475 CompanyPreferences.php:479 #: CompanyPreferences.php:490 CompanyPreferences.php:494 #: CompanyPreferences.php:505 CompanyPreferences.php:509 #: ContractCosting.php:196 CustomerBranches.php:410 Customers.php:576 #: Customers.php:920 Customers.php:933 Customers.php:936 #: DeliveryDetails.php:1080 DeliveryDetails.php:1119 DeliveryDetails.php:1122 -#: GLTransInquiry.php:86 MRP.php:527 MRP.php:531 MRP.php:535 MRP.php:539 -#: MRPCalendar.php:226 PDFChequeListing.php:62 PDFDIFOT.php:74 -#: PDFDeliveryDifferences.php:74 PO_AuthorisationLevels.php:136 -#: PO_AuthorisationLevels.php:141 PO_Header.php:776 PO_PDFPurchOrder.php:383 -#: PO_PDFPurchOrder.php:386 PaymentMethods.php:197 PaymentMethods.php:198 +#: GLTransInquiry.php:86 MRPCalendar.php:226 MRP.php:527 MRP.php:531 +#: MRP.php:535 MRP.php:539 PaymentMethods.php:197 PaymentMethods.php:198 #: PaymentMethods.php:199 PaymentMethods.php:263 PaymentMethods.php:269 -#: PaymentMethods.php:276 PcAuthorizeExpenses.php:242 PurchData.php:192 -#: PurchData.php:515 PurchData.php:518 RecurringSalesOrders.php:481 -#: RecurringSalesOrders.php:484 SalesAnalReptCols.php:282 -#: SalesAnalReptCols.php:420 SalesAnalReptCols.php:423 SalesAnalRepts.php:414 -#: SalesAnalRepts.php:417 SalesAnalRepts.php:442 SalesAnalRepts.php:445 -#: SalesAnalRepts.php:470 SalesAnalRepts.php:473 SalesPeople.php:221 -#: SalesPeople.php:359 SalesPeople.php:361 SelectProduct.php:383 -#: ShipmentCosting.php:664 Stocks.php:1008 Stocks.php:1010 Stocks.php:1033 -#: Stocks.php:1035 SuppContractChgs.php:92 SystemParameters.php:390 -#: SystemParameters.php:413 SystemParameters.php:429 SystemParameters.php:492 -#: SystemParameters.php:500 SystemParameters.php:540 SystemParameters.php:613 -#: SystemParameters.php:622 SystemParameters.php:630 SystemParameters.php:648 -#: SystemParameters.php:655 SystemParameters.php:782 SystemParameters.php:915 -#: SystemParameters.php:919 SystemParameters.php:927 SystemParameters.php:931 -#: SystemParameters.php:985 SystemParameters.php:995 SystemParameters.php:999 -#: TaxGroups.php:308 TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:631 -#: WWW_Users.php:635 includes/PDFLowGPPageHeader.inc:44 -#: includes/PDFTaxPageHeader.inc:35 +#: PaymentMethods.php:276 PcAuthorizeExpenses.php:242 PDFChequeListing.php:62 +#: PDFDeliveryDifferences.php:74 PDFDIFOT.php:74 +#: PO_AuthorisationLevels.php:136 PO_AuthorisationLevels.php:141 +#: PO_Header.php:776 PO_PDFPurchOrder.php:383 PO_PDFPurchOrder.php:386 +#: PurchData.php:192 PurchData.php:515 PurchData.php:518 +#: RecurringSalesOrders.php:481 RecurringSalesOrders.php:484 +#: SalesAnalReptCols.php:282 SalesAnalReptCols.php:420 +#: SalesAnalReptCols.php:423 SalesAnalRepts.php:414 SalesAnalRepts.php:417 +#: SalesAnalRepts.php:442 SalesAnalRepts.php:445 SalesAnalRepts.php:470 +#: SalesAnalRepts.php:473 SalesPeople.php:221 SalesPeople.php:359 +#: SalesPeople.php:361 SelectProduct.php:383 ShipmentCosting.php:664 +#: Stocks.php:1010 Stocks.php:1012 Stocks.php:1035 Stocks.php:1037 +#: SuppContractChgs.php:92 SystemParameters.php:390 SystemParameters.php:413 +#: SystemParameters.php:429 SystemParameters.php:492 SystemParameters.php:500 +#: SystemParameters.php:540 SystemParameters.php:613 SystemParameters.php:622 +#: SystemParameters.php:630 SystemParameters.php:648 SystemParameters.php:655 +#: SystemParameters.php:782 SystemParameters.php:915 SystemParameters.php:919 +#: SystemParameters.php:927 SystemParameters.php:931 SystemParameters.php:985 +#: SystemParameters.php:995 SystemParameters.php:999 TaxGroups.php:308 +#: TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:631 WWW_Users.php:635 +#: includes/PDFLowGPPageHeader.inc:44 includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Ne" #: AccountGroups.php:262 AccountSections.php:196 AddCustomerContacts.php:149 #: AddCustomerNotes.php:141 AddCustomerTypeNotes.php:128 Areas.php:164 -#: BOMs.php:149 BankAccounts.php:223 COGSGLPostings.php:108 +#: BankAccounts.php:223 BOMs.php:149 COGSGLPostings.php:108 #: COGSGLPostings.php:206 CreditStatus.php:174 Currencies.php:272 -#: CustomerBranches.php:414 CustomerTypes.php:202 Customers.php:1011 -#: Customers.php:1045 EDIMessageFormat.php:150 Factors.php:329 +#: CustomerBranches.php:414 Customers.php:1011 Customers.php:1045 +#: CustomerTypes.php:202 EDIMessageFormat.php:150 Factors.php:329 #: FixedAssetCategories.php:186 FixedAssetLocations.php:107 -#: FreightCosts.php:240 GLAccounts.php:312 GLTags.php:91 GeocodeSetup.php:173 -#: Labels.php:411 Locations.php:382 MRPDemandTypes.php:120 MRPDemands.php:306 -#: PO_AuthorisationLevels.php:151 PaymentMethods.php:200 PaymentTerms.php:205 -#: PcAssignCashToTab.php:259 PcClaimExpensesFromTab.php:252 PcExpenses.php:223 -#: PcTabs.php:234 PcTypeTabs.php:172 Prices.php:251 Prices_Customer.php:277 -#: PurchData.php:204 SalesCategories.php:255 SalesGLPostings.php:132 -#: SalesGLPostings.php:245 SalesPeople.php:232 SalesTypes.php:206 -#: SecurityTokens.php:128 SelectCustomer.php:612 SelectCustomer.php:630 -#: SelectCustomer.php:654 SelectCustomer.php:671 SelectCustomer.php:695 -#: SelectCustomer.php:712 Shippers.php:144 StockCategories.php:242 -#: SuppTransGLAnalysis.php:120 SupplierContacts.php:163 SupplierTypes.php:189 -#: TaxAuthorities.php:174 TaxCategories.php:182 TaxGroups.php:188 -#: TaxProvinces.php:180 UnitsOfMeasure.php:185 WWW_Access.php:123 -#: WWW_Users.php:318 WorkCentres.php:141 includes/InputSerialItems.php:88 -#: includes/OutputSerialItems.php:20 +#: FreightCosts.php:240 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:91 +#: Labels.php:411 Locations.php:382 MRPDemands.php:306 MRPDemandTypes.php:120 +#: PaymentMethods.php:200 PaymentTerms.php:205 PcAssignCashToTab.php:259 +#: PcClaimExpensesFromTab.php:252 PcExpenses.php:223 PcTabs.php:234 +#: PcTypeTabs.php:172 PO_AuthorisationLevels.php:151 Prices_Customer.php:277 +#: Prices.php:251 PurchData.php:204 SalesCategories.php:255 +#: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:232 +#: SalesTypes.php:206 SecurityTokens.php:128 SelectCustomer.php:612 +#: SelectCustomer.php:630 SelectCustomer.php:654 SelectCustomer.php:671 +#: SelectCustomer.php:695 SelectCustomer.php:712 Shippers.php:144 +#: StockCategories.php:242 SupplierContacts.php:163 SupplierTypes.php:189 +#: SuppTransGLAnalysis.php:120 TaxAuthorities.php:174 TaxCategories.php:182 +#: TaxGroups.php:188 TaxProvinces.php:180 UnitsOfMeasure.php:185 +#: WorkCentres.php:141 WWW_Access.php:123 WWW_Users.php:318 +#: includes/InputSerialItems.php:88 includes/OutputSerialItems.php:20 #, php-format msgid "Edit" msgstr "Upravit" @@ -366,32 +367,33 @@ #: AccountGroups.php:263 AccountSections.php:200 AddCustomerContacts.php:150 #: AddCustomerNotes.php:142 AddCustomerTypeNotes.php:129 Areas.php:165 -#: BOMs.php:151 BankAccounts.php:224 COGSGLPostings.php:109 +#: BankAccounts.php:224 BOMs.php:151 COGSGLPostings.php:109 #: COGSGLPostings.php:207 ContractBOM.php:266 ContractOtherReqts.php:119 -#: CounterSales.php:812 CreditStatus.php:175 Credit_Invoice.php:381 -#: Currencies.php:275 CustomerReceipt.php:913 CustomerTypes.php:203 -#: Customers.php:1046 DiscountCategories.php:219 DiscountMatrix.php:182 +#: CounterSales.php:813 Credit_Invoice.php:381 CreditStatus.php:175 +#: Currencies.php:275 CustomerReceipt.php:918 Customers.php:1046 +#: CustomerTypes.php:203 DiscountCategories.php:219 DiscountMatrix.php:182 #: EDIMessageFormat.php:151 FixedAssetCategories.php:187 FreightCosts.php:241 -#: GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 GeocodeSetup.php:174 -#: Labels.php:411 Locations.php:383 MRPDemandTypes.php:121 MRPDemands.php:307 -#: PO_AuthorisationLevels.php:153 PO_Items.php:711 PaymentMethods.php:201 -#: PaymentTerms.php:206 Payments.php:1057 PcAssignCashToTab.php:263 -#: PcClaimExpensesFromTab.php:253 PcExpenses.php:224 PcExpensesTypeTab.php:185 -#: PcTabs.php:235 PcTypeTabs.php:173 Prices.php:252 Prices_Customer.php:278 -#: PurchData.php:205 SalesAnalReptCols.php:299 SalesAnalRepts.php:303 -#: SalesCategories.php:256 SalesGLPostings.php:133 SalesGLPostings.php:246 -#: SalesPeople.php:233 SalesTypes.php:207 SecurityTokens.php:129 -#: SelectCreditItems.php:764 SelectCustomer.php:613 SelectCustomer.php:631 -#: SelectCustomer.php:655 SelectCustomer.php:672 SelectCustomer.php:696 -#: SelectCustomer.php:713 SelectOrderItems.php:1387 Shipments.php:429 -#: Shippers.php:145 SpecialOrder.php:655 StockCategories.php:243 -#: StockCategories.php:554 SuppContractChgs.php:99 SuppCreditGRNs.php:102 -#: SuppFixedAssetChgs.php:87 SuppInvGRNs.php:139 SuppShiptChgs.php:90 -#: SuppTransGLAnalysis.php:121 SupplierContacts.php:164 SupplierTypes.php:191 -#: TaxAuthorities.php:175 TaxCategories.php:183 TaxGroups.php:189 -#: TaxProvinces.php:181 UnitsOfMeasure.php:186 WOSerialNos.php:319 -#: WWW_Access.php:124 WWW_Users.php:319 WorkCentres.php:142 -#: includes/InputSerialItemsKeyed.php:59 includes/OutputSerialItems.php:99 +#: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 +#: Labels.php:411 Locations.php:383 MRPDemands.php:307 MRPDemandTypes.php:121 +#: PaymentMethods.php:201 Payments.php:1069 PaymentTerms.php:206 +#: PcAssignCashToTab.php:263 PcClaimExpensesFromTab.php:253 PcExpenses.php:224 +#: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 +#: PO_AuthorisationLevels.php:153 PO_Items.php:711 Prices_Customer.php:278 +#: Prices.php:252 PurchData.php:205 SalesAnalReptCols.php:299 +#: SalesAnalRepts.php:303 SalesCategories.php:256 SalesGLPostings.php:133 +#: SalesGLPostings.php:246 SalesPeople.php:233 SalesTypes.php:207 +#: SecurityTokens.php:129 SelectCreditItems.php:764 SelectCustomer.php:613 +#: SelectCustomer.php:631 SelectCustomer.php:655 SelectCustomer.php:672 +#: SelectCustomer.php:696 SelectCustomer.php:713 SelectOrderItems.php:1387 +#: Shipments.php:429 Shippers.php:145 SpecialOrder.php:655 +#: StockCategories.php:243 StockCategories.php:554 SuppContractChgs.php:99 +#: SuppCreditGRNs.php:102 SuppFixedAssetChgs.php:87 SuppInvGRNs.php:139 +#: SupplierContacts.php:164 SupplierTypes.php:191 SuppShiptChgs.php:90 +#: SuppTransGLAnalysis.php:121 TaxAuthorities.php:175 TaxCategories.php:183 +#: TaxGroups.php:189 TaxProvinces.php:181 UnitsOfMeasure.php:186 +#: WorkCentres.php:142 WOSerialNos.php:319 WWW_Access.php:124 +#: WWW_Users.php:319 includes/InputSerialItemsKeyed.php:58 +#: includes/OutputSerialItems.php:99 #, php-format msgid "Delete" msgstr "Smazat" @@ -435,19 +437,19 @@ #: AccountGroups.php:397 AccountSections.php:264 AddCustomerContacts.php:258 #: AddCustomerNotes.php:245 AddCustomerTypeNotes.php:210 Areas.php:227 -#: BOMs.php:759 BankAccounts.php:391 COGSGLPostings.php:354 +#: BankAccounts.php:391 BOMs.php:759 COGSGLPostings.php:354 #: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:272 #: DiscountMatrix.php:141 EDIMessageFormat.php:248 #: FixedAssetCategories.php:344 FixedAssetLocations.php:156 -#: FreightCosts.php:339 GLAccounts.php:262 GeocodeSetup.php:270 -#: Locations.php:597 MRPDemandTypes.php:187 MRPDemands.php:419 -#: OffersReceived.php:56 OffersReceived.php:143 PO_AuthorisationLevels.php:248 -#: PaymentMethods.php:282 PaymentTerms.php:309 Prices_Customer.php:354 +#: FreightCosts.php:339 GeocodeSetup.php:270 GLAccounts.php:262 +#: Locations.php:597 MRPDemands.php:419 MRPDemandTypes.php:187 +#: OffersReceived.php:56 OffersReceived.php:143 PaymentMethods.php:282 +#: PaymentTerms.php:309 PO_AuthorisationLevels.php:248 Prices_Customer.php:354 #: SalesAnalReptCols.php:552 SalesAnalRepts.php:514 SalesGLPostings.php:416 #: SalesPeople.php:368 Shippers.php:200 StockCategories.php:581 -#: SuppLoginSetup.php:293 SupplierContacts.php:281 TaxAuthorities.php:327 +#: SupplierContacts.php:281 SuppLoginSetup.php:293 TaxAuthorities.php:327 #: TaxCategories.php:237 TaxProvinces.php:235 UnitsOfMeasure.php:240 -#: WWW_Users.php:674 WorkCentres.php:279 +#: WorkCentres.php:279 WWW_Users.php:674 msgid "Enter Information" msgstr "Vložit informace" @@ -557,10 +559,10 @@ #: AddCustomerContacts.php:61 AddCustomerNotes.php:52 #: AddCustomerTypeNotes.php:49 Areas.php:73 CustomerTypes.php:69 #: DeliveryDetails.php:774 Factors.php:105 FixedAssetItems.php:246 -#: MRPCalendar.php:176 PO_Items.php:374 PcAssignCashToTab.php:88 -#: PcClaimExpensesFromTab.php:79 PcExpenses.php:95 PcTabs.php:102 -#: PcTypeTabs.php:60 SalesAnalReptCols.php:129 SalesPeople.php:97 -#: SalesTypes.php:66 Stocks.php:497 SupplierTypes.php:67 Suppliers.php:513 +#: MRPCalendar.php:176 PcAssignCashToTab.php:88 PcClaimExpensesFromTab.php:79 +#: PcExpenses.php:95 PcTabs.php:102 PcTypeTabs.php:60 PO_Items.php:374 +#: SalesAnalReptCols.php:129 SalesPeople.php:97 SalesTypes.php:66 +#: Stocks.php:497 Suppliers.php:513 SupplierTypes.php:67 msgid "has been updated" msgstr "byla aktualizována" @@ -575,7 +577,7 @@ #: AddCustomerContacts.php:128 CompanyPreferences.php:223 #: CustomerBranches.php:368 Customers.php:998 Customers.php:1006 #: SalesPeople.php:200 SelectCustomer.php:607 StockDispatch.php:187 -#: StockDispatch.php:199 SuppTransGLAnalysis.php:105 SupplierContacts.php:150 +#: StockDispatch.php:199 SupplierContacts.php:150 SuppTransGLAnalysis.php:105 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 #: includes/PDFTaxPageHeader.inc:37 msgid "Name" @@ -680,15 +682,15 @@ #: CustomerAllocations.php:363 CustomerInquiry.php:196 #: CustomerTransInquiry.php:100 GLAccountInquiry.php:152 #: GLAccountReport.php:338 GLTransInquiry.php:42 MRPCalendar.php:219 -#: PDFRemittanceAdvice.php:300 PaymentAllocations.php:66 -#: PcAssignCashToTab.php:220 PcAuthorizeExpenses.php:88 PrintCustTrans.php:822 -#: PrintCustTransPortrait.php:867 ReverseGRN.php:386 ShipmentCosting.php:534 -#: ShipmentCosting.php:611 Shipments.php:476 StockDispatch.php:189 -#: StockDispatch.php:201 StockLocMovements.php:90 StockMovements.php:94 -#: StockSerialItemResearch.php:81 SupplierAllocations.php:455 -#: SupplierAllocations.php:568 SupplierAllocations.php:643 -#: SupplierInquiry.php:209 SupplierTransInquiry.php:103 -#: includes/PDFQuotationPageHeader.inc:92 +#: PaymentAllocations.php:66 PcAssignCashToTab.php:220 +#: PcAuthorizeExpenses.php:88 PDFRemittanceAdvice.php:300 +#: PrintCustTrans.php:822 PrintCustTransPortrait.php:867 ReverseGRN.php:386 +#: ShipmentCosting.php:534 ShipmentCosting.php:611 Shipments.php:476 +#: StockDispatch.php:189 StockDispatch.php:201 StockLocMovements.php:90 +#: StockMovements.php:94 StockSerialItemResearch.php:81 +#: SupplierAllocations.php:455 SupplierAllocations.php:568 +#: SupplierAllocations.php:643 SupplierInquiry.php:209 +#: SupplierTransInquiry.php:103 includes/PDFQuotationPageHeader.inc:92 #: includes/PDFQuotationPortraitPageHeader.inc:90 #: includes/PDFStatementPageHeader.inc:169 includes/PDFTaxPageHeader.inc:36 #: includes/PDFTransPageHeader.inc:48 @@ -697,9 +699,9 @@ msgstr "Datum" #: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:109 PcReportTab.php:173 -#: Stocks.php:1017 UpgradeDatabase.php:172 UpgradeDatabase.php:175 -#: UpgradeDatabase.php:178 UpgradeDatabase.php:181 UpgradeDatabase.php:184 -#: UpgradeDatabase.php:187 UpgradeDatabase.php:190 UpgradeDatabase.php:193 +#: Stocks.php:1019 UpgradeDatabase.php:174 UpgradeDatabase.php:177 +#: UpgradeDatabase.php:180 UpgradeDatabase.php:183 UpgradeDatabase.php:186 +#: UpgradeDatabase.php:189 UpgradeDatabase.php:192 UpgradeDatabase.php:195 #: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 #: Z_Upgrade_3.10-3.11.php:70 Z_Upgrade_3.10-3.11.php:74 #: Z_Upgrade_3.10-3.11.php:78 Z_Upgrade_3.11-4.00.php:62 @@ -796,22 +798,22 @@ #: BOMIndentedReverse.php:140 BOMListing.php:41 BOMListing.php:52 #: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:100 #: GLBalanceSheet.php:139 GLProfit_Loss.php:177 GLTagProfit_Loss.php:191 -#: GLTrialBalance.php:165 InventoryPlanning.php:98 InventoryPlanning.php:173 +#: GLTrialBalance.php:159 InventoryPlanning.php:98 InventoryPlanning.php:173 #: InventoryPlanning.php:208 InventoryPlanning.php:256 #: InventoryPlanning.php:294 InventoryPlanningPrefSupplier.php:201 #: InventoryPlanningPrefSupplier.php:269 InventoryPlanningPrefSupplier.php:303 #: InventoryPlanningPrefSupplier.php:348 InventoryPlanningPrefSupplier.php:394 #: InventoryQuantities.php:84 InventoryValuation.php:78 -#: MRPPlannedPurchaseOrders.php:114 MRPPlannedWorkOrders.php:106 -#: MRPReport.php:147 MRPReport.php:508 MRPReschedules.php:45 -#: MRPReschedules.php:57 MRPShortages.php:155 MRPShortages.php:167 -#: MailInventoryValuation.php:114 OutstandingGRNs.php:53 -#: OutstandingGRNs.php:65 PDFCustomerList.php:18 PDFCustomerList.php:230 -#: PDFCustomerList.php:242 PDFLowGP.php:20 PDFStockCheckComparison.php:33 +#: MailInventoryValuation.php:114 MRPPlannedPurchaseOrders.php:114 +#: MRPPlannedWorkOrders.php:106 MRPReport.php:147 MRPReport.php:508 +#: MRPReschedules.php:45 MRPReschedules.php:57 MRPShortages.php:155 +#: MRPShortages.php:167 OutstandingGRNs.php:53 OutstandingGRNs.php:65 +#: PDFCustomerList.php:18 PDFCustomerList.php:230 PDFCustomerList.php:242 +#: PDFLowGP.php:20 PDFStockCheckComparison.php:33 #: PDFStockCheckComparison.php:59 PDFStockCheckComparison.php:264 #: ReorderLevel.php:60 SelectAsset.php:37 SelectProduct.php:39 -#: StockCheck.php:66 StockCheck.php:140 SuppPriceList.php:130 -#: SupplierTenders.php:326 includes/PDFPaymentRun_PymtFooter.php:149 +#: StockCheck.php:66 StockCheck.php:140 SupplierTenders.php:326 +#: SuppPriceList.php:130 includes/PDFPaymentRun_PymtFooter.php:152 msgid "Problem Report" msgstr "Problém" @@ -825,10 +827,10 @@ #: BOMExtendedQty.php:248 BOMIndented.php:153 BOMIndented.php:234 #: BOMIndentedReverse.php:144 BOMIndentedReverse.php:221 BOMListing.php:44 #: Credit_Invoice.php:184 DebtorsAtPeriodEnd.php:60 DebtorsAtPeriodEnd.php:72 -#: FTP_RadioBeacon.php:187 GLBalanceSheet.php:104 GLBalanceSheet.php:142 -#: GLBalanceSheet.php:305 GLProfit_Loss.php:180 GLProfit_Loss.php:192 -#: GLTagProfit_Loss.php:195 GLTagProfit_Loss.php:208 GLTrialBalance.php:168 -#: GLTrialBalance.php:180 GetStockImage.php:150 InventoryPlanning.php:101 +#: FTP_RadioBeacon.php:187 GetStockImage.php:150 GLBalanceSheet.php:104 +#: GLBalanceSheet.php:142 GLBalanceSheet.php:305 GLProfit_Loss.php:180 +#: GLProfit_Loss.php:192 GLTagProfit_Loss.php:195 GLTagProfit_Loss.php:208 +#: GLTrialBalance.php:162 GLTrialBalance.php:174 InventoryPlanning.php:101 #: InventoryPlanning.php:176 InventoryPlanning.php:211 #: InventoryPlanning.php:259 InventoryPlanning.php:297 #: InventoryPlanning.php:360 InventoryPlanningPrefSupplier.php:204 @@ -836,34 +838,35 @@ #: InventoryPlanningPrefSupplier.php:351 InventoryPlanningPrefSupplier.php:397 #: InventoryPlanningPrefSupplier.php:453 InventoryQuantities.php:87 #: InventoryQuantities.php:98 InventoryValuation.php:81 -#: InventoryValuation.php:92 MRPPlannedPurchaseOrders.php:117 +#: InventoryValuation.php:92 MailInventoryValuation.php:117 +#: MailInventoryValuation.php:213 MRPPlannedPurchaseOrders.php:117 #: MRPPlannedPurchaseOrders.php:128 MRPPlannedWorkOrders.php:109 #: MRPPlannedWorkOrders.php:120 MRPPlannedWorkOrders.php:308 MRPReport.php:39 #: MRPReport.php:50 MRPReport.php:150 MRPReschedules.php:48 #: MRPReschedules.php:60 MRPShortages.php:158 MRPShortages.php:170 -#: MailInventoryValuation.php:117 MailInventoryValuation.php:213 #: OutstandingGRNs.php:56 OutstandingGRNs.php:68 PDFCustomerList.php:233 #: PDFCustomerList.php:245 PDFGrn.php:123 PDFLowGP.php:59 PDFLowGP.php:71 #: PDFPriceList.php:128 PDFQuotation.php:270 PDFQuotationPortrait.php:268 #: PDFRemittanceAdvice.php:83 PDFStockCheckComparison.php:37 #: PDFStockCheckComparison.php:63 PDFStockCheckComparison.php:268 -#: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:152 PrintCustOrder.php:220 -#: PrintCustOrder_generic.php:243 ReorderLevel.php:63 ReorderLevel.php:152 -#: SalesAnalysis_UserDefined.php:28 SelectCreditItems.php:30 StockCheck.php:47 -#: StockCheck.php:69 StockCheck.php:100 StockCheck.php:143 StockCheck.php:154 -#: StockCheck.php:195 StockDispatch.php:93 StockDispatch.php:106 -#: SuppPaymentRun.php:112 SuppPaymentRun.php:122 SuppPaymentRun.php:186 -#: SuppPaymentRun.php:216 SuppPriceList.php:134 SupplierBalsAtPeriodEnd.php:54 -#: SupplierBalsAtPeriodEnd.php:65 Tax.php:63 Tax.php:168 Tax.php:277 +#: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:152 +#: PrintCustOrder_generic.php:243 PrintCustOrder.php:220 ReorderLevel.php:63 +#: ReorderLevel.php:152 SalesAnalysis_UserDefined.php:28 +#: SelectCreditItems.php:30 StockCheck.php:47 StockCheck.php:69 +#: StockCheck.php:100 StockCheck.php:143 StockCheck.php:154 StockCheck.php:195 +#: StockDispatch.php:93 StockDispatch.php:106 SupplierBalsAtPeriodEnd.php:54 +#: SupplierBalsAtPeriodEnd.php:65 SuppPaymentRun.php:112 +#: SuppPaymentRun.php:122 SuppPaymentRun.php:186 SuppPaymentRun.php:217 +#: SuppPriceList.php:134 Tax.php:63 Tax.php:168 Tax.php:277 #: Z_DataExport.php:72 Z_DataExport.php:168 Z_DataExport.php:259 #: Z_DataExport.php:308 Z_DataExport.php:347 Z_DataExport.php:383 #: Z_DataExport.php:419 Z_DataExport.php:471 Z_poRebuildDefault.php:38 -#: includes/PDFPaymentRun_PymtFooter.php:57 -#: includes/PDFPaymentRun_PymtFooter.php:87 -#: includes/PDFPaymentRun_PymtFooter.php:116 -#: includes/PDFPaymentRun_PymtFooter.php:152 -#: includes/PDFPaymentRun_PymtFooter.php:183 -#: includes/PDFPaymentRun_PymtFooter.php:215 +#: includes/PDFPaymentRun_PymtFooter.php:59 +#: includes/PDFPaymentRun_PymtFooter.php:89 +#: includes/PDFPaymentRun_PymtFooter.php:119 +#: includes/PDFPaymentRun_PymtFooter.php:156 +#: includes/PDFPaymentRun_PymtFooter.php:187 +#: includes/PDFPaymentRun_PymtFooter.php:218 #: includes/ConstructSQLForUserDefinedSalesReport.inc:180 #: includes/ConstructSQLForUserDefinedSalesReport.inc:188 #: includes/ConstructSQLForUserDefinedSalesReport.inc:340 @@ -883,31 +886,30 @@ msgstr "se nepodařilo získat, protože" #: AgedDebtors.php:374 AgedSuppliers.php:201 Areas.php:95 -#: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:960 -#: ConfirmDispatch_Invoice.php:974 Contracts.php:580 CounterSales.php:1353 -#: CounterSales.php:1367 Credit_Invoice.php:697 Credit_Invoice.php:718 -#: CustomerReceipt.php:537 CustomerReceipt.php:676 CustomerReceipt.php:704 +#: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:959 +#: ConfirmDispatch_Invoice.php:973 Contracts.php:580 CounterSales.php:1354 +#: CounterSales.php:1368 Credit_Invoice.php:697 Credit_Invoice.php:718 +#: CustomerReceipt.php:542 CustomerReceipt.php:681 CustomerReceipt.php:709 #: CustomerTransInquiry.php:91 DeliveryDetails.php:396 GLProfit_Loss.php:596 -#: GLTagProfit_Loss.php:511 PDFRemittanceAdvice.php:85 Payments.php:325 +#: GLTagProfit_Loss.php:511 Payments.php:334 PDFRemittanceAdvice.php:85 #: PurchData.php:86 PurchData.php:104 PurchData.php:245 #: RecurringSalesOrders.php:256 ReverseGRN.php:191 ReverseGRN.php:205 #: ReverseGRN.php:374 SelectCreditItems.php:1408 SelectSalesOrder.php:189 #: SelectSalesOrder.php:353 StockCheck.php:223 StockCostUpdate.php:77 #: StockCostUpdate.php:87 StockLocStatus.php:153 StockMovements.php:87 #: StockQuantityByDate.php:95 StockReorderLevel.php:40 StockStatus.php:265 -#: StockTransfers.php:191 StockUsage.php:139 StockUsageGraph.php:53 -#: SuppPaymentRun.php:114 SuppPaymentRun.php:188 SuppPaymentRun.php:218 +#: StockTransfers.php:191 StockUsageGraph.php:53 StockUsage.php:139 #: SupplierInquiry.php:78 SupplierInquiry.php:100 SupplierInquiry.php:136 -#: SupplierInquiry.php:190 SupplierTransInquiry.php:95 WOSerialNos.php:47 -#: WorkOrderCosting.php:418 WorkOrderReceive.php:273 -#: Z_ChangeBranchCode.php:105 Z_ChangeCustomerCode.php:91 -#: Z_DeleteCreditNote.php:58 Z_DeleteInvoice.php:87 -#: includes/PDFPaymentRun_PymtFooter.php:59 -#: includes/PDFPaymentRun_PymtFooter.php:89 -#: includes/PDFPaymentRun_PymtFooter.php:118 -#: includes/PDFPaymentRun_PymtFooter.php:154 -#: includes/PDFPaymentRun_PymtFooter.php:185 includes/ConnectDB_mysql.inc:67 -#: includes/ConnectDB_mysqli.inc:81 +#: SupplierInquiry.php:190 SupplierTransInquiry.php:95 SuppPaymentRun.php:114 +#: SuppPaymentRun.php:188 SuppPaymentRun.php:219 WorkOrderCosting.php:418 +#: WorkOrderReceive.php:273 WOSerialNos.php:47 Z_ChangeBranchCode.php:105 +#: Z_ChangeCustomerCode.php:91 Z_DeleteCreditNote.php:58 +#: Z_DeleteInvoice.php:87 includes/PDFPaymentRun_PymtFooter.php:61 +#: includes/PDFPaymentRun_PymtFooter.php:91 +#: includes/PDFPaymentRun_PymtFooter.php:121 +#: includes/PDFPaymentRun_PymtFooter.php:158 +#: includes/PDFPaymentRun_PymtFooter.php:189 includes/ConnectDB_mysqli.inc:81 +#: includes/ConnectDB_mysql.inc:67 msgid "The SQL that failed was" msgstr "SQL příkaz, který selhal, byl" @@ -980,7 +982,7 @@ #: PDFPriceList.php:307 PDFRemittanceAdvice.php:170 #: PDFStockCheckComparison.php:358 PrintCustTrans.php:540 #: PrintCustTransPortrait.php:578 ReorderLevel.php:228 StockDispatch.php:327 -#: SuppPriceList.php:246 SupplierBalsAtPeriodEnd.php:159 Tax.php:351 +#: SupplierBalsAtPeriodEnd.php:159 SuppPriceList.php:246 Tax.php:351 msgid "Print PDF" msgstr "Tisknout PDF" @@ -1013,12 +1015,12 @@ msgstr "Dodavatel ve věku analýza" #: AgedSuppliers.php:288 OutstandingGRNs.php:168 PDFRemittanceAdvice.php:149 -#: SuppPaymentRun.php:263 SupplierBalsAtPeriodEnd.php:131 +#: SupplierBalsAtPeriodEnd.php:131 SuppPaymentRun.php:264 msgid "From Supplier Code" msgstr "Od kódu dodavatele" #: AgedSuppliers.php:292 OutstandingGRNs.php:172 PDFRemittanceAdvice.php:153 -#: SuppPaymentRun.php:267 SupplierBalsAtPeriodEnd.php:135 +#: SupplierBalsAtPeriodEnd.php:135 SuppPaymentRun.php:268 msgid "To Supplier Code" msgstr "Do kódu dodavatele" @@ -1107,8 +1109,8 @@ #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 #: PcExpenses.php:166 PcExpensesTypeTab.php:101 PcTabs.php:166 #: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:135 -#: SalesTypes.php:156 StockCategories.php:198 SupplierTypes.php:151 -#: Suppliers.php:638 Z_DeleteInvoice.php:146 +#: SalesTypes.php:156 StockCategories.php:198 Suppliers.php:638 +#: SupplierTypes.php:151 Z_DeleteInvoice.php:146 msgid "has been deleted" msgstr "byl zrušen" @@ -1154,13 +1156,13 @@ msgstr "ID uživatele" #: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:298 -#: CounterSales.php:2141 CounterSales.php:2144 CustomerTransInquiry.php:31 +#: CounterSales.php:2146 CounterSales.php:2149 CustomerTransInquiry.php:31 #: DailySalesInquiry.php:47 DailySalesInquiry.php:49 FixedAssetRegister.php:56 #: FixedAssetRegister.php:65 InventoryQuantities.php:167 #: InventoryQuantities.php:193 InventoryQuantities.php:195 MRP.php:585 #: MRPReport.php:523 MRPReport.php:525 MRPReschedules.php:144 #: PDFPeriodStockTransListing.php:59 PDFPriceList.php:198 -#: PDFPrintLabel.php:250 POReport.php:1567 PO_Items.php:1023 +#: PDFPrintLabel.php:250 PO_Items.php:1023 POReport.php:1567 #: ReorderLevel.php:181 ReorderLevel.php:183 ReorderLevel.php:213 #: ReorderLevel.php:215 SalesGraph.php:97 SalesGraph.php:99 SalesGraph.php:119 #: SalesGraph.php:121 SalesGraph.php:143 SalesGraph.php:145 SalesGraph.php:179 @@ -1200,9 +1202,9 @@ msgstr "Uživatel" #: AuditTrail.php:165 BankReconciliation.php:210 BankReconciliation.php:285 -#: CustWhereAlloc.php:18 CustWhereAlloc.php:105 CustomerAllocations.php:361 -#: CustomerInquiry.php:194 CustomerTransInquiry.php:20 -#: CustomerTransInquiry.php:98 DailyBankTransactions.php:112 +#: CustomerAllocations.php:361 CustomerInquiry.php:194 +#: CustomerTransInquiry.php:20 CustomerTransInquiry.php:98 +#: CustWhereAlloc.php:18 CustWhereAlloc.php:105 DailyBankTransactions.php:112 #: GLAccountInquiry.php:150 GLAccountReport.php:336 GLJournal.php:262 #: MRPReschedules.php:191 SalesByTypePeriodInquiry.php:334 #: SelectCustomer.php:416 ShipmentCosting.php:532 ShipmentCosting.php:609 @@ -1230,13 +1232,660 @@ msgid "Value" msgstr "Hodnota" +#: BackupDatabase.php:7 +#, fuzzy +msgid "Backup webERP Database" +msgstr "Upgrade webERP databáze" + +#: BackupDatabase.php:20 +#, fuzzy +msgid "Deleted" +msgstr "Smazat" + +#: BackupDatabase.php:23 +#, fuzzy +msgid "Unable to delete" +msgstr "Nelze najít Reklamní kodex" + +#: BackupDatabase.php:28 +#, fuzzy +msgid "All backup files on the server have been deleted" +msgstr "Prodej vysílání záznam byl odstraněn" + +#: BackupDatabase.php:30 +#, fuzzy +msgid "No backup files on the server were deleted" +msgstr "Nahrát soubor na server" + +#: BackupDatabase.php:34 +msgid "Backup" +msgstr "Zálohovat" + +#: BackupDatabase.php:43 +msgid "" +"The backup file has now been created. You must now download this to your " +"computer because in case the web-server has a disk failure the backup would " +"then not on the same machine. Use the link below" +msgstr "" + +#: BackupDatabase.php:43 +msgid "Download the backup file to your locale machine" +msgstr "" + +#: BackupDatabase.php:44 +msgid "" +"Once you have downloaded the database backup file to your local machine you " +"should use the link below to delete it - backup files can consume a lot of " +"space on your hosting account and will accumulate if not deleted - they also " +"contain sensitive information which would otherwise be available for others " +"to download!" +msgstr "" + +#: BackupDatabase.php:47 +#, fuzzy +msgid "Delete the backup file off the server" +msgstr "Nahrát soubor na server" + +#: BackupDatabase.php:49 +msgid "" +"There was some problem producing a backup using mysqldump. Normally this " +"relates to a permissions issue - the web-server user must have permission to " +"write to the companies directory" +msgstr "" + +#: BankAccounts.php:7 +msgid "Bank Accounts Maintenance" +msgstr "Bankovní účty Údržba" + +#: BankAccounts.php:11 TaxAuthorities.php:150 +msgid "Bank" +msgstr "Banka" + +#: BankAccounts.php:12 +#, fuzzy +msgid "" +"Update Bank Account details. Account Code is for SWIFT or BSB type Bank " +"Codes. Set Default for Invoices to \"Currency Default\" of \"Fallback " +"Default\" to print Account details on Invoices (only one account should be " +"set to \"Fall Back Default\")." +msgstr "" +"Aktualizace Bankovní účet podrobnosti. Kód je účet pro SWIFT nebo BSB typ " +"kód banky. Nastavit výchozí pro faktury \\" + +#: BankAccounts.php:44 +msgid "The bank account code already exists in the database" +msgstr "Na bankovní účet, kód již existuje v databázi" + +#: BankAccounts.php:50 +msgid "The bank account name must be fifty characters or less long" +msgstr "Na bankovní účet, název musí být padesát znaků dlouhé" + +#: BankAccounts.php:56 +msgid "The bank account name may not be empty." +msgstr "Na bankovní účet, jméno nesmí být prázdné." + +#: BankAccounts.php:62 +msgid "The bank account number may not be empty." +msgstr "Číslo bankovního účtu nesmí být prázdný." + +#: BankAccounts.php:68 +msgid "The bank account number must be fifty characters or less long" +msgstr "Číslo bankovního účtu musí být padesát znaků dlouhé" + +#: BankAccounts.php:74 +msgid "The bank address must be fifty characters or less long" +msgstr "Adresa banky je padesát znaků dlouhé" + +#: BankAccounts.php:92 +msgid "" +"Note that it is not possible to change the currency of the account once " +"there are transactions against it" +msgstr "Všimněte si, že není možné změnit měnu účtu, jakmile je operace proti" + +#: BankAccounts.php:104 +msgid "The bank account details have been updated" +msgstr "Údaje o bankovním účtu byly aktualizovány" + +#: BankAccounts.php:123 +msgid "The new bank account has been entered" +msgstr "Nový bankovní účet bylo zapsáno" + +#: BankAccounts.php:128 +msgid "The bank account could not be inserted or modified because" +msgstr "Na bankovní účet, nelze vložit či pozměnit, protože" + +#: BankAccounts.php:129 +msgid "The SQL used to insert/modify the bank account details was" +msgstr "SQL používá vložit / upravit údaje o bankovním účtu bylo" + +#: BankAccounts.php:157 +msgid "" +"Cannot delete this bank account because transactions have been created using " +"this account" +msgstr "" +"Nelze smazat tento bankovní účet, protože transakce byly vytvořeny pomocí " +"tohoto účtu" + +#: BankAccounts.php:158 +msgid "transactions with this bank account code" +msgstr "transakce s tímto kódem bankovní účet" + +#: BankAccounts.php:164 +msgid "Bank account deleted" +msgstr "Bankovní účet smazán" + +#: BankAccounts.php:184 +msgid "The bank accounts set up could not be retrieved because" +msgstr "Bankovní účty zřízené se nepodařilo získat, protože" + +#: BankAccounts.php:185 +msgid "The SQL used to retrieve the bank account details was" +msgstr "SQL používá k načtení údaje o bankovním účtu bylo" + +#: BankAccounts.php:191 GLJournal.php:291 +msgid "GL Account Code" +msgstr "GL kódu účtu" + +#: BankAccounts.php:192 BankAccounts.php:326 +msgid "Bank Account Name" +msgstr "Název bankovního účtu" + +#: BankAccounts.php:193 BankAccounts.php:328 +msgid "Bank Account Code" +msgstr "Bankovní účet kódu" + +#: BankAccounts.php:194 BankAccounts.php:330 +msgid "Bank Account Number" +msgstr "Číslo bankovního účtu" + +#: BankAccounts.php:195 BankAccounts.php:332 +msgid "Bank Address" +msgstr "Adresa banky" + +#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:788 +#: CustomerTransInquiry.php:108 OffersReceived.php:109 PcReportTab.php:267 +#: PcTabs.php:206 PcTabs.php:349 PDFPrintLabel.php:97 +#: PO_AuthorisationLevels.php:126 PO_AuthorisationLevels.php:209 +#: PO_AuthorisationLevels.php:214 PO_AuthoriseMyOrders.php:115 +#: PO_Header.php:554 PO_SelectOSPurchOrder.php:481 PO_SelectPurchOrder.php:432 +#: PricesByCost.php:274 Prices.php:222 Prices.php:295 PurchData.php:169 +#: PurchData.php:352 PurchData.php:481 SelectSupplier.php:260 +#: SupplierCredit.php:263 SupplierInvoice.php:235 SupplierTransInquiry.php:109 +#: SuppPriceList.php:284 includes/PDFBankingSummaryPageHeader.inc:42 +#: includes/PDFDebtorBalsPageHeader.inc:33 +#: includes/PDFSupplierBalsPageHeader.inc:36 +msgid "Currency" +msgstr "Měna" + +#: BankAccounts.php:197 BankAccounts.php:355 +msgid "Default for Invoices" +msgstr "Výchozí pro Faktury" + +#: BankAccounts.php:212 BankAccounts.php:369 BankAccounts.php:375 +#: BankAccounts.php:379 BankAccounts.php:383 +msgid "Fall Back Default" +msgstr "" + +#: BankAccounts.php:214 BankAccounts.php:370 BankAccounts.php:374 +#: BankAccounts.php:378 BankAccounts.php:384 +#, fuzzy +msgid "Currency Default" +msgstr "Měny " + +#: BankAccounts.php:224 +#, fuzzy, php-format +msgid "Are you sure you wish to delete this bank account?" +msgstr "Jste si jisti, že chcete smazat tento obor?" + +#: BankAccounts.php:248 +msgid "Show All Bank Accounts Defined" +msgstr "Zobrazit všechny bankovní účty definované" + +#: BankAccounts.php:282 BankAccounts.php:287 +msgid "Bank Account GL Code" +msgstr "Bankovní účet GL kód" + +#: BankAccounts.php:334 +msgid "Currency Of Account" +msgstr "Měna účtu" + +#: BankMatching.php:6 +msgid "Bank Account Matching" +msgstr "Bankovní účet odpovídající" + +#: BankMatching.php:15 PDFCustTransListing.php:41 Z_CheckDebtorsControl.php:81 +msgid "Receipts" +msgstr "Příjmy" + +#: BankMatching.php:17 BankMatching.php:25 +msgid "Bank Matching" +msgstr "Banka odpovídající" + +#: BankMatching.php:17 +msgid "Bank Account Matching - Receipts" +msgstr "Bankovní účet odpovídající - Příjmy" + +#: BankMatching.php:24 PaymentAllocations.php:31 PaymentMethods.php:11 +#: PDFSuppTransListing.php:40 +msgid "Payments" +msgstr "Platby" + +#: BankMatching.php:25 +msgid "Bank Account Matching - Payments" +msgstr "Bankovní účet odpovídající - Platby" + +#: BankMatching.php:29 +msgid "This page must be called with a bank transaction type" +msgstr "Tato stránka musí být volána s typem bankovním převodem" + +#: BankMatching.php:29 +msgid "It should not be called directly" +msgstr "To by nemělo být jen přímo" + +#: BankMatching.php:49 +msgid "Could not retrieve transaction information" +msgstr "Nemohu získat informace o transakci" + +#: BankMatching.php:56 +msgid "Could not match off this payment because" +msgstr "Nemohl zápas z této platby, protože" + +#: BankMatching.php:67 +msgid "Could not update the amount matched off this bank transaction because" +msgstr "" +"Nepodařilo se aktualizovat částku uzavřeno z této banky, protože transakce" + +#: BankMatching.php:75 +msgid "Could not unclear this bank transaction because" +msgstr "Nemohu nejasné tento bankovní transakci, protože" + +#: BankMatching.php:83 +msgid "" +"Use this screen to match webERP Receipts and Payments to your Bank " +"Statement. Check your bank statement and click the check-box when you find " +"the matching transaction." +msgstr "" +"Tato obrazovka slouží k zápasu webERP inkasa a platby do svého výpisu z " +"účtu. Zkontrolujte, zda vaše bankovní výpis a klikněte na check-box, když " +"zjistíte, odpovídající transakce." + +#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:754 +#: DailyBankTransactions.php:32 Payments.php:753 PDFChequeListing.php:44 +#: TaxAuthorities.php:151 TaxAuthorities.php:316 +msgid "Bank Account" +msgstr "Bankovní účet" + +#: BankMatching.php:117 +msgid "Show" +msgstr "Zobrazit" + +#: BankMatching.php:117 CounterSales.php:222 CreditItemsControlled.php:78 +#: FreightCosts.php:267 GoodsReceivedControlled.php:68 GoodsReceived.php:73 +#: StockLocTransferReceive.php:423 SupplierAllocations.php:434 +#: SuppShiptChgs.php:136 +msgid "from" +msgstr "od" + +#: BankMatching.php:120 ConfirmDispatchControlled_Invoice.php:60 +#: EmailCustTrans.php:63 FixedAssetRegister.php:78 FTP_RadioBeacon.php:280 +#: GLAccountCSV.php:171 GLAccountReport.php:103 Payments.php:733 +#: PcReportTab.php:102 PDFChequeListing.php:114 PDFChequeListing.php:124 +#: PDFChequeListing.php:199 PDFDeliveryDifferences.php:187 +#: PDFDeliveryDifferences.php:200 PDFDeliveryDifferences.php:296 +#: PDFDIFOT.php:190 PDFDIFOT.php:203 PDFDIFOT.php:307 PDFOrdersInvoiced.php:77 +#: PDFOrdersInvoiced.php:274 PDFOrderStatus.php:82 PDFOrderStatus.php:256 +#: PDFRemittanceAdvice.php:48 PO_PDFPurchOrder.php:332 +#: PricesBasedOnMarkUp.php:213 PricesBasedOnMarkUp.php:352 +#: PrintCustStatements.php:43 PrintCustTrans.php:60 PrintCustTrans.php:63 +#: PrintCustTransPortrait.php:58 PrintCustTransPortrait.php:61 +#: SalesGraph.php:211 SalesGraph.php:240 SalesGraph.php:244 +#: StockLocTransferReceive.php:306 StockLocTransferReceive.php:423 +#: Stocks.php:266 Stocks.php:271 StockStatus.php:306 StockStatus.php:347 +#: StockTransfers.php:436 includes/PDFAgedDebtorsPageHeader.inc:18 +#: includes/PDFAgedSuppliersPageHeader.inc:17 +#: includes/PDFChequeListingPageHeader.inc:17 +#: includes/PDFDeliveryDifferencesPageHeader.inc:19 +#: includes/PDFDeliveryDifferencesPageHeader.inc:21 +#: includes/PDFDIFOTPageHeader.inc:19 includes/PDFDIFOTPageHeader.inc:21 +#: includes/PDFOrdersInvoicedPageHeader.inc:19 +#: includes/PDFOrdersInvoicedPageHeader.inc:21 +#: includes/PDFOrderStatusPageHeader.inc:19 +#: includes/PDFOrderStatusPageHeader.inc:21 +#: includes/PDFPeriodStockTransListingPageHeader.inc:20 +#: includes/PDFStockLocTransferHeader.inc:31 +msgid "to" +msgstr "na" + +#: BankMatching.php:123 +msgid "Choose outstanding" +msgstr "Zvolte vynikající" + +#: BankMatching.php:123 +msgid "only or all" +msgstr "jen nebo všechny" + +#: BankMatching.php:123 BankMatching.php:127 BankMatching.php:130 +#: BankMatching.php:141 BankMatching.php:144 +msgid "in the date range" +msgstr "v rozmezí dat" + +#: BankMatching.php:127 BankMatching.php:130 BankMatching.php:141 +#: BankMatching.php:144 +msgid "Show all" +msgstr "Zobrazit všechny" + +#: BankMatching.php:128 BankMatching.php:131 +msgid "Show unmatched" +msgstr "Zobrazit bezkonkurenční" + +#: BankMatching.php:128 BankMatching.php:131 PrintCheque.php:46 +#: ReverseGRN.php:104 includes/PDFCustomerListPageHeader.inc:46 +#: includes/PDFDeliveryDifferencesPageHeader.inc:24 +#: includes/PDFDIFOTPageHeader.inc:24 +#: includes/PDFOrdersInvoicedPageHeader.inc:24 +#: includes/PDFOrderStatusPageHeader.inc:24 +msgid "only" +msgstr "jen" + +#: BankMatching.php:137 +msgid "Choose to display only the first 20 matching" +msgstr "Vyberte, zda chcete zobrazit pouze prvních 20 odpovídající" + +#: BankMatching.php:138 +msgid "or all" +msgstr "nebo všechny" + +#: BankMatching.php:138 +msgid "meeting the criteria" +msgstr "splňující kritéria" + +#: BankMatching.php:142 BankMatching.php:145 +msgid "Show only the first 20" +msgstr "Zobrazit jen prvních 20" + +#: BankMatching.php:154 +msgid "Show selected" +msgstr "Zobrazit vybrané" + +#: BankMatching.php:156 +msgid "Show reconciliation" +msgstr "Zobrazit usmíření" + +#: BankMatching.php:164 BankMatching.php:170 +msgid "The date entered for the field to show" +msgstr "Datum vstoupil na pole show" + +#: BankMatching.php:164 +msgid "before" +msgstr "před" + +#: BankMatching.php:165 BankMatching.php:171 +msgid "is not entered in a recognised date format" +msgstr "není zapsán v uznávané formátu data" + +#: BankMatching.php:165 BankMatching.php:171 +msgid "Entry is expected in the format" +msgstr "Vstup se očekává ve formátu" + +#: BankMatching.php:170 +msgid "after" +msgstr "po" + +#: BankMatching.php:257 +msgid "The payments with the selected criteria could not be retrieved because" +msgstr "Platby podle zadaných kriterií se nepodařilo získat, protože" + +#: BankMatching.php:261 ShipmentCosting.php:533 ShipmentCosting.php:610 +#: SupplierAllocations.php:456 +msgid "Ref" +msgstr "Ref" + +#: BankMatching.php:264 ConfirmDispatch_Invoice.php:276 Credit_Invoice.php:279 +#: CustomerAllocations.php:364 CustomerReceipt.php:897 +#: CustomerTransInquiry.php:107 CustWhereAlloc.php:109 +#: PaymentAllocations.php:67 Payments.php:1026 Payments.php:1030 +#: Payments.php:1046 PcAssignCashToTab.php:222 PcAssignCashToTab.php:345 +#: PcAuthorizeExpenses.php:90 PcClaimExpensesFromTab.php:212 +#: PcClaimExpensesFromTab.php:365 PcReportTab.php:172 PcReportTab.php:326 +#: PrintCheque.php:77 PrintCheque.php:91 SelectCreditItems.php:681 +#: SuppContractChgs.php:79 SuppContractChgs.php:163 SuppFixedAssetChgs.php:76 +#: SuppFixedAssetChgs.php:149 SupplierAllocations.php:457 +#: SupplierCredit.php:352 SupplierCredit.php:385 SupplierCredit.php:421 +#: SupplierCredit.php:460 SupplierInvoice.php:330 SupplierInvoice.php:371 +#: SupplierInvoice.php:411 SupplierInvoice.php:455 +#: SupplierTransInquiry.php:108 SuppShiptChgs.php:81 SuppShiptChgs.php:146 +#: SuppTransGLAnalysis.php:106 SuppTransGLAnalysis.php:191 +#: Z_CheckAllocs.php:66 includes/PDFBankingSummaryPageHeader.inc:55 +#: includes/PDFChequeListingPageHeader.inc:37 +msgid "Amount" +msgstr "Částka" + +#: BankMatching.php:265 BankReconciliation.php:214 BankReconciliation.php:289 +#: PDFOrdersInvoiced.php:351 PDFOrderStatus.php:322 +#: PO_SelectOSPurchOrder.php:233 PO_SelectPurchOrder.php:214 +#: Shipt_Select.php:192 SuppCreditGRNs.php:267 +#: includes/PDFStatementPageHeader.inc:173 +#: includes/PDFStatementPageHeader.inc:180 +msgid "Outstanding" +msgstr "Vynikající" + +#: BankMatching.php:266 +msgid "Clear" +msgstr "Jasný" + +#: BankMatching.php:266 BankMatching.php:295 +msgid "Unclear" +msgstr "Nejasný" + +#: BankMatching.php:342 +msgid "Update Matching" +msgstr "Odpovídající aktualizace" + +#: BankReconciliation.php:7 +msgid "Bank Reconciliation" +msgstr "Banka usmíření" + +#: BankReconciliation.php:27 +msgid "" +"The entry in the bank statement balance is not numeric. The balance on the " +"bank statement should be entered. The exchange difference has not been " +"calculated and no general ledger journal has been created" +msgstr "" +"Záznam v bilanci banky tvrzení není číselná. Zůstatek na bankovním výpisu by " +"měly být zaneseny. Kurzových rozdílů nebyla vypočtena žádná obecná a knihy " +"časopis byl vytvořen" + +#: BankReconciliation.php:39 +msgid "Could not retrieve the exchange rate for the selected bank account" +msgstr "Nepodařilo se načíst směnný kurz pro vybrané bankovní účet" + +#: BankReconciliation.php:68 BankReconciliation.php:86 +msgid "reconciliation on" +msgstr "usmíření, na" + +#: BankReconciliation.php:71 +msgid "Cannot insert a GL entry for the exchange difference because" +msgstr "Nelze vložit záznam GL pro výměnu rozdíl, protože" + +#: BankReconciliation.php:72 +msgid "The SQL that failed to insert the exchange difference GL entry was" +msgstr "SQL, které se nepodařilo vložit kurzový rozdíl GL vstup" + +#: BankReconciliation.php:92 +msgid "Exchange difference of" +msgstr "Kurzových rozdílů z" + +#: BankReconciliation.php:92 +msgid "has been posted" +msgstr "byl vyslán" + +#: BankReconciliation.php:100 SuppPaymentRun.php:316 +msgid "The bank accounts could not be retrieved by the SQL because" +msgstr "Bankovní účty se nepodařilo získat na SQL, protože" + +#: BankReconciliation.php:101 CustomerReceipt.php:742 +#: DailyBankTransactions.php:28 Payments.php:749 SuppPaymentRun.php:318 +msgid "The SQL used to retrieve the bank accounts was" +msgstr "SQL slouží k získání bankovní ú... [truncated message content] |
From: <dai...@us...> - 2011-11-12 21:50:43
|
Revision: 4745 http://web-erp.svn.sourceforge.net/web-erp/?rev=4745&view=rev Author: daintree Date: 2011-11-12 21:50:32 +0000 (Sat, 12 Nov 2011) Log Message: ----------- pre 4.06RC2 Modified Paths: -------------- trunk/doc/Change.log trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-12 09:42:34 UTC (rev 4744) +++ trunk/doc/Change.log 2011-11-12 21:50:32 UTC (rev 4745) @@ -1,5 +1,7 @@ webERP Change Log +13/11/11 Release 4.06RC2 + 12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines 12/11/11 Phil: Removed old Numbers to words class code - this code was not in keeping with the rest of the system and not PHP 5 compatible anyway. Replaced with a much simpler function. This code is only used for pre-printed cheques - so it is in that script only. The new function may not effective for other languages but will be easily adapted as needed. The PrintCheque.php script needs to be modified specifically for the business stationery. 10/11/11 Phil: added a function in includes/SQL_CommonFunctions.inc EnsureGLTransBalance that looks at the gltrans entries for a given transaction type and type number and if the total is not zero and less than 0.05 it fudges the largest gltrans record to make the gltrans balance in total - added to ConfirmDispatch_Invoice.php Credit_Invoice.php SelectCreditItems.php CounterSales.php Payments.php CustomerReceipt.php Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-12 09:42:34 UTC (rev 4744) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-12 21:50:32 UTC (rev 4745) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-06 19:49+1300\n" +"POT-Creation-Date: 2011-11-13 10:46+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -140,21 +140,22 @@ #: Areas.php:116 Areas.php:125 BankAccounts.php:158 CreditStatus.php:125 #: Currencies.php:166 Currencies.php:174 Currencies.php:182 #: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306 -#: CustomerBranches.php:316 CustomerTypes.php:147 CustomerTypes.php:157 -#: Customers.php:289 Customers.php:298 Customers.php:306 Customers.php:314 -#: Factors.php:134 FixedAssetCategories.php:133 GLAccounts.php:80 -#: GLAccounts.php:96 Locations.php:237 Locations.php:245 Locations.php:256 -#: Locations.php:265 Locations.php:274 Locations.php:283 Locations.php:292 -#: Locations.php:301 MRPDemandTypes.php:87 PaymentMethods.php:138 -#: PaymentTerms.php:146 PaymentTerms.php:153 PcExpenses.php:158 -#: SalesCategories.php:124 SalesCategories.php:131 SalesPeople.php:150 -#: SalesPeople.php:157 SalesPeople.php:163 SalesTypes.php:140 -#: SalesTypes.php:150 Shippers.php:82 Shippers.php:94 StockCategories.php:181 -#: Stocks.php:615 Stocks.php:624 Stocks.php:632 Stocks.php:640 Stocks.php:648 -#: Stocks.php:656 SupplierTypes.php:145 Suppliers.php:612 Suppliers.php:621 -#: Suppliers.php:629 TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 -#: TaxProvinces.php:129 UnitsOfMeasure.php:135 WWW_Access.php:83 -#: WorkCentres.php:89 WorkCentres.php:95 +#: CustomerBranches.php:316 Customers.php:289 Customers.php:298 +#: Customers.php:306 Customers.php:314 CustomerTypes.php:147 +#: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:133 +#: GLAccounts.php:80 GLAccounts.php:96 Locations.php:237 Locations.php:245 +#: Locations.php:256 Locations.php:265 Locations.php:274 Locations.php:283 +#: Locations.php:292 Locations.php:301 MRPDemandTypes.php:87 +#: PaymentMethods.php:138 PaymentTerms.php:146 PaymentTerms.php:153 +#: PcExpenses.php:158 SalesCategories.php:124 SalesCategories.php:131 +#: SalesPeople.php:150 SalesPeople.php:157 SalesPeople.php:163 +#: SalesTypes.php:140 SalesTypes.php:150 Shippers.php:82 Shippers.php:94 +#: StockCategories.php:181 Stocks.php:615 Stocks.php:624 Stocks.php:632 +#: Stocks.php:640 Stocks.php:648 Stocks.php:656 Suppliers.php:612 +#: Suppliers.php:621 Suppliers.php:629 SupplierTypes.php:145 +#: TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 +#: TaxProvinces.php:129 UnitsOfMeasure.php:135 WorkCentres.php:89 +#: WorkCentres.php:95 WWW_Access.php:83 msgid "There are" msgstr "Jsou zde" @@ -202,25 +203,25 @@ #: AccountGroups.php:223 AccountSections.php:175 AddCustomerContacts.php:25 #: AddCustomerContacts.php:28 AddCustomerNotes.php:103 #: AddCustomerTypeNotes.php:97 AgedDebtors.php:451 AgedSuppliers.php:278 -#: Areas.php:144 AuditTrail.php:11 BOMExtendedQty.php:261 BOMIndented.php:246 -#: BOMIndentedReverse.php:235 BOMInquiry.php:187 BOMListing.php:109 -#: BOMs.php:213 BOMs.php:832 BankReconciliation.php:13 COGSGLPostings.php:18 -#: CompanyPreferences.php:153 CounterSales.php:2010 CounterSales.php:2135 -#: CreditStatus.php:21 Credit_Invoice.php:255 Currencies.php:28 -#: CustEDISetup.php:17 DailyBankTransactions.php:11 DebtorsAtPeriodEnd.php:125 -#: DiscountCategories.php:10 DiscountCategories.php:131 DiscountMatrix.php:16 -#: EDIMessageFormat.php:104 FixedAssetLocations.php:9 -#: FixedAssetRegister.php:13 FixedAssetRegister.php:243 -#: FixedAssetTransfer.php:31 FormDesigner.php:129 GLBalanceSheet.php:362 -#: GLBudgets.php:29 GLJournal.php:246 InventoryPlanning.php:374 -#: InventoryPlanningPrefSupplier.php:467 Labels.php:115 Labels.php:270 -#: MRPReport.php:515 OutstandingGRNs.php:160 PDFPickingList.php:28 -#: PDFPrintLabel.php:140 PDFStockLocTransfer.php:17 POReport.php:60 -#: POReport.php:64 POReport.php:68 PO_AuthorisationLevels.php:10 -#: PO_SelectOSPurchOrder.php:135 PcAssignCashToTab.php:56 -#: PcAssignCashToTab.php:130 PcAssignCashToTab.php:146 -#: PcAssignCashToTab.php:187 Prices.php:30 PricesBasedOnMarkUp.php:8 -#: Prices_Customer.php:34 PurchData.php:137 PurchData.php:258 +#: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:13 +#: BOMExtendedQty.php:261 BOMIndented.php:246 BOMIndentedReverse.php:235 +#: BOMInquiry.php:187 BOMListing.php:109 BOMs.php:213 BOMs.php:832 +#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2014 +#: CounterSales.php:2140 Credit_Invoice.php:255 CreditStatus.php:21 +#: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:11 +#: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10 +#: DiscountCategories.php:131 DiscountMatrix.php:16 EDIMessageFormat.php:104 +#: FixedAssetLocations.php:9 FixedAssetRegister.php:13 +#: FixedAssetRegister.php:243 FixedAssetTransfer.php:31 FormDesigner.php:129 +#: GLBalanceSheet.php:362 GLBudgets.php:29 GLJournal.php:246 +#: InventoryPlanning.php:374 InventoryPlanningPrefSupplier.php:467 +#: Labels.php:115 Labels.php:270 MRPReport.php:515 OutstandingGRNs.php:160 +#: PcAssignCashToTab.php:56 PcAssignCashToTab.php:130 +#: PcAssignCashToTab.php:146 PcAssignCashToTab.php:187 PDFPickingList.php:28 +#: PDFPrintLabel.php:140 PDFStockLocTransfer.php:17 +#: PO_AuthorisationLevels.php:10 POReport.php:60 POReport.php:64 +#: POReport.php:68 PO_SelectOSPurchOrder.php:135 PricesBasedOnMarkUp.php:8 +#: Prices_Customer.php:34 Prices.php:30 PurchData.php:137 PurchData.php:258 #: PurchData.php:282 RecurringSalesOrders.php:309 SalesAnalReptCols.php:51 #: SalesAnalRepts.php:11 SalesCategories.php:11 SalesGLPostings.php:17 #: SalesGraph.php:34 SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:45 @@ -231,13 +232,13 @@ #: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:9 #: SelectWorkOrder.php:151 ShipmentCosting.php:11 Shipments.php:17 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:8 -#: StockLocMovements.php:13 StockLocStatus.php:27 SupplierTenders.php:260 -#: SupplierTenders.php:317 SupplierTransInquiry.php:10 Suppliers.php:302 -#: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 WWW_Access.php:11 -#: WWW_Users.php:31 WhereUsedInquiry.php:18 WorkCentres.php:111 -#: WorkCentres.php:162 WorkOrderCosting.php:13 WorkOrderEntry.php:11 -#: WorkOrderIssue.php:22 WorkOrderReceive.php:15 WorkOrderStatus.php:42 -#: Z_BottomUpCosts.php:56 +#: StockLocMovements.php:13 StockLocStatus.php:27 Suppliers.php:302 +#: SupplierTenders.php:260 SupplierTenders.php:317 SupplierTransInquiry.php:10 +#: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 +#: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:162 +#: WorkOrderCosting.php:13 WorkOrderEntry.php:11 WorkOrderIssue.php:22 +#: WorkOrderReceive.php:15 WorkOrderStatus.php:42 WWW_Access.php:11 +#: WWW_Users.php:31 Z_BottomUpCosts.php:56 msgid "Search" msgstr "Vyhledávání" @@ -271,90 +272,90 @@ #: ContractCosting.php:198 CustomerBranches.php:410 Customers.php:577 #: Customers.php:925 Customers.php:934 Customers.php:937 #: DeliveryDetails.php:1079 DeliveryDetails.php:1118 DeliveryDetails.php:1121 -#: GLTransInquiry.php:69 MRP.php:529 MRP.php:533 MRP.php:537 MRP.php:541 -#: MRPCalendar.php:224 PDFChequeListing.php:63 PDFDIFOT.php:75 -#: PDFDeliveryDifferences.php:75 PO_AuthorisationLevels.php:134 -#: PO_AuthorisationLevels.php:139 PO_Header.php:777 PO_PDFPurchOrder.php:382 -#: PO_PDFPurchOrder.php:385 PaymentMethods.php:197 PaymentMethods.php:198 +#: GLTransInquiry.php:69 MRPCalendar.php:224 MRP.php:529 MRP.php:533 +#: MRP.php:537 MRP.php:541 PaymentMethods.php:197 PaymentMethods.php:198 #: PaymentMethods.php:199 PaymentMethods.php:262 PaymentMethods.php:268 -#: PaymentMethods.php:275 PcAuthorizeExpenses.php:244 PurchData.php:189 -#: PurchData.php:514 PurchData.php:517 RecurringSalesOrders.php:482 -#: RecurringSalesOrders.php:485 SalesAnalReptCols.php:284 -#: SalesAnalReptCols.php:419 SalesAnalReptCols.php:422 SalesAnalRepts.php:415 -#: SalesAnalRepts.php:418 SalesAnalRepts.php:443 SalesAnalRepts.php:446 -#: SalesAnalRepts.php:471 SalesAnalRepts.php:474 SalesPeople.php:219 -#: SalesPeople.php:354 SalesPeople.php:356 SelectProduct.php:381 -#: ShipmentCosting.php:663 Stocks.php:1013 Stocks.php:1015 Stocks.php:1038 -#: Stocks.php:1040 SuppContractChgs.php:90 SystemParameters.php:389 -#: SystemParameters.php:412 SystemParameters.php:428 SystemParameters.php:491 -#: SystemParameters.php:499 SystemParameters.php:539 SystemParameters.php:612 -#: SystemParameters.php:621 SystemParameters.php:629 SystemParameters.php:647 -#: SystemParameters.php:654 SystemParameters.php:781 SystemParameters.php:916 -#: SystemParameters.php:918 SystemParameters.php:928 SystemParameters.php:930 -#: SystemParameters.php:984 SystemParameters.php:996 SystemParameters.php:998 -#: TaxGroups.php:307 TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:632 -#: WWW_Users.php:634 +#: PaymentMethods.php:275 PcAuthorizeExpenses.php:244 PDFChequeListing.php:63 +#: PDFDeliveryDifferences.php:75 PDFDIFOT.php:75 +#: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 +#: PO_Header.php:777 PO_PDFPurchOrder.php:382 PO_PDFPurchOrder.php:385 +#: PurchData.php:189 PurchData.php:514 PurchData.php:517 +#: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485 +#: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419 +#: SalesAnalReptCols.php:422 SalesAnalRepts.php:415 SalesAnalRepts.php:418 +#: SalesAnalRepts.php:443 SalesAnalRepts.php:446 SalesAnalRepts.php:471 +#: SalesAnalRepts.php:474 SalesPeople.php:219 SalesPeople.php:354 +#: SalesPeople.php:356 SelectProduct.php:381 ShipmentCosting.php:663 +#: Stocks.php:1015 Stocks.php:1017 Stocks.php:1040 Stocks.php:1042 +#: SuppContractChgs.php:90 SystemParameters.php:389 SystemParameters.php:412 +#: SystemParameters.php:428 SystemParameters.php:491 SystemParameters.php:499 +#: SystemParameters.php:539 SystemParameters.php:612 SystemParameters.php:621 +#: SystemParameters.php:629 SystemParameters.php:647 SystemParameters.php:654 +#: SystemParameters.php:781 SystemParameters.php:916 SystemParameters.php:918 +#: SystemParameters.php:928 SystemParameters.php:930 SystemParameters.php:984 +#: SystemParameters.php:996 SystemParameters.php:998 TaxGroups.php:307 +#: TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:632 WWW_Users.php:634 msgid "Yes" msgstr "Ano" #: AccountGroups.php:253 AccountGroups.php:385 AccountGroups.php:387 -#: BOMs.php:124 BOMs.php:745 BOMs.php:749 BankAccounts.php:210 -#: BankAccounts.php:371 BankAccounts.php:373 BankAccounts.php:377 -#: BankAccounts.php:385 CompanyPreferences.php:475 CompanyPreferences.php:479 +#: BankAccounts.php:210 BankAccounts.php:371 BankAccounts.php:373 +#: BankAccounts.php:377 BankAccounts.php:385 BOMs.php:124 BOMs.php:745 +#: BOMs.php:749 CompanyPreferences.php:475 CompanyPreferences.php:479 #: CompanyPreferences.php:490 CompanyPreferences.php:494 #: CompanyPreferences.php:505 CompanyPreferences.php:509 #: ContractCosting.php:196 CustomerBranches.php:410 Customers.php:576 #: Customers.php:920 Customers.php:933 Customers.php:936 #: DeliveryDetails.php:1080 DeliveryDetails.php:1119 DeliveryDetails.php:1122 -#: GLTransInquiry.php:86 MRP.php:527 MRP.php:531 MRP.php:535 MRP.php:539 -#: MRPCalendar.php:226 PDFChequeListing.php:62 PDFDIFOT.php:74 -#: PDFDeliveryDifferences.php:74 PO_AuthorisationLevels.php:136 -#: PO_AuthorisationLevels.php:141 PO_Header.php:776 PO_PDFPurchOrder.php:383 -#: PO_PDFPurchOrder.php:386 PaymentMethods.php:197 PaymentMethods.php:198 +#: GLTransInquiry.php:86 MRPCalendar.php:226 MRP.php:527 MRP.php:531 +#: MRP.php:535 MRP.php:539 PaymentMethods.php:197 PaymentMethods.php:198 #: PaymentMethods.php:199 PaymentMethods.php:263 PaymentMethods.php:269 -#: PaymentMethods.php:276 PcAuthorizeExpenses.php:242 PurchData.php:192 -#: PurchData.php:515 PurchData.php:518 RecurringSalesOrders.php:481 -#: RecurringSalesOrders.php:484 SalesAnalReptCols.php:282 -#: SalesAnalReptCols.php:420 SalesAnalReptCols.php:423 SalesAnalRepts.php:414 -#: SalesAnalRepts.php:417 SalesAnalRepts.php:442 SalesAnalRepts.php:445 -#: SalesAnalRepts.php:470 SalesAnalRepts.php:473 SalesPeople.php:221 -#: SalesPeople.php:359 SalesPeople.php:361 SelectProduct.php:383 -#: ShipmentCosting.php:664 Stocks.php:1008 Stocks.php:1010 Stocks.php:1033 -#: Stocks.php:1035 SuppContractChgs.php:92 SystemParameters.php:390 -#: SystemParameters.php:413 SystemParameters.php:429 SystemParameters.php:492 -#: SystemParameters.php:500 SystemParameters.php:540 SystemParameters.php:613 -#: SystemParameters.php:622 SystemParameters.php:630 SystemParameters.php:648 -#: SystemParameters.php:655 SystemParameters.php:782 SystemParameters.php:915 -#: SystemParameters.php:919 SystemParameters.php:927 SystemParameters.php:931 -#: SystemParameters.php:985 SystemParameters.php:995 SystemParameters.php:999 -#: TaxGroups.php:308 TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:631 -#: WWW_Users.php:635 includes/PDFLowGPPageHeader.inc:44 -#: includes/PDFTaxPageHeader.inc:35 +#: PaymentMethods.php:276 PcAuthorizeExpenses.php:242 PDFChequeListing.php:62 +#: PDFDeliveryDifferences.php:74 PDFDIFOT.php:74 +#: PO_AuthorisationLevels.php:136 PO_AuthorisationLevels.php:141 +#: PO_Header.php:776 PO_PDFPurchOrder.php:383 PO_PDFPurchOrder.php:386 +#: PurchData.php:192 PurchData.php:515 PurchData.php:518 +#: RecurringSalesOrders.php:481 RecurringSalesOrders.php:484 +#: SalesAnalReptCols.php:282 SalesAnalReptCols.php:420 +#: SalesAnalReptCols.php:423 SalesAnalRepts.php:414 SalesAnalRepts.php:417 +#: SalesAnalRepts.php:442 SalesAnalRepts.php:445 SalesAnalRepts.php:470 +#: SalesAnalRepts.php:473 SalesPeople.php:221 SalesPeople.php:359 +#: SalesPeople.php:361 SelectProduct.php:383 ShipmentCosting.php:664 +#: Stocks.php:1010 Stocks.php:1012 Stocks.php:1035 Stocks.php:1037 +#: SuppContractChgs.php:92 SystemParameters.php:390 SystemParameters.php:413 +#: SystemParameters.php:429 SystemParameters.php:492 SystemParameters.php:500 +#: SystemParameters.php:540 SystemParameters.php:613 SystemParameters.php:622 +#: SystemParameters.php:630 SystemParameters.php:648 SystemParameters.php:655 +#: SystemParameters.php:782 SystemParameters.php:915 SystemParameters.php:919 +#: SystemParameters.php:927 SystemParameters.php:931 SystemParameters.php:985 +#: SystemParameters.php:995 SystemParameters.php:999 TaxGroups.php:308 +#: TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:631 WWW_Users.php:635 +#: includes/PDFLowGPPageHeader.inc:44 includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Ne" #: AccountGroups.php:262 AccountSections.php:196 AddCustomerContacts.php:149 #: AddCustomerNotes.php:141 AddCustomerTypeNotes.php:128 Areas.php:164 -#: BOMs.php:149 BankAccounts.php:223 COGSGLPostings.php:108 +#: BankAccounts.php:223 BOMs.php:149 COGSGLPostings.php:108 #: COGSGLPostings.php:206 CreditStatus.php:174 Currencies.php:272 -#: CustomerBranches.php:414 CustomerTypes.php:202 Customers.php:1011 -#: Customers.php:1045 EDIMessageFormat.php:150 Factors.php:329 +#: CustomerBranches.php:414 Customers.php:1011 Customers.php:1045 +#: CustomerTypes.php:202 EDIMessageFormat.php:150 Factors.php:329 #: FixedAssetCategories.php:186 FixedAssetLocations.php:107 -#: FreightCosts.php:240 GLAccounts.php:312 GLTags.php:91 GeocodeSetup.php:173 -#: Labels.php:411 Locations.php:382 MRPDemandTypes.php:120 MRPDemands.php:306 -#: PO_AuthorisationLevels.php:151 PaymentMethods.php:200 PaymentTerms.php:205 -#: PcAssignCashToTab.php:259 PcClaimExpensesFromTab.php:252 PcExpenses.php:223 -#: PcTabs.php:234 PcTypeTabs.php:172 Prices.php:251 Prices_Customer.php:277 -#: PurchData.php:204 SalesCategories.php:255 SalesGLPostings.php:132 -#: SalesGLPostings.php:245 SalesPeople.php:232 SalesTypes.php:206 -#: SecurityTokens.php:128 SelectCustomer.php:612 SelectCustomer.php:630 -#: SelectCustomer.php:654 SelectCustomer.php:671 SelectCustomer.php:695 -#: SelectCustomer.php:712 Shippers.php:144 StockCategories.php:242 -#: SuppTransGLAnalysis.php:120 SupplierContacts.php:163 SupplierTypes.php:189 -#: TaxAuthorities.php:174 TaxCategories.php:182 TaxGroups.php:188 -#: TaxProvinces.php:180 UnitsOfMeasure.php:185 WWW_Access.php:123 -#: WWW_Users.php:318 WorkCentres.php:141 includes/InputSerialItems.php:88 -#: includes/OutputSerialItems.php:20 +#: FreightCosts.php:240 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:91 +#: Labels.php:411 Locations.php:382 MRPDemands.php:306 MRPDemandTypes.php:120 +#: PaymentMethods.php:200 PaymentTerms.php:205 PcAssignCashToTab.php:259 +#: PcClaimExpensesFromTab.php:252 PcExpenses.php:223 PcTabs.php:234 +#: PcTypeTabs.php:172 PO_AuthorisationLevels.php:151 Prices_Customer.php:277 +#: Prices.php:251 PurchData.php:204 SalesCategories.php:255 +#: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:232 +#: SalesTypes.php:206 SecurityTokens.php:128 SelectCustomer.php:612 +#: SelectCustomer.php:630 SelectCustomer.php:654 SelectCustomer.php:671 +#: SelectCustomer.php:695 SelectCustomer.php:712 Shippers.php:144 +#: StockCategories.php:242 SupplierContacts.php:163 SupplierTypes.php:189 +#: SuppTransGLAnalysis.php:120 TaxAuthorities.php:174 TaxCategories.php:182 +#: TaxGroups.php:188 TaxProvinces.php:180 UnitsOfMeasure.php:185 +#: WorkCentres.php:141 WWW_Access.php:123 WWW_Users.php:318 +#: includes/InputSerialItems.php:88 includes/OutputSerialItems.php:20 #, php-format msgid "Edit" msgstr "Upravit" @@ -366,32 +367,33 @@ #: AccountGroups.php:263 AccountSections.php:200 AddCustomerContacts.php:150 #: AddCustomerNotes.php:142 AddCustomerTypeNotes.php:129 Areas.php:165 -#: BOMs.php:151 BankAccounts.php:224 COGSGLPostings.php:109 +#: BankAccounts.php:224 BOMs.php:151 COGSGLPostings.php:109 #: COGSGLPostings.php:207 ContractBOM.php:266 ContractOtherReqts.php:119 -#: CounterSales.php:812 CreditStatus.php:175 Credit_Invoice.php:381 -#: Currencies.php:275 CustomerReceipt.php:913 CustomerTypes.php:203 -#: Customers.php:1046 DiscountCategories.php:219 DiscountMatrix.php:182 +#: CounterSales.php:813 Credit_Invoice.php:381 CreditStatus.php:175 +#: Currencies.php:275 CustomerReceipt.php:918 Customers.php:1046 +#: CustomerTypes.php:203 DiscountCategories.php:219 DiscountMatrix.php:182 #: EDIMessageFormat.php:151 FixedAssetCategories.php:187 FreightCosts.php:241 -#: GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 GeocodeSetup.php:174 -#: Labels.php:411 Locations.php:383 MRPDemandTypes.php:121 MRPDemands.php:307 -#: PO_AuthorisationLevels.php:153 PO_Items.php:711 PaymentMethods.php:201 -#: PaymentTerms.php:206 Payments.php:1057 PcAssignCashToTab.php:263 -#: PcClaimExpensesFromTab.php:253 PcExpenses.php:224 PcExpensesTypeTab.php:185 -#: PcTabs.php:235 PcTypeTabs.php:173 Prices.php:252 Prices_Customer.php:278 -#: PurchData.php:205 SalesAnalReptCols.php:299 SalesAnalRepts.php:303 -#: SalesCategories.php:256 SalesGLPostings.php:133 SalesGLPostings.php:246 -#: SalesPeople.php:233 SalesTypes.php:207 SecurityTokens.php:129 -#: SelectCreditItems.php:764 SelectCustomer.php:613 SelectCustomer.php:631 -#: SelectCustomer.php:655 SelectCustomer.php:672 SelectCustomer.php:696 -#: SelectCustomer.php:713 SelectOrderItems.php:1387 Shipments.php:429 -#: Shippers.php:145 SpecialOrder.php:655 StockCategories.php:243 -#: StockCategories.php:554 SuppContractChgs.php:99 SuppCreditGRNs.php:102 -#: SuppFixedAssetChgs.php:87 SuppInvGRNs.php:139 SuppShiptChgs.php:90 -#: SuppTransGLAnalysis.php:121 SupplierContacts.php:164 SupplierTypes.php:191 -#: TaxAuthorities.php:175 TaxCategories.php:183 TaxGroups.php:189 -#: TaxProvinces.php:181 UnitsOfMeasure.php:186 WOSerialNos.php:319 -#: WWW_Access.php:124 WWW_Users.php:319 WorkCentres.php:142 -#: includes/InputSerialItemsKeyed.php:59 includes/OutputSerialItems.php:99 +#: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 +#: Labels.php:411 Locations.php:383 MRPDemands.php:307 MRPDemandTypes.php:121 +#: PaymentMethods.php:201 Payments.php:1069 PaymentTerms.php:206 +#: PcAssignCashToTab.php:263 PcClaimExpensesFromTab.php:253 PcExpenses.php:224 +#: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 +#: PO_AuthorisationLevels.php:153 PO_Items.php:711 Prices_Customer.php:278 +#: Prices.php:252 PurchData.php:205 SalesAnalReptCols.php:299 +#: SalesAnalRepts.php:303 SalesCategories.php:256 SalesGLPostings.php:133 +#: SalesGLPostings.php:246 SalesPeople.php:233 SalesTypes.php:207 +#: SecurityTokens.php:129 SelectCreditItems.php:764 SelectCustomer.php:613 +#: SelectCustomer.php:631 SelectCustomer.php:655 SelectCustomer.php:672 +#: SelectCustomer.php:696 SelectCustomer.php:713 SelectOrderItems.php:1387 +#: Shipments.php:429 Shippers.php:145 SpecialOrder.php:655 +#: StockCategories.php:243 StockCategories.php:554 SuppContractChgs.php:99 +#: SuppCreditGRNs.php:102 SuppFixedAssetChgs.php:87 SuppInvGRNs.php:139 +#: SupplierContacts.php:164 SupplierTypes.php:191 SuppShiptChgs.php:90 +#: SuppTransGLAnalysis.php:121 TaxAuthorities.php:175 TaxCategories.php:183 +#: TaxGroups.php:189 TaxProvinces.php:181 UnitsOfMeasure.php:186 +#: WorkCentres.php:142 WOSerialNos.php:319 WWW_Access.php:124 +#: WWW_Users.php:319 includes/InputSerialItemsKeyed.php:58 +#: includes/OutputSerialItems.php:99 #, php-format msgid "Delete" msgstr "Smazat" @@ -435,19 +437,19 @@ #: AccountGroups.php:397 AccountSections.php:264 AddCustomerContacts.php:258 #: AddCustomerNotes.php:245 AddCustomerTypeNotes.php:210 Areas.php:227 -#: BOMs.php:759 BankAccounts.php:391 COGSGLPostings.php:354 +#: BankAccounts.php:391 BOMs.php:759 COGSGLPostings.php:354 #: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:272 #: DiscountMatrix.php:141 EDIMessageFormat.php:248 #: FixedAssetCategories.php:344 FixedAssetLocations.php:156 -#: FreightCosts.php:339 GLAccounts.php:262 GeocodeSetup.php:270 -#: Locations.php:597 MRPDemandTypes.php:187 MRPDemands.php:419 -#: OffersReceived.php:56 OffersReceived.php:143 PO_AuthorisationLevels.php:248 -#: PaymentMethods.php:282 PaymentTerms.php:309 Prices_Customer.php:354 +#: FreightCosts.php:339 GeocodeSetup.php:270 GLAccounts.php:262 +#: Locations.php:597 MRPDemands.php:419 MRPDemandTypes.php:187 +#: OffersReceived.php:56 OffersReceived.php:143 PaymentMethods.php:282 +#: PaymentTerms.php:309 PO_AuthorisationLevels.php:248 Prices_Customer.php:354 #: SalesAnalReptCols.php:552 SalesAnalRepts.php:514 SalesGLPostings.php:416 #: SalesPeople.php:368 Shippers.php:200 StockCategories.php:581 -#: SuppLoginSetup.php:293 SupplierContacts.php:281 TaxAuthorities.php:327 +#: SupplierContacts.php:281 SuppLoginSetup.php:293 TaxAuthorities.php:327 #: TaxCategories.php:237 TaxProvinces.php:235 UnitsOfMeasure.php:240 -#: WWW_Users.php:674 WorkCentres.php:279 +#: WorkCentres.php:279 WWW_Users.php:674 msgid "Enter Information" msgstr "Vložit informace" @@ -557,10 +559,10 @@ #: AddCustomerContacts.php:61 AddCustomerNotes.php:52 #: AddCustomerTypeNotes.php:49 Areas.php:73 CustomerTypes.php:69 #: DeliveryDetails.php:774 Factors.php:105 FixedAssetItems.php:246 -#: MRPCalendar.php:176 PO_Items.php:374 PcAssignCashToTab.php:88 -#: PcClaimExpensesFromTab.php:79 PcExpenses.php:95 PcTabs.php:102 -#: PcTypeTabs.php:60 SalesAnalReptCols.php:129 SalesPeople.php:97 -#: SalesTypes.php:66 Stocks.php:497 SupplierTypes.php:67 Suppliers.php:513 +#: MRPCalendar.php:176 PcAssignCashToTab.php:88 PcClaimExpensesFromTab.php:79 +#: PcExpenses.php:95 PcTabs.php:102 PcTypeTabs.php:60 PO_Items.php:374 +#: SalesAnalReptCols.php:129 SalesPeople.php:97 SalesTypes.php:66 +#: Stocks.php:497 Suppliers.php:513 SupplierTypes.php:67 msgid "has been updated" msgstr "byla aktualizována" @@ -575,7 +577,7 @@ #: AddCustomerContacts.php:128 CompanyPreferences.php:223 #: CustomerBranches.php:368 Customers.php:998 Customers.php:1006 #: SalesPeople.php:200 SelectCustomer.php:607 StockDispatch.php:187 -#: StockDispatch.php:199 SuppTransGLAnalysis.php:105 SupplierContacts.php:150 +#: StockDispatch.php:199 SupplierContacts.php:150 SuppTransGLAnalysis.php:105 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 #: includes/PDFTaxPageHeader.inc:37 msgid "Name" @@ -680,15 +682,15 @@ #: CustomerAllocations.php:363 CustomerInquiry.php:196 #: CustomerTransInquiry.php:100 GLAccountInquiry.php:152 #: GLAccountReport.php:338 GLTransInquiry.php:42 MRPCalendar.php:219 -#: PDFRemittanceAdvice.php:300 PaymentAllocations.php:66 -#: PcAssignCashToTab.php:220 PcAuthorizeExpenses.php:88 PrintCustTrans.php:822 -#: PrintCustTransPortrait.php:867 ReverseGRN.php:386 ShipmentCosting.php:534 -#: ShipmentCosting.php:611 Shipments.php:476 StockDispatch.php:189 -#: StockDispatch.php:201 StockLocMovements.php:90 StockMovements.php:94 -#: StockSerialItemResearch.php:81 SupplierAllocations.php:455 -#: SupplierAllocations.php:568 SupplierAllocations.php:643 -#: SupplierInquiry.php:209 SupplierTransInquiry.php:103 -#: includes/PDFQuotationPageHeader.inc:92 +#: PaymentAllocations.php:66 PcAssignCashToTab.php:220 +#: PcAuthorizeExpenses.php:88 PDFRemittanceAdvice.php:300 +#: PrintCustTrans.php:822 PrintCustTransPortrait.php:867 ReverseGRN.php:386 +#: ShipmentCosting.php:534 ShipmentCosting.php:611 Shipments.php:476 +#: StockDispatch.php:189 StockDispatch.php:201 StockLocMovements.php:90 +#: StockMovements.php:94 StockSerialItemResearch.php:81 +#: SupplierAllocations.php:455 SupplierAllocations.php:568 +#: SupplierAllocations.php:643 SupplierInquiry.php:209 +#: SupplierTransInquiry.php:103 includes/PDFQuotationPageHeader.inc:92 #: includes/PDFQuotationPortraitPageHeader.inc:90 #: includes/PDFStatementPageHeader.inc:169 includes/PDFTaxPageHeader.inc:36 #: includes/PDFTransPageHeader.inc:48 @@ -697,9 +699,9 @@ msgstr "Datum" #: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:109 PcReportTab.php:173 -#: Stocks.php:1017 UpgradeDatabase.php:172 UpgradeDatabase.php:175 -#: UpgradeDatabase.php:178 UpgradeDatabase.php:181 UpgradeDatabase.php:184 -#: UpgradeDatabase.php:187 UpgradeDatabase.php:190 UpgradeDatabase.php:193 +#: Stocks.php:1019 UpgradeDatabase.php:174 UpgradeDatabase.php:177 +#: UpgradeDatabase.php:180 UpgradeDatabase.php:183 UpgradeDatabase.php:186 +#: UpgradeDatabase.php:189 UpgradeDatabase.php:192 UpgradeDatabase.php:195 #: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 #: Z_Upgrade_3.10-3.11.php:70 Z_Upgrade_3.10-3.11.php:74 #: Z_Upgrade_3.10-3.11.php:78 Z_Upgrade_3.11-4.00.php:62 @@ -796,22 +798,22 @@ #: BOMIndentedReverse.php:140 BOMListing.php:41 BOMListing.php:52 #: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:100 #: GLBalanceSheet.php:139 GLProfit_Loss.php:177 GLTagProfit_Loss.php:191 -#: GLTrialBalance.php:165 InventoryPlanning.php:98 InventoryPlanning.php:173 +#: GLTrialBalance.php:159 InventoryPlanning.php:98 InventoryPlanning.php:173 #: InventoryPlanning.php:208 InventoryPlanning.php:256 #: InventoryPlanning.php:294 InventoryPlanningPrefSupplier.php:201 #: InventoryPlanningPrefSupplier.php:269 InventoryPlanningPrefSupplier.php:303 #: InventoryPlanningPrefSupplier.php:348 InventoryPlanningPrefSupplier.php:394 #: InventoryQuantities.php:84 InventoryValuation.php:78 -#: MRPPlannedPurchaseOrders.php:114 MRPPlannedWorkOrders.php:106 -#: MRPReport.php:147 MRPReport.php:508 MRPReschedules.php:45 -#: MRPReschedules.php:57 MRPShortages.php:155 MRPShortages.php:167 -#: MailInventoryValuation.php:114 OutstandingGRNs.php:53 -#: OutstandingGRNs.php:65 PDFCustomerList.php:18 PDFCustomerList.php:230 -#: PDFCustomerList.php:242 PDFLowGP.php:20 PDFStockCheckComparison.php:33 +#: MailInventoryValuation.php:114 MRPPlannedPurchaseOrders.php:114 +#: MRPPlannedWorkOrders.php:106 MRPReport.php:147 MRPReport.php:508 +#: MRPReschedules.php:45 MRPReschedules.php:57 MRPShortages.php:155 +#: MRPShortages.php:167 OutstandingGRNs.php:53 OutstandingGRNs.php:65 +#: PDFCustomerList.php:18 PDFCustomerList.php:230 PDFCustomerList.php:242 +#: PDFLowGP.php:20 PDFStockCheckComparison.php:33 #: PDFStockCheckComparison.php:59 PDFStockCheckComparison.php:264 #: ReorderLevel.php:60 SelectAsset.php:37 SelectProduct.php:39 -#: StockCheck.php:66 StockCheck.php:140 SuppPriceList.php:130 -#: SupplierTenders.php:326 includes/PDFPaymentRun_PymtFooter.php:149 +#: StockCheck.php:66 StockCheck.php:140 SupplierTenders.php:326 +#: SuppPriceList.php:130 includes/PDFPaymentRun_PymtFooter.php:152 msgid "Problem Report" msgstr "Problém" @@ -825,10 +827,10 @@ #: BOMExtendedQty.php:248 BOMIndented.php:153 BOMIndented.php:234 #: BOMIndentedReverse.php:144 BOMIndentedReverse.php:221 BOMListing.php:44 #: Credit_Invoice.php:184 DebtorsAtPeriodEnd.php:60 DebtorsAtPeriodEnd.php:72 -#: FTP_RadioBeacon.php:187 GLBalanceSheet.php:104 GLBalanceSheet.php:142 -#: GLBalanceSheet.php:305 GLProfit_Loss.php:180 GLProfit_Loss.php:192 -#: GLTagProfit_Loss.php:195 GLTagProfit_Loss.php:208 GLTrialBalance.php:168 -#: GLTrialBalance.php:180 GetStockImage.php:150 InventoryPlanning.php:101 +#: FTP_RadioBeacon.php:187 GetStockImage.php:150 GLBalanceSheet.php:104 +#: GLBalanceSheet.php:142 GLBalanceSheet.php:305 GLProfit_Loss.php:180 +#: GLProfit_Loss.php:192 GLTagProfit_Loss.php:195 GLTagProfit_Loss.php:208 +#: GLTrialBalance.php:162 GLTrialBalance.php:174 InventoryPlanning.php:101 #: InventoryPlanning.php:176 InventoryPlanning.php:211 #: InventoryPlanning.php:259 InventoryPlanning.php:297 #: InventoryPlanning.php:360 InventoryPlanningPrefSupplier.php:204 @@ -836,34 +838,35 @@ #: InventoryPlanningPrefSupplier.php:351 InventoryPlanningPrefSupplier.php:397 #: InventoryPlanningPrefSupplier.php:453 InventoryQuantities.php:87 #: InventoryQuantities.php:98 InventoryValuation.php:81 -#: InventoryValuation.php:92 MRPPlannedPurchaseOrders.php:117 +#: InventoryValuation.php:92 MailInventoryValuation.php:117 +#: MailInventoryValuation.php:213 MRPPlannedPurchaseOrders.php:117 #: MRPPlannedPurchaseOrders.php:128 MRPPlannedWorkOrders.php:109 #: MRPPlannedWorkOrders.php:120 MRPPlannedWorkOrders.php:308 MRPReport.php:39 #: MRPReport.php:50 MRPReport.php:150 MRPReschedules.php:48 #: MRPReschedules.php:60 MRPShortages.php:158 MRPShortages.php:170 -#: MailInventoryValuation.php:117 MailInventoryValuation.php:213 #: OutstandingGRNs.php:56 OutstandingGRNs.php:68 PDFCustomerList.php:233 #: PDFCustomerList.php:245 PDFGrn.php:123 PDFLowGP.php:59 PDFLowGP.php:71 #: PDFPriceList.php:128 PDFQuotation.php:270 PDFQuotationPortrait.php:268 #: PDFRemittanceAdvice.php:83 PDFStockCheckComparison.php:37 #: PDFStockCheckComparison.php:63 PDFStockCheckComparison.php:268 -#: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:152 PrintCustOrder.php:220 -#: PrintCustOrder_generic.php:243 ReorderLevel.php:63 ReorderLevel.php:152 -#: SalesAnalysis_UserDefined.php:28 SelectCreditItems.php:30 StockCheck.php:47 -#: StockCheck.php:69 StockCheck.php:100 StockCheck.php:143 StockCheck.php:154 -#: StockCheck.php:195 StockDispatch.php:93 StockDispatch.php:106 -#: SuppPaymentRun.php:112 SuppPaymentRun.php:122 SuppPaymentRun.php:186 -#: SuppPaymentRun.php:216 SuppPriceList.php:134 SupplierBalsAtPeriodEnd.php:54 -#: SupplierBalsAtPeriodEnd.php:65 Tax.php:63 Tax.php:168 Tax.php:277 +#: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:152 +#: PrintCustOrder_generic.php:243 PrintCustOrder.php:220 ReorderLevel.php:63 +#: ReorderLevel.php:152 SalesAnalysis_UserDefined.php:28 +#: SelectCreditItems.php:30 StockCheck.php:47 StockCheck.php:69 +#: StockCheck.php:100 StockCheck.php:143 StockCheck.php:154 StockCheck.php:195 +#: StockDispatch.php:93 StockDispatch.php:106 SupplierBalsAtPeriodEnd.php:54 +#: SupplierBalsAtPeriodEnd.php:65 SuppPaymentRun.php:112 +#: SuppPaymentRun.php:122 SuppPaymentRun.php:186 SuppPaymentRun.php:217 +#: SuppPriceList.php:134 Tax.php:63 Tax.php:168 Tax.php:277 #: Z_DataExport.php:72 Z_DataExport.php:168 Z_DataExport.php:259 #: Z_DataExport.php:308 Z_DataExport.php:347 Z_DataExport.php:383 #: Z_DataExport.php:419 Z_DataExport.php:471 Z_poRebuildDefault.php:38 -#: includes/PDFPaymentRun_PymtFooter.php:57 -#: includes/PDFPaymentRun_PymtFooter.php:87 -#: includes/PDFPaymentRun_PymtFooter.php:116 -#: includes/PDFPaymentRun_PymtFooter.php:152 -#: includes/PDFPaymentRun_PymtFooter.php:183 -#: includes/PDFPaymentRun_PymtFooter.php:215 +#: includes/PDFPaymentRun_PymtFooter.php:59 +#: includes/PDFPaymentRun_PymtFooter.php:89 +#: includes/PDFPaymentRun_PymtFooter.php:119 +#: includes/PDFPaymentRun_PymtFooter.php:156 +#: includes/PDFPaymentRun_PymtFooter.php:187 +#: includes/PDFPaymentRun_PymtFooter.php:218 #: includes/ConstructSQLForUserDefinedSalesReport.inc:180 #: includes/ConstructSQLForUserDefinedSalesReport.inc:188 #: includes/ConstructSQLForUserDefinedSalesReport.inc:340 @@ -883,31 +886,30 @@ msgstr "se nepodařilo získat, protože" #: AgedDebtors.php:374 AgedSuppliers.php:201 Areas.php:95 -#: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:960 -#: ConfirmDispatch_Invoice.php:974 Contracts.php:580 CounterSales.php:1353 -#: CounterSales.php:1367 Credit_Invoice.php:697 Credit_Invoice.php:718 -#: CustomerReceipt.php:537 CustomerReceipt.php:676 CustomerReceipt.php:704 +#: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:959 +#: ConfirmDispatch_Invoice.php:973 Contracts.php:580 CounterSales.php:1354 +#: CounterSales.php:1368 Credit_Invoice.php:697 Credit_Invoice.php:718 +#: CustomerReceipt.php:542 CustomerReceipt.php:681 CustomerReceipt.php:709 #: CustomerTransInquiry.php:91 DeliveryDetails.php:396 GLProfit_Loss.php:596 -#: GLTagProfit_Loss.php:511 PDFRemittanceAdvice.php:85 Payments.php:325 +#: GLTagProfit_Loss.php:511 Payments.php:334 PDFRemittanceAdvice.php:85 #: PurchData.php:86 PurchData.php:104 PurchData.php:245 #: RecurringSalesOrders.php:256 ReverseGRN.php:191 ReverseGRN.php:205 #: ReverseGRN.php:374 SelectCreditItems.php:1408 SelectSalesOrder.php:189 #: SelectSalesOrder.php:353 StockCheck.php:223 StockCostUpdate.php:77 #: StockCostUpdate.php:87 StockLocStatus.php:153 StockMovements.php:87 #: StockQuantityByDate.php:95 StockReorderLevel.php:40 StockStatus.php:265 -#: StockTransfers.php:191 StockUsage.php:139 StockUsageGraph.php:53 -#: SuppPaymentRun.php:114 SuppPaymentRun.php:188 SuppPaymentRun.php:218 +#: StockTransfers.php:191 StockUsageGraph.php:53 StockUsage.php:139 #: SupplierInquiry.php:78 SupplierInquiry.php:100 SupplierInquiry.php:136 -#: SupplierInquiry.php:190 SupplierTransInquiry.php:95 WOSerialNos.php:47 -#: WorkOrderCosting.php:418 WorkOrderReceive.php:273 -#: Z_ChangeBranchCode.php:105 Z_ChangeCustomerCode.php:91 -#: Z_DeleteCreditNote.php:58 Z_DeleteInvoice.php:87 -#: includes/PDFPaymentRun_PymtFooter.php:59 -#: includes/PDFPaymentRun_PymtFooter.php:89 -#: includes/PDFPaymentRun_PymtFooter.php:118 -#: includes/PDFPaymentRun_PymtFooter.php:154 -#: includes/PDFPaymentRun_PymtFooter.php:185 includes/ConnectDB_mysql.inc:67 -#: includes/ConnectDB_mysqli.inc:81 +#: SupplierInquiry.php:190 SupplierTransInquiry.php:95 SuppPaymentRun.php:114 +#: SuppPaymentRun.php:188 SuppPaymentRun.php:219 WorkOrderCosting.php:418 +#: WorkOrderReceive.php:273 WOSerialNos.php:47 Z_ChangeBranchCode.php:105 +#: Z_ChangeCustomerCode.php:91 Z_DeleteCreditNote.php:58 +#: Z_DeleteInvoice.php:87 includes/PDFPaymentRun_PymtFooter.php:61 +#: includes/PDFPaymentRun_PymtFooter.php:91 +#: includes/PDFPaymentRun_PymtFooter.php:121 +#: includes/PDFPaymentRun_PymtFooter.php:158 +#: includes/PDFPaymentRun_PymtFooter.php:189 includes/ConnectDB_mysqli.inc:81 +#: includes/ConnectDB_mysql.inc:67 msgid "The SQL that failed was" msgstr "SQL příkaz, který selhal, byl" @@ -980,7 +982,7 @@ #: PDFPriceList.php:307 PDFRemittanceAdvice.php:170 #: PDFStockCheckComparison.php:358 PrintCustTrans.php:540 #: PrintCustTransPortrait.php:578 ReorderLevel.php:228 StockDispatch.php:327 -#: SuppPriceList.php:246 SupplierBalsAtPeriodEnd.php:159 Tax.php:351 +#: SupplierBalsAtPeriodEnd.php:159 SuppPriceList.php:246 Tax.php:351 msgid "Print PDF" msgstr "Tisknout PDF" @@ -1013,12 +1015,12 @@ msgstr "Dodavatel ve věku analýza" #: AgedSuppliers.php:288 OutstandingGRNs.php:168 PDFRemittanceAdvice.php:149 -#: SuppPaymentRun.php:263 SupplierBalsAtPeriodEnd.php:131 +#: SupplierBalsAtPeriodEnd.php:131 SuppPaymentRun.php:264 msgid "From Supplier Code" msgstr "Od kódu dodavatele" #: AgedSuppliers.php:292 OutstandingGRNs.php:172 PDFRemittanceAdvice.php:153 -#: SuppPaymentRun.php:267 SupplierBalsAtPeriodEnd.php:135 +#: SupplierBalsAtPeriodEnd.php:135 SuppPaymentRun.php:268 msgid "To Supplier Code" msgstr "Do kódu dodavatele" @@ -1107,8 +1109,8 @@ #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 #: PcExpenses.php:166 PcExpensesTypeTab.php:101 PcTabs.php:166 #: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:135 -#: SalesTypes.php:156 StockCategories.php:198 SupplierTypes.php:151 -#: Suppliers.php:638 Z_DeleteInvoice.php:146 +#: SalesTypes.php:156 StockCategories.php:198 Suppliers.php:638 +#: SupplierTypes.php:151 Z_DeleteInvoice.php:146 msgid "has been deleted" msgstr "byl zrušen" @@ -1154,13 +1156,13 @@ msgstr "ID uživatele" #: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:298 -#: CounterSales.php:2141 CounterSales.php:2144 CustomerTransInquiry.php:31 +#: CounterSales.php:2146 CounterSales.php:2149 CustomerTransInquiry.php:31 #: DailySalesInquiry.php:47 DailySalesInquiry.php:49 FixedAssetRegister.php:56 #: FixedAssetRegister.php:65 InventoryQuantities.php:167 #: InventoryQuantities.php:193 InventoryQuantities.php:195 MRP.php:585 #: MRPReport.php:523 MRPReport.php:525 MRPReschedules.php:144 #: PDFPeriodStockTransListing.php:59 PDFPriceList.php:198 -#: PDFPrintLabel.php:250 POReport.php:1567 PO_Items.php:1023 +#: PDFPrintLabel.php:250 PO_Items.php:1023 POReport.php:1567 #: ReorderLevel.php:181 ReorderLevel.php:183 ReorderLevel.php:213 #: ReorderLevel.php:215 SalesGraph.php:97 SalesGraph.php:99 SalesGraph.php:119 #: SalesGraph.php:121 SalesGraph.php:143 SalesGraph.php:145 SalesGraph.php:179 @@ -1200,9 +1202,9 @@ msgstr "Uživatel" #: AuditTrail.php:165 BankReconciliation.php:210 BankReconciliation.php:285 -#: CustWhereAlloc.php:18 CustWhereAlloc.php:105 CustomerAllocations.php:361 -#: CustomerInquiry.php:194 CustomerTransInquiry.php:20 -#: CustomerTransInquiry.php:98 DailyBankTransactions.php:112 +#: CustomerAllocations.php:361 CustomerInquiry.php:194 +#: CustomerTransInquiry.php:20 CustomerTransInquiry.php:98 +#: CustWhereAlloc.php:18 CustWhereAlloc.php:105 DailyBankTransactions.php:112 #: GLAccountInquiry.php:150 GLAccountReport.php:336 GLJournal.php:262 #: MRPReschedules.php:191 SalesByTypePeriodInquiry.php:334 #: SelectCustomer.php:416 ShipmentCosting.php:532 ShipmentCosting.php:609 @@ -1230,13 +1232,660 @@ msgid "Value" msgstr "Hodnota" +#: BackupDatabase.php:7 +#, fuzzy +msgid "Backup webERP Database" +msgstr "Upgrade webERP databáze" + +#: BackupDatabase.php:20 +#, fuzzy +msgid "Deleted" +msgstr "Smazat" + +#: BackupDatabase.php:23 +#, fuzzy +msgid "Unable to delete" +msgstr "Nelze najít Reklamní kodex" + +#: BackupDatabase.php:28 +#, fuzzy +msgid "All backup files on the server have been deleted" +msgstr "Prodej vysílání záznam byl odstraněn" + +#: BackupDatabase.php:30 +#, fuzzy +msgid "No backup files on the server were deleted" +msgstr "Nahrát soubor na server" + +#: BackupDatabase.php:34 +msgid "Backup" +msgstr "Zálohovat" + +#: BackupDatabase.php:43 +msgid "" +"The backup file has now been created. You must now download this to your " +"computer because in case the web-server has a disk failure the backup would " +"then not on the same machine. Use the link below" +msgstr "" + +#: BackupDatabase.php:43 +msgid "Download the backup file to your locale machine" +msgstr "" + +#: BackupDatabase.php:44 +msgid "" +"Once you have downloaded the database backup file to your local machine you " +"should use the link below to delete it - backup files can consume a lot of " +"space on your hosting account and will accumulate if not deleted - they also " +"contain sensitive information which would otherwise be available for others " +"to download!" +msgstr "" + +#: BackupDatabase.php:47 +#, fuzzy +msgid "Delete the backup file off the server" +msgstr "Nahrát soubor na server" + +#: BackupDatabase.php:49 +msgid "" +"There was some problem producing a backup using mysqldump. Normally this " +"relates to a permissions issue - the web-server user must have permission to " +"write to the companies directory" +msgstr "" + +#: BankAccounts.php:7 +msgid "Bank Accounts Maintenance" +msgstr "Bankovní účty Údržba" + +#: BankAccounts.php:11 TaxAuthorities.php:150 +msgid "Bank" +msgstr "Banka" + +#: BankAccounts.php:12 +#, fuzzy +msgid "" +"Update Bank Account details. Account Code is for SWIFT or BSB type Bank " +"Codes. Set Default for Invoices to \"Currency Default\" of \"Fallback " +"Default\" to print Account details on Invoices (only one account should be " +"set to \"Fall Back Default\")." +msgstr "" +"Aktualizace Bankovní účet podrobnosti. Kód je účet pro SWIFT nebo BSB typ " +"kód banky. Nastavit výchozí pro faktury \\" + +#: BankAccounts.php:44 +msgid "The bank account code already exists in the database" +msgstr "Na bankovní účet, kód již existuje v databázi" + +#: BankAccounts.php:50 +msgid "The bank account name must be fifty characters or less long" +msgstr "Na bankovní účet, název musí být padesát znaků dlouhé" + +#: BankAccounts.php:56 +msgid "The bank account name may not be empty." +msgstr "Na bankovní účet, jméno nesmí být prázdné." + +#: BankAccounts.php:62 +msgid "The bank account number may not be empty." +msgstr "Číslo bankovního účtu nesmí být prázdný." + +#: BankAccounts.php:68 +msgid "The bank account number must be fifty characters or less long" +msgstr "Číslo bankovního účtu musí být padesát znaků dlouhé" + +#: BankAccounts.php:74 +msgid "The bank address must be fifty characters or less long" +msgstr "Adresa banky je padesát znaků dlouhé" + +#: BankAccounts.php:92 +msgid "" +"Note that it is not possible to change the currency of the account once " +"there are transactions against it" +msgstr "Všimněte si, že není možné změnit měnu účtu, jakmile je operace proti" + +#: BankAccounts.php:104 +msgid "The bank account details have been updated" +msgstr "Údaje o bankovním účtu byly aktualizovány" + +#: BankAccounts.php:123 +msgid "The new bank account has been entered" +msgstr "Nový bankovní účet bylo zapsáno" + +#: BankAccounts.php:128 +msgid "The bank account could not be inserted or modified because" +msgstr "Na bankovní účet, nelze vložit či pozměnit, protože" + +#: BankAccounts.php:129 +msgid "The SQL used to insert/modify the bank account details was" +msgstr "SQL používá vložit / upravit údaje o bankovním účtu bylo" + +#: BankAccounts.php:157 +msgid "" +"Cannot delete this bank account because transactions have been created using " +"this account" +msgstr "" +"Nelze smazat tento bankovní účet, protože transakce byly vytvořeny pomocí " +"tohoto účtu" + +#: BankAccounts.php:158 +msgid "transactions with this bank account code" +msgstr "transakce s tímto kódem bankovní účet" + +#: BankAccounts.php:164 +msgid "Bank account deleted" +msgstr "Bankovní účet smazán" + +#: BankAccounts.php:184 +msgid "The bank accounts set up could not be retrieved because" +msgstr "Bankovní účty zřízené se nepodařilo získat, protože" + +#: BankAccounts.php:185 +msgid "The SQL used to retrieve the bank account details was" +msgstr "SQL používá k načtení údaje o bankovním účtu bylo" + +#: BankAccounts.php:191 GLJournal.php:291 +msgid "GL Account Code" +msgstr "GL kódu účtu" + +#: BankAccounts.php:192 BankAccounts.php:326 +msgid "Bank Account Name" +msgstr "Název bankovního účtu" + +#: BankAccounts.php:193 BankAccounts.php:328 +msgid "Bank Account Code" +msgstr "Bankovní účet kódu" + +#: BankAccounts.php:194 BankAccounts.php:330 +msgid "Bank Account Number" +msgstr "Číslo bankovního účtu" + +#: BankAccounts.php:195 BankAccounts.php:332 +msgid "Bank Address" +msgstr "Adresa banky" + +#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:788 +#: CustomerTransInquiry.php:108 OffersReceived.php:109 PcReportTab.php:267 +#: PcTabs.php:206 PcTabs.php:349 PDFPrintLabel.php:97 +#: PO_AuthorisationLevels.php:126 PO_AuthorisationLevels.php:209 +#: PO_AuthorisationLevels.php:214 PO_AuthoriseMyOrders.php:115 +#: PO_Header.php:554 PO_SelectOSPurchOrder.php:481 PO_SelectPurchOrder.php:432 +#: PricesByCost.php:274 Prices.php:222 Prices.php:295 PurchData.php:169 +#: PurchData.php:352 PurchData.php:481 SelectSupplier.php:260 +#: SupplierCredit.php:263 SupplierInvoice.php:235 SupplierTransInquiry.php:109 +#: SuppPriceList.php:284 includes/PDFBankingSummaryPageHeader.inc:42 +#: includes/PDFDebtorBalsPageHeader.inc:33 +#: includes/PDFSupplierBalsPageHeader.inc:36 +msgid "Currency" +msgstr "Měna" + +#: BankAccounts.php:197 BankAccounts.php:355 +msgid "Default for Invoices" +msgstr "Výchozí pro Faktury" + +#: BankAccounts.php:212 BankAccounts.php:369 BankAccounts.php:375 +#: BankAccounts.php:379 BankAccounts.php:383 +msgid "Fall Back Default" +msgstr "" + +#: BankAccounts.php:214 BankAccounts.php:370 BankAccounts.php:374 +#: BankAccounts.php:378 BankAccounts.php:384 +#, fuzzy +msgid "Currency Default" +msgstr "Měny " + +#: BankAccounts.php:224 +#, fuzzy, php-format +msgid "Are you sure you wish to delete this bank account?" +msgstr "Jste si jisti, že chcete smazat tento obor?" + +#: BankAccounts.php:248 +msgid "Show All Bank Accounts Defined" +msgstr "Zobrazit všechny bankovní účty definované" + +#: BankAccounts.php:282 BankAccounts.php:287 +msgid "Bank Account GL Code" +msgstr "Bankovní účet GL kód" + +#: BankAccounts.php:334 +msgid "Currency Of Account" +msgstr "Měna účtu" + +#: BankMatching.php:6 +msgid "Bank Account Matching" +msgstr "Bankovní účet odpovídající" + +#: BankMatching.php:15 PDFCustTransListing.php:41 Z_CheckDebtorsControl.php:81 +msgid "Receipts" +msgstr "Příjmy" + +#: BankMatching.php:17 BankMatching.php:25 +msgid "Bank Matching" +msgstr "Banka odpovídající" + +#: BankMatching.php:17 +msgid "Bank Account Matching - Receipts" +msgstr "Bankovní účet odpovídající - Příjmy" + +#: BankMatching.php:24 PaymentAllocations.php:31 PaymentMethods.php:11 +#: PDFSuppTransListing.php:40 +msgid "Payments" +msgstr "Platby" + +#: BankMatching.php:25 +msgid "Bank Account Matching - Payments" +msgstr "Bankovní účet odpovídající - Platby" + +#: BankMatching.php:29 +msgid "This page must be called with a bank transaction type" +msgstr "Tato stránka musí být volána s typem bankovním převodem" + +#: BankMatching.php:29 +msgid "It should not be called directly" +msgstr "To by nemělo být jen přímo" + +#: BankMatching.php:49 +msgid "Could not retrieve transaction information" +msgstr "Nemohu získat informace o transakci" + +#: BankMatching.php:56 +msgid "Could not match off this payment because" +msgstr "Nemohl zápas z této platby, protože" + +#: BankMatching.php:67 +msgid "Could not update the amount matched off this bank transaction because" +msgstr "" +"Nepodařilo se aktualizovat částku uzavřeno z této banky, protože transakce" + +#: BankMatching.php:75 +msgid "Could not unclear this bank transaction because" +msgstr "Nemohu nejasné tento bankovní transakci, protože" + +#: BankMatching.php:83 +msgid "" +"Use this screen to match webERP Receipts and Payments to your Bank " +"Statement. Check your bank statement and click the check-box when you find " +"the matching transaction." +msgstr "" +"Tato obrazovka slouží k zápasu webERP inkasa a platby do svého výpisu z " +"účtu. Zkontrolujte, zda vaše bankovní výpis a klikněte na check-box, když " +"zjistíte, odpovídající transakce." + +#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:754 +#: DailyBankTransactions.php:32 Payments.php:753 PDFChequeListing.php:44 +#: TaxAuthorities.php:151 TaxAuthorities.php:316 +msgid "Bank Account" +msgstr "Bankovní účet" + +#: BankMatching.php:117 +msgid "Show" +msgstr "Zobrazit" + +#: BankMatching.php:117 CounterSales.php:222 CreditItemsControlled.php:78 +#: FreightCosts.php:267 GoodsReceivedControlled.php:68 GoodsReceived.php:73 +#: StockLocTransferReceive.php:423 SupplierAllocations.php:434 +#: SuppShiptChgs.php:136 +msgid "from" +msgstr "od" + +#: BankMatching.php:120 ConfirmDispatchControlled_Invoice.php:60 +#: EmailCustTrans.php:63 FixedAssetRegister.php:78 FTP_RadioBeacon.php:280 +#: GLAccountCSV.php:171 GLAccountReport.php:103 Payments.php:733 +#: PcReportTab.php:102 PDFChequeListing.php:114 PDFChequeListing.php:124 +#: PDFChequeListing.php:199 PDFDeliveryDifferences.php:187 +#: PDFDeliveryDifferences.php:200 PDFDeliveryDifferences.php:296 +#: PDFDIFOT.php:190 PDFDIFOT.php:203 PDFDIFOT.php:307 PDFOrdersInvoiced.php:77 +#: PDFOrdersInvoiced.php:274 PDFOrderStatus.php:82 PDFOrderStatus.php:256 +#: PDFRemittanceAdvice.php:48 PO_PDFPurchOrder.php:332 +#: PricesBasedOnMarkUp.php:213 PricesBasedOnMarkUp.php:352 +#: PrintCustStatements.php:43 PrintCustTrans.php:60 PrintCustTrans.php:63 +#: PrintCustTransPortrait.php:58 PrintCustTransPortrait.php:61 +#: SalesGraph.php:211 SalesGraph.php:240 SalesGraph.php:244 +#: StockLocTransferReceive.php:306 StockLocTransferReceive.php:423 +#: Stocks.php:266 Stocks.php:271 StockStatus.php:306 StockStatus.php:347 +#: StockTransfers.php:436 includes/PDFAgedDebtorsPageHeader.inc:18 +#: includes/PDFAgedSuppliersPageHeader.inc:17 +#: includes/PDFChequeListingPageHeader.inc:17 +#: includes/PDFDeliveryDifferencesPageHeader.inc:19 +#: includes/PDFDeliveryDifferencesPageHeader.inc:21 +#: includes/PDFDIFOTPageHeader.inc:19 includes/PDFDIFOTPageHeader.inc:21 +#: includes/PDFOrdersInvoicedPageHeader.inc:19 +#: includes/PDFOrdersInvoicedPageHeader.inc:21 +#: includes/PDFOrderStatusPageHeader.inc:19 +#: includes/PDFOrderStatusPageHeader.inc:21 +#: includes/PDFPeriodStockTransListingPageHeader.inc:20 +#: includes/PDFStockLocTransferHeader.inc:31 +msgid "to" +msgstr "na" + +#: BankMatching.php:123 +msgid "Choose outstanding" +msgstr "Zvolte vynikající" + +#: BankMatching.php:123 +msgid "only or all" +msgstr "jen nebo všechny" + +#: BankMatching.php:123 BankMatching.php:127 BankMatching.php:130 +#: BankMatching.php:141 BankMatching.php:144 +msgid "in the date range" +msgstr "v rozmezí dat" + +#: BankMatching.php:127 BankMatching.php:130 BankMatching.php:141 +#: BankMatching.php:144 +msgid "Show all" +msgstr "Zobrazit všechny" + +#: BankMatching.php:128 BankMatching.php:131 +msgid "Show unmatched" +msgstr "Zobrazit bezkonkurenční" + +#: BankMatching.php:128 BankMatching.php:131 PrintCheque.php:46 +#: ReverseGRN.php:104 includes/PDFCustomerListPageHeader.inc:46 +#: includes/PDFDeliveryDifferencesPageHeader.inc:24 +#: includes/PDFDIFOTPageHeader.inc:24 +#: includes/PDFOrdersInvoicedPageHeader.inc:24 +#: includes/PDFOrderStatusPageHeader.inc:24 +msgid "only" +msgstr "jen" + +#: BankMatching.php:137 +msgid "Choose to display only the first 20 matching" +msgstr "Vyberte, zda chcete zobrazit pouze prvních 20 odpovídající" + +#: BankMatching.php:138 +msgid "or all" +msgstr "nebo všechny" + +#: BankMatching.php:138 +msgid "meeting the criteria" +msgstr "splňující kritéria" + +#: BankMatching.php:142 BankMatching.php:145 +msgid "Show only the first 20" +msgstr "Zobrazit jen prvních 20" + +#: BankMatching.php:154 +msgid "Show selected" +msgstr "Zobrazit vybrané" + +#: BankMatching.php:156 +msgid "Show reconciliation" +msgstr "Zobrazit usmíření" + +#: BankMatching.php:164 BankMatching.php:170 +msgid "The date entered for the field to show" +msgstr "Datum vstoupil na pole show" + +#: BankMatching.php:164 +msgid "before" +msgstr "před" + +#: BankMatching.php:165 BankMatching.php:171 +msgid "is not entered in a recognised date format" +msgstr "není zapsán v uznávané formátu data" + +#: BankMatching.php:165 BankMatching.php:171 +msgid "Entry is expected in the format" +msgstr "Vstup se očekává ve formátu" + +#: BankMatching.php:170 +msgid "after" +msgstr "po" + +#: BankMatching.php:257 +msgid "The payments with the selected criteria could not be retrieved because" +msgstr "Platby podle zadaných kriterií se nepodařilo získat, protože" + +#: BankMatching.php:261 ShipmentCosting.php:533 ShipmentCosting.php:610 +#: SupplierAllocations.php:456 +msgid "Ref" +msgstr "Ref" + +#: BankMatching.php:264 ConfirmDispatch_Invoice.php:276 Credit_Invoice.php:279 +#: CustomerAllocations.php:364 CustomerReceipt.php:897 +#: CustomerTransInquiry.php:107 CustWhereAlloc.php:109 +#: PaymentAllocations.php:67 Payments.php:1026 Payments.php:1030 +#: Payments.php:1046 PcAssignCashToTab.php:222 PcAssignCashToTab.php:345 +#: PcAuthorizeExpenses.php:90 PcClaimExpensesFromTab.php:212 +#: PcClaimExpensesFromTab.php:365 PcReportTab.php:172 PcReportTab.php:326 +#: PrintCheque.php:77 PrintCheque.php:91 SelectCreditItems.php:681 +#: SuppContractChgs.php:79 SuppContractChgs.php:163 SuppFixedAssetChgs.php:76 +#: SuppFixedAssetChgs.php:149 SupplierAllocations.php:457 +#: SupplierCredit.php:352 SupplierCredit.php:385 SupplierCredit.php:421 +#: SupplierCredit.php:460 SupplierInvoice.php:330 SupplierInvoice.php:371 +#: SupplierInvoice.php:411 SupplierInvoice.php:455 +#: SupplierTransInquiry.php:108 SuppShiptChgs.php:81 SuppShiptChgs.php:146 +#: SuppTransGLAnalysis.php:106 SuppTransGLAnalysis.php:191 +#: Z_CheckAllocs.php:66 includes/PDFBankingSummaryPageHeader.inc:55 +#: includes/PDFChequeListingPageHeader.inc:37 +msgid "Amount" +msgstr "Částka" + +#: BankMatching.php:265 BankReconciliation.php:214 BankReconciliation.php:289 +#: PDFOrdersInvoiced.php:351 PDFOrderStatus.php:322 +#: PO_SelectOSPurchOrder.php:233 PO_SelectPurchOrder.php:214 +#: Shipt_Select.php:192 SuppCreditGRNs.php:267 +#: includes/PDFStatementPageHeader.inc:173 +#: includes/PDFStatementPageHeader.inc:180 +msgid "Outstanding" +msgstr "Vynikající" + +#: BankMatching.php:266 +msgid "Clear" +msgstr "Jasný" + +#: BankMatching.php:266 BankMatching.php:295 +msgid "Unclear" +msgstr "Nejasný" + +#: BankMatching.php:342 +msgid "Update Matching" +msgstr "Odpovídající aktualizace" + +#: BankReconciliation.php:7 +msgid "Bank Reconciliation" +msgstr "Banka usmíření" + +#: BankReconciliation.php:27 +msgid "" +"The entry in the bank statement balance is not numeric. The balance on the " +"bank statement should be entered. The exchange difference has not been " +"calculated and no general ledger journal has been created" +msgstr "" +"Záznam v bilanci banky tvrzení není číselná. Zůstatek na bankovním výpisu by " +"měly být zaneseny. Kurzových rozdílů nebyla vypočtena žádná obecná a knihy " +"časopis byl vytvořen" + +#: BankReconciliation.php:39 +msgid "Could not retrieve the exchange rate for the selected bank account" +msgstr "Nepodařilo se načíst směnný kurz pro vybrané bankovní účet" + +#: BankReconciliation.php:68 BankReconciliation.php:86 +msgid "reconciliation on" +msgstr "usmíření, na" + +#: BankReconciliation.php:71 +msgid "Cannot insert a GL entry for the exchange difference because" +msgstr "Nelze vložit záznam GL pro výměnu rozdíl, protože" + +#: BankReconciliation.php:72 +msgid "The SQL that failed to insert the exchange difference GL entry was" +msgstr "SQL, které se nepodařilo vložit kurzový rozdíl GL vstup" + +#: BankReconciliation.php:92 +msgid "Exchange difference of" +msgstr "Kurzových rozdílů z" + +#: BankReconciliation.php:92 +msgid "has been posted" +msgstr "byl vyslán" + +#: BankReconciliation.php:100 SuppPaymentRun.php:316 +msgid "The bank accounts could not be retrieved by the SQL because" +msgstr "Bankovní účty se nepodařilo získat na SQL, protože" + +#: BankReconciliation.php:101 CustomerReceipt.php:742 +#: DailyBankTransactions.php:28 Payments.php:749 SuppPaymentRun.php:318 +msgid "The SQL used to retrieve the bank accounts was" +msgstr "SQL slouží k získání bankovní ú... [truncated message content] |
From: <dai...@us...> - 2011-11-12 09:42:42
|
Revision: 4744 http://web-erp.svn.sourceforge.net/web-erp/?rev=4744&view=rev Author: daintree Date: 2011-11-12 09:42:34 +0000 (Sat, 12 Nov 2011) Log Message: ----------- bug fixes and tidy Modified Paths: -------------- trunk/CounterSales.php trunk/Credit_Invoice.php trunk/CustomerReceipt.php trunk/GoodsReceived.php trunk/PDFCustTransListing.php trunk/Payments.php trunk/PrintCheque.php trunk/SelectCreditItems.php trunk/SuppPaymentRun.php trunk/doc/Change.log trunk/includes/DefinePOClass.php trunk/includes/DefinePaymentClass.php trunk/includes/MiscFunctions.php trunk/includes/PDFPaymentRun_PymtFooter.php Removed Paths: ------------- trunk/Numbers/ Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/CounterSales.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -1432,37 +1432,36 @@ $OrderLine->StandardCost=0; } if ($MBFlag=='B' OR $MBFlag=='M'){ - $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - price, - prd, - reference, - qty, - discountpercent, - standardcost, - newqoh, - narrative ) - VALUES ('" . $OrderLine->StockID . "', - 10, - '" . $InvoiceNo . "', - '" . $_SESSION['Items'.$identifier]->Location . "', - '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . $_SESSION['Items'.$identifier]->Branch . "', - '" . $LocalCurrencyPrice . "', - '" . $PeriodNo . "', - '" . $OrderNo . "', - '" . -$OrderLine->Quantity . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', - '" . ($QtyOnHandPrior - $OrderLine->Quantity) . "', - '" . DB_escape_string($OrderLine->Narrative) . "' )"; + $SQL = "INSERT INTO stockmoves (stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost, + newqoh, + narrative ) + VALUES ('" . $OrderLine->StockID . "', + 10, + '" . $InvoiceNo . "', + '" . $_SESSION['Items'.$identifier]->Location . "', + '" . $DefaultDispatchDate . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', + '" . $LocalCurrencyPrice . "', + '" . $PeriodNo . "', + '" . $OrderNo . "', + '" . -$OrderLine->Quantity . "', + '" . $OrderLine->DiscountPercent . "', + '" . $OrderLine->StandardCost . "', + '" . ($QtyOnHandPrior - $OrderLine->Quantity) . "', + '" . DB_escape_string($OrderLine->Narrative) . "' )"; } else { // its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil if (empty($OrderLine->StandardCost)) { @@ -1688,13 +1687,13 @@ /*now the stock entry*/ $StockGLCode = GetStockGLCode($OrderLine->StockID,$db); - $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount ) + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES ( 10, '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', @@ -1713,14 +1712,13 @@ //Post sales transaction to GL credit sales $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db); - $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount - ) + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES ( 10, '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', @@ -1735,14 +1733,13 @@ if ($OrderLine->DiscountPercent !=0){ - $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount - ) + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES ( 10, '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', @@ -1805,6 +1802,9 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } + + EnsureGLEntriesBalance(10,$InvoiceNo,$db); + /*Also if GL is linked to debtors need to process the debit to bank and credit to debtors for the payment */ /*Need to figure out the cross rate between customer currency and bank account currency */ @@ -1847,6 +1847,9 @@ $ErrMsg = _('Cannot insert a GL transaction for the debtors account credit'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); }//amount paid we not zero + + EnsureGLEntriesBalance(12,$ReceiptNumber,$db); + } /*end of if Sales and GL integrated */ if ($_POST['AmountPaid']!=0){ if (!isset($ReceiptNumber)){ Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/Credit_Invoice.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -20,11 +20,11 @@ exit; } elseif (isset($_GET['InvoiceNumber'])) { - $_GET['InvoiceNumber']=(int)$_GET['InvoiceNumber']; + $_GET['InvoiceNumber']=intval($_GET['InvoiceNumber']); unset($_SESSION['CreditItems']->LineItems); unset($_SESSION['CreditItems']); - $_SESSION['ProcessingCredit'] = $_GET['InvoiceNumber']; + $_SESSION['ProcessingCredit'] = intval($_GET['InvoiceNumber']); $_SESSION['CreditItems'] = new cart; /*read in all the guff from the selected invoice into the Items cart */ @@ -61,7 +61,7 @@ AND stockmoves.type=debtortrans.type INNER JOIN locations ON stockmoves.loccode = locations.loccode - WHERE debtortrans.transno = '" . $_GET['InvoiceNumber'] . "' + WHERE debtortrans.transno = '" . intval($_GET['InvoiceNumber']) . "' AND stockmoves.type=10"; $ErrMsg = _('A credit cannot be produced for the selected invoice') . '. ' . _('The invoice details cannot be retrieved because'); @@ -1414,6 +1414,9 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } + + EnsureGLEntriesBalance(11,$CreditNo,$db); + } /*end of if Sales and GL integrated */ $Result = DB_Txn_Commit($db); Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/CustomerReceipt.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -534,6 +534,7 @@ $ErrMsg = _('Cannot insert a GL transaction for the payment discount debit'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } //end if there is some discount + EnsureGLEntriesBalance(12,$_SESSION['ReceiptBatch']->BatchNo,$db); } //end if there is GL work to be done - ie config is to link to GL Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/GoodsReceived.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -38,7 +38,7 @@ AND !isset($_POST['Update'])) { /*Update only occurs if the user hits the button to refresh the data and recalc the value of goods recd*/ - $_GET['ModifyOrderNumber'] = (int)$_GET['PONumber']; + $_GET['ModifyOrderNumber'] = intval($_GET['PONumber']); include('includes/PO_ReadInOrder.inc'); } elseif (isset($_POST['Update']) OR isset($_POST['ProcessGoodsReceived'])) { @@ -47,7 +47,7 @@ set from the post to the quantity to be received */ foreach ($_SESSION['PO'.$identifier]->LineItems as $Line) { - $RecvQty = filter_number_format($_POST['RecvQty_' . $Line->LineNo]); + $RecvQty = round(filter_number_format($_POST['RecvQty_' . $Line->LineNo]),$Line->DecimalPlaces); if (!is_numeric($RecvQty)){ $RecvQty = 0; } @@ -612,7 +612,7 @@ '" . $_POST['DefaultReceivedDate'] . "', '" . $PeriodNo . "', '" . Date('Y-m-d') . "', - 'cost', + '" . _('cost') . "', '" . $CurrentStandardCost * $OrderLine->ReceiveQty . "')"; $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE The fixed asset transaction could not be inserted because'); $DbgMsg = _('The following SQL to insert the fixed asset transaction record was used'); @@ -662,7 +662,7 @@ '" . $OrderLine->GLCode . "', 'PO: " . $_SESSION['PO'.$identifier]->OrderNo . " " . $_SESSION['PO'.$identifier]->SupplierID . " - " . $OrderLine->StockID . " - " . $OrderLine->ItemDescription . " x " . $OrderLine->ReceiveQty . " @ " . - locale_number_format($CurrentStandardCost,2) . "', + locale_number_format($CurrentStandardCost,$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $CurrentStandardCost * $OrderLine->ReceiveQty . "' )"; @@ -685,7 +685,7 @@ '" . $_POST['DefaultReceivedDate'] . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['grnact'] . "', - '" . _('PO'.$identifier) . ': ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . $_SESSION['PO'.$identifier]->SupplierID . ' - ' . $OrderLine->StockID . ' - ' . $OrderLine->ItemDescription . ' x ' . $OrderLine->ReceiveQty . ' @ ' . locale_number_format($UnitCost,2) . "', + '" . _('PO'.$identifier) . ': ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . $_SESSION['PO'.$identifier]->SupplierID . ' - ' . $OrderLine->StockID . ' - ' . $OrderLine->ItemDescription . ' x ' . $OrderLine->ReceiveQty . ' @ ' . locale_number_format($UnitCost,$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . -$UnitCost * $OrderLine->ReceiveQty . "' )"; @@ -705,8 +705,11 @@ WHERE orderno='" . $_SESSION['PO'.$identifier]->OrderNo . "'"; $result=DB_query($sql,$db); } + + if ($_SESSION['PO'.$identifier]->GLLink==1) { + EnsureGLEntriesBalance(25, $GRN,$db); + } - $Result = DB_Txn_Commit($db); $PONo = $_SESSION['PO'.$identifier]->OrderNo; unset($_SESSION['PO'.$identifier]->LineItems); @@ -714,7 +717,7 @@ unset($_POST['ProcessGoodsReceived']); echo '<br /> - <div class=centre> + <div class="centre"> '. prnMsg(_('GRN number'). ' '. $GRN .' '. _('has been processed'),'success') . ' <br /> <br /> Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/PDFCustTransListing.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -130,7 +130,7 @@ $YPos-=$line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,locale_number_format($TotalAmount,$_SESSION['CompanyRecord']['decimalplaces']), 'right'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions') . ' ' . $_SESSION['CompanyRecord']['CurrencyDefault'], 'left'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions') . ' ' . $_SESSION['CompanyRecord']['currencydefault'], 'left'); $ReportFileName = $_SESSION['DatabaseName'] . '_CustTransListing_' . date('Y-m-d').'.pdf'; $pdf->OutputD($ReportFileName); Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/Payments.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -30,10 +30,12 @@ if ((isset($_POST['UpdateHeader']) AND $_POST['BankAccount']=='') OR (isset($_POST['Process']) AND $_POST['BankAccount']=='')) { + prnMsg(_('A bank account must be selected to make this payment from'), 'warn'); - $BankAccountEmpty=TRUE; + $BankAccountEmpty=true; } else { - $BankAccountEmpty=FALSE; + + $BankAccountEmpty=false; } echo '<p class="page_title_text"> @@ -72,7 +74,7 @@ exit; } else { $myrow = DB_fetch_array($Result); - if ($myrow['factorcompanyid'] == 1) { + if ($myrow['factorcompanyid'] == 0) { $_SESSION['PaymentDetail']->SuppName = $myrow['suppname']; $_SESSION['PaymentDetail']->Address1 = $myrow['address1']; $_SESSION['PaymentDetail']->Address2 = $myrow['address2']; @@ -82,6 +84,7 @@ $_SESSION['PaymentDetail']->Address6 = $myrow['address6']; $_SESSION['PaymentDetail']->SupplierID = $_GET['SupplierID']; $_SESSION['PaymentDetail']->Currency = $myrow['currcode']; + $_POST['Currency'] = $_SESSION['PaymentDetail']->Currency; } else { $factorsql= "SELECT coyname, @@ -111,6 +114,7 @@ } if (isset($_POST['BankAccount']) AND $_POST['BankAccount']!=''){ + $_SESSION['PaymentDetail']->Account=$_POST['BankAccount']; /*Get the bank account currency and set that too */ $ErrMsg = _('Could not get the currency of the bank account'); @@ -134,10 +138,10 @@ $_SESSION['PaymentDetail']->DatePaid=$_POST['DatePaid']; } if (isset($_POST['ExRate']) AND $_POST['ExRate']!=''){ - $_SESSION['PaymentDetail']->ExRate=$_POST['ExRate']; //ex rate between payment currency and account currency + $_SESSION['PaymentDetail']->ExRate=filter_number_format($_POST['ExRate']); //ex rate between payment currency and account currency } if (isset($_POST['FunctionalExRate']) AND $_POST['FunctionalExRate']!=''){ - $_SESSION['PaymentDetail']->FunctionalExRate=$_POST['FunctionalExRate']; //ex rate between payment currency and account currency + $_SESSION['PaymentDetail']->FunctionalExRate=filter_number_format($_POST['FunctionalExRate']); //ex rate between payment currency and account currency } if (isset($_POST['Paymenttype']) AND $_POST['Paymenttype']!=''){ $_SESSION['PaymentDetail']->Paymenttype = $_POST['Paymenttype']; @@ -158,8 +162,8 @@ if ($_SESSION['PaymentDetail']->AccountCurrency==$_SESSION['CompanyRecord']['currencydefault']){ $_POST['FunctionalExRate']=1; $_SESSION['PaymentDetail']->FunctionalExRate=filter_number_format($_POST['FunctionalExRate']); + $SuggestedExRate = $tableExRate; $SuggestedFunctionalExRate =1; - $SuggestedExRate = $tableExRate; } else { /*To illustrate the rates required @@ -190,8 +194,8 @@ if (isset($_POST['Narrative']) AND $_POST['Narrative']!=''){ $_SESSION['PaymentDetail']->Narrative=$_POST['Narrative']; } -if (isset($_POST['Amount']) AND $_POST['Amount']!=""){ - $_SESSION['PaymentDetail']->Amount=$_POST['Amount']; +if (isset($_POST['Amount']) AND $_POST['Amount']!=''){ + $_SESSION['PaymentDetail']->Amount=filter_number_format($_POST['Amount']); } else { if (!isset($_SESSION['PaymentDetail']->Amount)) { $_SESSION['PaymentDetail']->Amount=0; @@ -275,11 +279,16 @@ echo '<form method=post action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo _('Has the cheque been printed') . '?<br /><br />'; - echo '<input type="hidden" name="CommitBatch" value="' . $_POST['CommitBatch'] . '" />'; - echo '<input type="hidden" name="BankAccount" value="' . $_POST['BankAccount'] . '" />'; - echo '<input type="submit" name="ChequePrinted" value="' . _('Yes / Continue') . '" /> '; - echo '<input type="submit" name="PaymentCancelled" value="' . _('No / Cancel Payment') . '" />'; + echo _('Has the cheque been printed') . '? + <br /> + <br /> + <input type="hidden" name="CommitBatch" value="' . $_POST['CommitBatch'] . '" /> + <input type="hidden" name="BankAccount" value="' . $_POST['BankAccount'] . '" /> + <input type="submit" name="ChequePrinted" value="' . _('Yes / Continue') . '" /> + <input type="submit" name="PaymentCancelled" value="' . _('No / Cancel Payment') . '" />'; + + echo '<br />Payment amount = ' . $_SESSION['PaymentDetail']->Amount; + } else { //Start a transaction to do the whole lot inside @@ -292,7 +301,7 @@ //its a nominal bank transaction type 1 $TransNo = GetNextTransNo( 1, $db); - $Transtype = 1; + $TransType = 1; if ($_SESSION['CompanyRecord']['gllink_creditors']==1){ /* then enter GLTrans */ $TotalAmount=0; @@ -301,7 +310,7 @@ /*The functional currency amount will be the payment currenct amount / the bank account currency exchange rate - to get to the bank account currency then / the functional currency exchange rate to get to the functional currency */ - if ($PaymentItem->cheque=='') $PaymentItem->cheque=0; + if ($PaymentItem->Cheque=='') $PaymentItem->Cheque=0; $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -318,8 +327,8 @@ '" . $PaymentItem->GLCode . "', '" . $PaymentItem->Narrative . "', '" . ($PaymentItem->Amount/$_SESSION['PaymentDetail']->ExRate/$_SESSION['PaymentDetail']->FunctionalExRate) . "', - '". $PaymentItem->cheque ."', - '" . $PaymentItem->tag . "' + '". $PaymentItem->Cheque ."', + '" . $PaymentItem->Tag . "' )"; $ErrMsg = _('Cannot insert a GL entry for the payment using the SQL'); $result = DB_query($SQL,$db,$ErrMsg,_('The SQL that failed was'),true); @@ -413,7 +422,7 @@ $CreditorTotal = (($_SESSION['PaymentDetail']->Discount + $_SESSION['PaymentDetail']->Amount)/$_SESSION['PaymentDetail']->ExRate)/$_SESSION['PaymentDetail']->FunctionalExRate; $TransNo = GetNextTransNo(22, $db); - $Transtype = 22; + $TransType = 22; /* Create a SuppTrans entry for the supplier payment */ $SQL = "INSERT INTO supptrans (transno, @@ -483,8 +492,8 @@ periodno, account, narrative, - amount) "; - $SQL=$SQL . "VALUES (22, + amount) + VALUES (22, '" . $TransNo . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', '" . $PeriodNo . "', @@ -496,6 +505,7 @@ $DbgMsg = _('Cannot insert a GL transaction for the payment discount credit using the SQL'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } // end if discount + } // end if gl creditors } // end if supplier @@ -510,7 +520,7 @@ account, narrative, amount) - VALUES ('" . $Transtype . "', + VALUES ('" . $TransType . "', '" . $TransNo . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', '" . $PeriodNo . "', @@ -522,11 +532,12 @@ $DbgMsg = _('Cannot insert a GL transaction for the bank account credit using the SQL'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + EnsureGLEntriesBalance($TransType,$TransNo,$db); } } /*now enter the BankTrans entry */ - if ($Transtype==22) { + if ($TransType==22) { $SQL="INSERT INTO banktrans (transno, type, bankact, @@ -538,7 +549,7 @@ amount, currcode) VALUES ('" . $TransNo . "', - '" . $Transtype . "', + '" . $TransType . "', '" . $_SESSION['PaymentDetail']->Account . "', '" . $_SESSION['PaymentDetail']->Narrative . "', '" . $_SESSION['PaymentDetail']->ExRate . "', @@ -565,7 +576,7 @@ amount, currcode) VALUES ('" . $TransNo . "', - '" . $Transtype . "', + '" . $TransType . "', '" . $_SESSION['PaymentDetail']->Account . "', '" . $_SESSION['PaymentDetail']->Narrative . "', '" . $_SESSION['PaymentDetail']->ExRate . "', @@ -616,9 +627,10 @@ } elseif (isset($_GET['Delete'])){ /* User hit delete the receipt entry from the batch */ $_SESSION['PaymentDetail']->Remove_GLItem($_GET['Delete']); + } elseif (isset($_POST['Process']) AND !$BankAccountEmpty){ //user hit submit a new GL Analysis line into the payment - $ChequeNoSQL="SELECT account FROM gltrans WHERE chequeno='" . $_POST['cheque'] ."'"; + $ChequeNoSQL="SELECT account FROM gltrans WHERE chequeno='" . $_POST['Cheque'] ."'"; $ChequeNoResult=DB_query($ChequeNoSQL, $db); if (is_numeric($_POST['GLManualCode'])){ @@ -632,7 +644,7 @@ if (DB_num_rows($Result)==0){ prnMsg( _('The manual GL code entered does not exist in the database') . ' - ' . _('so this GL analysis item could not be added'),'warn'); unset($_POST['GLManualCode']); - } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['cheque']!=''){ + } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['Cheque']!=''){ prnMsg( _('The Cheque/Voucher number has already been used') . ' - ' . _('This GL analysis item could not be added'),'error'); } else { $myrow = DB_fetch_array($Result); @@ -640,11 +652,11 @@ $_POST['GLNarrative'], $_POST['GLManualCode'], $myrow['accountname'], - $_POST['tag'], - $_POST['cheque']); + $_POST['Tag'], + $_POST['Cheque']); unset($_POST['GLManualCode']); } - } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['cheque']!=''){ + } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['Cheque']!=''){ prnMsg( _('The cheque number has already been used') . ' - ' . _('This GL analysis item could not be added'),'error'); } else if ($_POST['GLCode'] == '') { prnMsg( _('No General Ledger code has been chosen') . ' - ' . _('so this GL analysis item could not be added'),'warn'); @@ -656,8 +668,8 @@ $_POST['GLNarrative'], $_POST['GLCode'], $myrow['accountname'], - $_POST['tag'], - $_POST['cheque']); + $_POST['Tag'], + $_POST['Cheque']); } /*Make sure the same receipt is not double processed by a page refresh */ @@ -821,7 +833,7 @@ $SuggestedExRateText =''; } if ($_POST['ExRate']==1 AND isset($SuggestedExRate)){ - $_POST['ExRate'] = $SuggestedExRate; + $_POST['ExRate'] = locale_number_format($SuggestedExRate,6); } echo '<tr> <td>' . _('Payment Exchange Rate') . ':</td> @@ -896,10 +908,10 @@ echo '<br /><table class="selection">'; echo '<tr><th colspan="2"><font size="3" color="blue">' . _('General Ledger Payment Analysis Entry') . '</font></th></tr>'; - //Select the tag + //Select the Tag echo '<tr> <td>' . _('Select Tag') . ':</td> - <td><select name="tag">'; + <td><select name="Tag">'; $SQL = "SELECT tagref, tagdescription @@ -909,7 +921,7 @@ $result=DB_query($SQL,$db); echo '<option value=0></option>'; while ($myrow=DB_fetch_array($result)){ - if (isset($_POST['tag']) AND $_POST['tag']==$myrow['tagref']){ + if (isset($_POST['Tag']) AND $_POST['Tag']==$myrow['tagref']){ echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; @@ -917,7 +929,7 @@ } echo '</select></td> </tr>'; -// End select tag +// End select Tag /*now set up a GLCode field to select from avaialble GL accounts */ if (isset($_POST['GLManualCode'])) { @@ -994,7 +1006,7 @@ echo '<tr> <td>'. _('Cheque/Voucher Number') .'</td> - <td><input type="text" name="cheque" maxlength="12" size="12" /></td> + <td><input type="text" name="Cheque" maxlength="12" size="12" /></td> </tr>'; if (isset($_POST['GLNarrative'])) { @@ -1039,21 +1051,21 @@ $PaymentTotal = 0; foreach ($_SESSION['PaymentDetail']->GLItems as $PaymentItem) { - $tagsql="SELECT tagdescription from tags where tagref='" . $PaymentItem->tag . "'"; - $TagResult=DB_query($tagsql, $db); + $Tagsql="SELECT tagdescription from tags where tagref='" . $PaymentItem->Tag . "'"; + $TagResult=DB_query($Tagsql, $db); $TagMyrow=DB_fetch_row($TagResult); - if ($PaymentItem->tag==0) { + if ($PaymentItem->Tag==0) { $TagName='None'; } else { $TagName=$TagMyrow[0]; } echo '<tr> - <td align=left>' . $PaymentItem->cheque . '</td> + <td>' . $PaymentItem->Cheque . '</td> <td class="number">' . locale_number_format($PaymentItem->Amount,$_SESSION['PaymentDetail']->CurrDecimalPlaces) . '</td> <td>' . $PaymentItem->GLCode . ' - ' . $PaymentItem->GLActName . '</td> <td>' . stripslashes($PaymentItem->Narrative) . '</td> - <td>' . $PaymentItem->tag . ' - ' . $TagName . '</td> + <td>' . $PaymentItem->Tag . ' - ' . $TagName . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $PaymentItem->ID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment analysis item?') . '\');">' . _('Delete') . '</a></td> </tr>'; $PaymentTotal += $PaymentItem->Amount; @@ -1077,7 +1089,7 @@ echo '<table class="selection"> <tr> <td>' . _('Amount of Payment') . ' ' . $_SESSION['PaymentDetail']->Currency . ':</td> - <td><input class="number" type="text" name="Amount" maxlength=12 size=13 value=' . $_SESSION['PaymentDetail']->Amount . '></td> + <td><input class="number" type="text" name="Amount" maxlength="12" size="13" value=' . $_SESSION['PaymentDetail']->Amount . '></td> </tr>'; if (isset($_SESSION['PaymentDetail']->SupplierID)){ /*So it is a supplier payment so show the discount entry item */ @@ -1087,7 +1099,7 @@ </tr>'; echo '<input type="hidden" name="SuppName" value="' . $_SESSION['PaymentDetail']->SuppName . '" />'; } else { - echo '<input type="hidden" name="discount" Value="0" />'; + echo '<input type="hidden" name="Discount" Value="0" />'; } echo '</table><br />'; echo '<input type=submit name="CommitBatch" value="' . _('Accept and Process Payment') . '" />'; Modified: trunk/PrintCheque.php =================================================================== --- trunk/PrintCheque.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/PrintCheque.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -2,10 +2,12 @@ /* $Id$*/ +/*Hard coded for currencies with 2 decimal places */ + include('includes/DefinePaymentClass.php'); include('includes/session.inc'); -include('Numbers/Words.php'); + include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Print Cheque')); $pdf->addInfo('Subject', _('Print Cheque')); @@ -14,7 +16,8 @@ $line_height=12; $result = db_query("SELECT hundredsname, - decimalplaces + decimalplaces, + currency FROM currencies WHERE currabrev='" . $_SESSION['PaymentDetail']->Currency . "'",$db); @@ -25,15 +28,23 @@ exit; } -$CurrencyRow = db_fetch_row($result); -$HundredsName = $CurrencyRow[0]; -$CurrDecimalPlaces = $CurrencyRow[1]; +$CurrencyRow = db_fetch_array($result); +$HundredsName = $CurrencyRow['hundredsname']; +$CurrDecimalPlaces = $CurrencyRow['decimalplaces']; +$CurrencyName = mb_strtolower($CurrencyRow['currency']); // cheque $YPos= $Page_Height-5*$line_height; $LeftOvers = $pdf->addTextWrap($Page_Width-75,$YPos,100,$FontSize,$_GET['ChequeNum'], 'left'); $YPos -= 3*$line_height; +$AmountWords = number_to_words($_SESSION['PaymentDetail']->Amount) . ' ' . $CurrencyName; +$Cents = intval(round(($_SESSION['PaymentDetail']->Amount - intval($_SESSION['PaymentDetail']->Amount))*100,0)); +if ($Cents > 0){ + $AmountWords .= ' ' . _('and') . ' ' . strval($Cents) . ' ' . $HundredsName; +} else { + $AmountWords .= ' ' . _('only'); +} $LeftOvers = $pdf->addTextWrap(75,$YPos,475,$FontSize,$AmountWords, 'left'); $YPos -= 1*$line_height; @@ -50,8 +61,6 @@ $Address3 = $_SESSION['PaymentDetail']->Address3 . ' ' . $_SESSION['PaymentDetail']->Address4 . ' ' . $_SESSION['PaymentDetail']->Address5 . ' ' . $_SESSION['PaymentDetail']->Address6; $LeftOvers = $pdf->addTextWrap(75,$YPos,300,$FontSize, $Address3, 'left'); -$AmountWords = Numbers_Words::toWords(intval($_SESSION['PaymentDetail']->Amount),$Locale); -$AmountWords .= ' ' . _('and') . ' ' . Numbers_Words::toWords(intval(($_SESSION['PaymentDetail']->Amount - intval($_SESSION['PaymentDetail']->Amount))*100),$Locale) . ' ' . $HundredsName; $YPos -= 2*$line_height; $LeftOvers = $pdf->addTextWrap(75,$YPos,300,$FontSize, $AmountWords, 'left'); @@ -88,4 +97,94 @@ $pdf->OutputD($_SESSION['DatabaseName'] . '_Cheque_' . date('Y-m-d') . '_ChequeNum_' . $_GET['ChequeNum'] . '.pdf'); $pdf->__destruct(); + +exit; +/* ****************************************************************************************** */ + +function number_to_words($Number) { + + if (($Number < 0) OR ($Number > 999999999)) { + prnMsg(_('Number is out of the range of numbers that can be expressed in words'),'error'); + return _('error'); + } + + $Millions = floor($Number / 1000000); + $Number -= $Millions * 1000000; + $Thousands = floor($Number / 1000); + $Number -= $Thousands * 1000; + $Hundreds = floor($Number / 100); + $Number -= $Hundreds * 100; + $NoOfTens = floor($Number / 10); + $NoOfOnes = $Number % 10; + + $NumberInWords = ''; + + if ($Millions) { + $NumberInWords .= number_to_words($Millions) . ' ' . _('million'); + } + + if ($Thousands) { + $NumberInWords .= (empty($NumberInWords) ? '' : ' ') . number_to_words($Thousands) . ' ' . _('thousand'); + } + + if ($Hundreds) { + $NumberInWords .= (empty($NumberInWords) ? '' : ' ') . number_to_words($Hundreds) . ' ' . _('hundred'); + } + + $Ones = array( 0 => '', + 1 => _('one'), + 2 => _('two'), + 3 => _('three'), + 4 => _('four'), + 5 => _('five'), + 6 => _('six'), + 7 => _('seven'), + 8 => _('eight'), + 9 => _('nine'), + 10 => _('ten'), + 11 => _('eleven'), + 12 => _('twelve'), + 13 => _('thirteen'), + 14 => _('fourteen'), + 15 => _('fifteen'), + 16 => _('sixteen'), + 17 => _('seventeen'), + 18 => _('eighteen'), + 19 => _('nineteen') ); + + $Tens = array( 0 => '', + 1 => '', + 2 => _('twenty'), + 3 => _('thirty'), + 4 => _('forty'), + 5 => _('fifty'), + 6 => _('sixty'), + 7 => _('seventy'), + 8 => _('eighty'), + 9 => _('ninety') ); + + + if ($NoOfTens OR $NoOfOnes) { + if (!empty($NumberInWords)) { + $NumberInWords .= ' ' . _('and') . ' '; + } + + if ($NoOfTens < 2){ + $NumberInWords .= $Ones[$NoOfTens * 10 + $NoOfOnes]; + } + else { + $NumberInWords .= $Tens[$NoOfTens]; + if ($NoOfOnes) { + $NumberInWords .= '-' . $Ones[$NoOfOnes]; + } + } + } + + if (empty($NumberInWords)){ + $NumberInWords = _('zero'); + } + + return $NumberInWords; +} + ?> \ No newline at end of file Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/SelectCreditItems.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -1553,7 +1553,7 @@ } - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement record to write the stock off could not be inserted because'); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement record to write the stock off could not be inserted because'); $DbgMsg = _('The following SQL to insert the stock movement to write off the stock was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); @@ -1823,9 +1823,9 @@ $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); } - } /* end of if GL and stock integrated and standard cost !=0 */ + } /* end of if GL and stock integrated and standard cost !=0 */ - if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $CreditLine->Price !=0){ + if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $CreditLine->Price !=0){ //Post sales transaction to GL credit sales $SalesGLAccounts = GetSalesGLAccount($Area, @@ -1849,49 +1849,49 @@ '" . (($CreditLine->Price * $CreditLine->Quantity)/$_SESSION['CurrencyRate']) . "' )"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note GL posting could not be inserted because'); - $DbgMsg = _('The following SQL to insert the GLTrans record was used'); - $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - - if ($CreditLine->DiscountPercent !=0){ - - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', - '" . -(($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "' - )"; - - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note discount GL posting could not be inserted because'); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - }/* end of if discount not equal to 0 */ - } /*end of if sales integrated with debtors */ + + if ($CreditLine->DiscountPercent !=0){ + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['discountglcode'] . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', + '" . -(($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "' + )"; + + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note discount GL posting could not be inserted because'); + $DbgMsg = _('The following SQL to insert the GLTrans record was used'); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + }/* end of if discount not equal to 0 */ + } /*end of if sales integrated with debtors */ } /*Quantity credited is more than 0 */ - } /*end of CreditLine loop */ + } /*end of CreditLine loop */ - if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ + if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /*Post credit note transaction to GL credit debtors, debit freight re-charged and debit sales */ - if (($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost + $TaxTotal) !=0) { - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + if (($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost + $TaxTotal) !=0) { + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES (11, '" . $CreditNo . "', '" . $SQLCreditDate . "', @@ -1903,8 +1903,8 @@ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting for the credit note could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - } - if ($_SESSION['CreditItems'.$identifier]->FreightCost !=0) { + } + if ($_SESSION['CreditItems'.$identifier]->FreightCost !=0) { $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1946,7 +1946,10 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } - } /*end of if Sales and GL integrated */ + + EnsureGLEntriesBalance(11,$CreditNo,$db); + + } /*end of if Sales and GL integrated */ DB_Txn_Commit($db); Modified: trunk/SuppPaymentRun.php =================================================================== --- trunk/SuppPaymentRun.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/SuppPaymentRun.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -205,10 +205,11 @@ } /* end while there are suppliers to retrieve transactions for */ if ($SupplierID!=''){ - + /*All the payment processing is in the below file */ include('includes/PDFPaymentRun_PymtFooter.php'); - $ProcessResult = DB_Txn_Commit($db); + $ProcessResult = DB_Txn_Commit($db); + if (DB_error_no($db) !=0) { $title = _('Payment Processing - Problem Report') . '.... '; include('includes/header.inc'); @@ -228,7 +229,7 @@ } - $pdf->OutputD($_SESSION['DatabaseName'] . '_Payment_Run_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputD($_SESSION['DatabaseName'] . '_Payment_Run_' . Date('Y-m-d_Hms') . '.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit */ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/doc/Change.log 2011-11-12 09:42:34 UTC (rev 4744) @@ -1,9 +1,13 @@ webERP Change Log +12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines +12/11/11 Phil: Removed old Numbers to words class code - this code was not in keeping with the rest of the system and not PHP 5 compatible anyway. Replaced with a much simpler function. This code is only used for pre-printed cheques - so it is in that script only. The new function may not effective for other languages but will be easily adapted as needed. The PrintCheque.php script needs to be modified specifically for the business stationery. +10/11/11 Phil: added a function in includes/SQL_CommonFunctions.inc EnsureGLTransBalance that looks at the gltrans entries for a given transaction type and type number and if the total is not zero and less than 0.05 it fudges the largest gltrans record to make the gltrans balance in total - added to ConfirmDispatch_Invoice.php Credit_Invoice.php SelectCreditItems.php CounterSales.php Payments.php CustomerReceipt.php 10/11/11 Phil: includes/DateFunctions.inc fixed GetPeriod function to create new period when just one month ahead of last period - worried about this can't see how it could have been like this so long without a bug report? 10/11/11 Phil: includes/LanguageSetup.php now sets LC_NUMERIC locale category after LC_ALL to ensure SQL compliant calculations 8/11/11 Phil: includes/GetConfig.php no longer casts the VersionNumber to a double - issue highlighted by Tim 8/11/11 Felix Lim: includes/InputSerialItems.php and InputSerialItemsKeyed.php now sends $identifier +8/11/11 Phil: CustomerReceipt.php now shows entries made with decimal places of the currency being entered 8/11/11 Phil: fixed bugs reported by Ron Wong and Don SelectSupplier.php sql error missed "s" off suppliers and CustomerReceipt.php - had not populated new class variable (property) of CurrDecimalPlaces 6/11/11 Release 4.06RC1 Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/DefinePOClass.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -146,7 +146,7 @@ /* Checks if there have been deliveries or invoiced entered against any of the line items */ if (count($this->LineItems)>0){ foreach ($this->LineItems as $OrderedItems) { - if ($OrderedItems->QtyReceived !=0 OR $OrderedItems->QtyInvoiced !=0){ + if ($OrderedItems->QtyReceived !=0 OR $OrderedItems->QtyInv !=0){ return 1; } } @@ -167,7 +167,9 @@ function Order_Value() { $TotalValue=0; foreach ($this->LineItems as $OrderedItems) { - $TotalValue += ($OrderedItems->Price)*($OrderedItems->Quantity); + if ($OrderedItems->Deleted = False){ + $TotalValue += ($OrderedItems->Price)*($OrderedItems->Quantity); + } } return $TotalValue; } Modified: trunk/includes/DefinePaymentClass.php =================================================================== --- trunk/includes/DefinePaymentClass.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/DefinePaymentClass.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -41,10 +41,23 @@ } - function Add_To_GLAnalysis($Amount, $Narrative, $GLCode, $GLActName, $tag, $cheque){ + function Add_To_GLAnalysis($Amount, + $Narrative, + $GLCode, + $GLActName, + $Tag, + $Cheque){ + if (isset($GLCode) AND $Amount!=0){ - $this->GLItems[$this->GLItemCounter] = new PaymentGLAnalysis($Amount, $Narrative, $this->GLItemCounter, $GLCode, $GLActName, $tag, $cheque); + $this->GLItems[$this->GLItemCounter] = new PaymentGLAnalysis($Amount, + $Narrative, + $this->GLItemCounter, + $GLCode, + $GLActName, + $Tag, + $Cheque); $this->GLItemCounter++; + $this->Amount += $Amount; Return 1; } Return 0; @@ -63,10 +76,16 @@ var $GLCode; var $GLActName; var $ID; - var $tag; - var $cheque; + var $Tag; + var $Cheque; - function PaymentGLAnalysis ($Amt, $Narr, $id, $GLCode, $GLActName, $tag, $cheque){ + function PaymentGLAnalysis ($Amt, + $Narr, + $id, + $GLCode, + $GLActName, + $Tag, + $Cheque){ /* Constructor function to add a new PaymentGLAnalysis object with passed params */ $this->Amount =$Amt; @@ -74,8 +93,8 @@ $this->GLCode = $GLCode; $this->GLActName = $GLActName; $this->ID = $id; - $this->tag = $tag; - $this->cheque = $cheque; + $this->Tag = $Tag; + $this->Cheque = $Cheque; } } Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/MiscFunctions.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -238,7 +238,6 @@ }//wikiLink - // Lindsay debug stuff function LogBackTrace( $dest = 0 ) { error_log( "***BEGIN STACK BACKTRACE***", $dest ); @@ -334,4 +333,6 @@ global $ThousandsSeparator; return str_replace($DecimalPoint,'.',str_replace($ThousandsSeparator,'',trim($Number))); } -?> + + +?> \ No newline at end of file Modified: trunk/includes/PDFPaymentRun_PymtFooter.php =================================================================== --- trunk/includes/PDFPaymentRun_PymtFooter.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/PDFPaymentRun_PymtFooter.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -10,14 +10,14 @@ $TotalPayments += $AccumBalance; $TotalAccumDiffOnExch += $AccumDiffOnExch; -$LeftOvers = $pdf->addTextWrap(340,$YPos,60,$FontSize,locale_number_format($AccumBalance,2), 'right'); -$LeftOvers = $pdf->addTextWrap(405,$YPos,60,$FontSize,locale_number_format($AccumDiffOnExch,2), 'right'); +$LeftOvers = $pdf->addTextWrap(340,$YPos,60,$FontSize,locale_number_format($AccumBalance,$CurrDecimalPlaces), 'right'); +$LeftOvers = $pdf->addTextWrap(405,$YPos,60,$FontSize,locale_number_format($AccumDiffOnExch,$CurrDecimalPlaces), 'right'); if (isset($_POST['PrintPDFAndProcess'])){ - if (is_numeric($_POST['Ref'])) { - $PaytReference = $_POST['Ref'] + $RefCounter; + if (is_numeric(filter_number_format($_POST['Ref']))) { + $PaytReference = filter_number_format($_POST['Ref']) + $RefCounter; } else { $PaytReference = $_POST['Ref'] . ($RefCounter + 1); } @@ -36,8 +36,8 @@ rate, ovamount, diffonexch, - alloc) "; - $SQL = $SQL . "VALUES (22, + alloc) + VALUES (22, '" . $SuppPaymentNo . "', '" . $PaytReference . "', '" . $SupplierID . "', @@ -45,18 +45,20 @@ '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', '" . date('Y-m-d H-i-s') . "', 1, - '" . $_POST['ExRate'] . "', + '" . filter_number_format($_POST['ExRate']) . "', '" . -$AccumBalance . "', '" . -$AccumDiffOnExch . "', '" . -$AccumBalance . "')"; + $ProcessResult = DB_query($SQL,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Payment Processing - Problem Report'); include('header.inc'); prnMsg(_('None of the payments will be processed because the payment record for') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo "<BR><A HREF='$rootpath/index.php'>" . _("Back to the menu") . "</A>"; + echo '<br> + <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - prnMsg(_("The SQL that failed was") . ' ' . $SQL,'error'); + prnMsg(_('The SQL that failed was') . ' ' . $SQL,'error'); } $ProcessResult = DB_Txn_Rollback($db); include('footer.inc'); @@ -84,7 +86,7 @@ $title = _('Payment Processing - Problem Report') . '.... '; include('header.inc'); prnMsg(_('None of the payments will be processed since an allocation record for') . $SupplierName . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo '<BR><A HREF="' . $rootpath . '/index.php">' . _('Back to the menu') . '</A>'; + echo '<br><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . $SQL,'error'); } @@ -104,7 +106,7 @@ amount) "; $SQL = $SQL . "VALUES ( " . $_POST['BankAccount'] . ", '" . $PaytReference . " " . $SupplierID . "', - " . $_POST['ExRate'] . ", + " . filter_number_format($_POST['ExRate']) . ", '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', '" . $_POST['PaytType'] . "', " . -$AccumBalance . ")"; @@ -113,7 +115,8 @@ $title = _('Payment Processing - Problem Report'); include('header.inc'); prnMsg(_('None of the payments will be processed because the bank account payment record for') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo "<BR><A HREF='$rootpath/index.php'>" . _("Back to the menu") . "</A>"; + echo '<br /> + <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . ' ' . $SQL,'error'); } @@ -142,16 +145,17 @@ '" . $PeriodNo . "', '" . $_POST['BankAccount'] . "', '" . $SupplierID . " - " . $SupplierName . ' ' . _('payment run on') . ' ' . Date($_SESSION['DefaultDateFormat']) . ' - ' . $PaytReference . "', - '" . (-$AccumBalance/ $_POST['ExRate']) . "')"; + '" . (-$AccumBalance/ filter_number_format($_POST['ExRate'])) . "')"; $ProcessResult = DB_query($SQL,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Payment Processing') . ' - ' . _('Problem Report') . '.... '; include('header.inc'); prnMsg(_('None of the payments will be processed since the general ledger posting for the payment to') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo "<BR><A HREF='$rootpath/index.php'>" . _('Back to the menu') . '</A>'; + echo '<br /> + <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - prnMsg(_('The SQL that failed was') . ':<BR>' . $SQL, 'error'); + prnMsg(_('The SQL that failed was') . ':<br />' . $SQL, 'error'); } $ProcessResult = DB_Txn_Rollback($db); include('footer.inc'); @@ -173,19 +177,18 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['creditorsact'] . "', '" . $SupplierID . ' - ' . $SupplierName . ' ' . _('payment run on') . ' ' . Date($_SESSION['DefaultDateFormat']) . ' - ' . $PaytReference . "', - '" . ($AccumBalance/ $_POST['ExRate'] + $AccumDiffOnExch) . "')"; + '" . ($AccumBalance/ filter_number_format($_POST['ExRate']) + $AccumDiffOnExch) . "')"; $ProcessResult = DB_query($SQL,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Payment Processing - Problem Report'); include('header.inc'); - echo '<BR>' . _('None of the payments will be processed since the general ledger posting for the payment to') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db); - echo "<BR><A HREF='$rootpath/index.php'>" . _('Back to the menu') . '</A>'; + prnMsg(_('None of the payments will be processed since the general ledger posting for the payment to') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . ':<BR>' . $SQL,'error'); } $ProcessResult = DB_Txn_Rollback($db); - include('footer.inc'); exit; } @@ -193,12 +196,12 @@ /*Do the GL trans for the exch diff */ if ($AccumDiffOnExch != 0){ $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount ) + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES (22, '" . $SuppPaymentNo . "', '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', @@ -212,7 +215,7 @@ $title = _('Payment Processing - Problem Report'); include('header.inc'); prnMsg(_('None of the payments will be processed since the general ledger posting for the exchange difference on') . ' ' . $SupplierName . ' ' . _('could not be inserted because') .' - ' . DB_error_msg($db),'error'); - echo "<br /><a href='$rootpath/index.php'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was: ') . '<br />' . $SQL,'error'); } @@ -221,6 +224,7 @@ exit; } } + EnsureGLEntriesBalance(22,$SuppPaymentNo,$db); } /*end if GL linked to creditors */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-12 09:42:42
|
Revision: 4744 http://web-erp.svn.sourceforge.net/web-erp/?rev=4744&view=rev Author: daintree Date: 2011-11-12 09:42:34 +0000 (Sat, 12 Nov 2011) Log Message: ----------- bug fixes and tidy Modified Paths: -------------- trunk/CounterSales.php trunk/Credit_Invoice.php trunk/CustomerReceipt.php trunk/GoodsReceived.php trunk/PDFCustTransListing.php trunk/Payments.php trunk/PrintCheque.php trunk/SelectCreditItems.php trunk/SuppPaymentRun.php trunk/doc/Change.log trunk/includes/DefinePOClass.php trunk/includes/DefinePaymentClass.php trunk/includes/MiscFunctions.php trunk/includes/PDFPaymentRun_PymtFooter.php Removed Paths: ------------- trunk/Numbers/ Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/CounterSales.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -1432,37 +1432,36 @@ $OrderLine->StandardCost=0; } if ($MBFlag=='B' OR $MBFlag=='M'){ - $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - price, - prd, - reference, - qty, - discountpercent, - standardcost, - newqoh, - narrative ) - VALUES ('" . $OrderLine->StockID . "', - 10, - '" . $InvoiceNo . "', - '" . $_SESSION['Items'.$identifier]->Location . "', - '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . $_SESSION['Items'.$identifier]->Branch . "', - '" . $LocalCurrencyPrice . "', - '" . $PeriodNo . "', - '" . $OrderNo . "', - '" . -$OrderLine->Quantity . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', - '" . ($QtyOnHandPrior - $OrderLine->Quantity) . "', - '" . DB_escape_string($OrderLine->Narrative) . "' )"; + $SQL = "INSERT INTO stockmoves (stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost, + newqoh, + narrative ) + VALUES ('" . $OrderLine->StockID . "', + 10, + '" . $InvoiceNo . "', + '" . $_SESSION['Items'.$identifier]->Location . "', + '" . $DefaultDispatchDate . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', + '" . $LocalCurrencyPrice . "', + '" . $PeriodNo . "', + '" . $OrderNo . "', + '" . -$OrderLine->Quantity . "', + '" . $OrderLine->DiscountPercent . "', + '" . $OrderLine->StandardCost . "', + '" . ($QtyOnHandPrior - $OrderLine->Quantity) . "', + '" . DB_escape_string($OrderLine->Narrative) . "' )"; } else { // its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil if (empty($OrderLine->StandardCost)) { @@ -1688,13 +1687,13 @@ /*now the stock entry*/ $StockGLCode = GetStockGLCode($OrderLine->StockID,$db); - $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount ) + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES ( 10, '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', @@ -1713,14 +1712,13 @@ //Post sales transaction to GL credit sales $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db); - $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount - ) + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES ( 10, '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', @@ -1735,14 +1733,13 @@ if ($OrderLine->DiscountPercent !=0){ - $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount - ) + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES ( 10, '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', @@ -1805,6 +1802,9 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } + + EnsureGLEntriesBalance(10,$InvoiceNo,$db); + /*Also if GL is linked to debtors need to process the debit to bank and credit to debtors for the payment */ /*Need to figure out the cross rate between customer currency and bank account currency */ @@ -1847,6 +1847,9 @@ $ErrMsg = _('Cannot insert a GL transaction for the debtors account credit'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); }//amount paid we not zero + + EnsureGLEntriesBalance(12,$ReceiptNumber,$db); + } /*end of if Sales and GL integrated */ if ($_POST['AmountPaid']!=0){ if (!isset($ReceiptNumber)){ Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/Credit_Invoice.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -20,11 +20,11 @@ exit; } elseif (isset($_GET['InvoiceNumber'])) { - $_GET['InvoiceNumber']=(int)$_GET['InvoiceNumber']; + $_GET['InvoiceNumber']=intval($_GET['InvoiceNumber']); unset($_SESSION['CreditItems']->LineItems); unset($_SESSION['CreditItems']); - $_SESSION['ProcessingCredit'] = $_GET['InvoiceNumber']; + $_SESSION['ProcessingCredit'] = intval($_GET['InvoiceNumber']); $_SESSION['CreditItems'] = new cart; /*read in all the guff from the selected invoice into the Items cart */ @@ -61,7 +61,7 @@ AND stockmoves.type=debtortrans.type INNER JOIN locations ON stockmoves.loccode = locations.loccode - WHERE debtortrans.transno = '" . $_GET['InvoiceNumber'] . "' + WHERE debtortrans.transno = '" . intval($_GET['InvoiceNumber']) . "' AND stockmoves.type=10"; $ErrMsg = _('A credit cannot be produced for the selected invoice') . '. ' . _('The invoice details cannot be retrieved because'); @@ -1414,6 +1414,9 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } + + EnsureGLEntriesBalance(11,$CreditNo,$db); + } /*end of if Sales and GL integrated */ $Result = DB_Txn_Commit($db); Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/CustomerReceipt.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -534,6 +534,7 @@ $ErrMsg = _('Cannot insert a GL transaction for the payment discount debit'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } //end if there is some discount + EnsureGLEntriesBalance(12,$_SESSION['ReceiptBatch']->BatchNo,$db); } //end if there is GL work to be done - ie config is to link to GL Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/GoodsReceived.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -38,7 +38,7 @@ AND !isset($_POST['Update'])) { /*Update only occurs if the user hits the button to refresh the data and recalc the value of goods recd*/ - $_GET['ModifyOrderNumber'] = (int)$_GET['PONumber']; + $_GET['ModifyOrderNumber'] = intval($_GET['PONumber']); include('includes/PO_ReadInOrder.inc'); } elseif (isset($_POST['Update']) OR isset($_POST['ProcessGoodsReceived'])) { @@ -47,7 +47,7 @@ set from the post to the quantity to be received */ foreach ($_SESSION['PO'.$identifier]->LineItems as $Line) { - $RecvQty = filter_number_format($_POST['RecvQty_' . $Line->LineNo]); + $RecvQty = round(filter_number_format($_POST['RecvQty_' . $Line->LineNo]),$Line->DecimalPlaces); if (!is_numeric($RecvQty)){ $RecvQty = 0; } @@ -612,7 +612,7 @@ '" . $_POST['DefaultReceivedDate'] . "', '" . $PeriodNo . "', '" . Date('Y-m-d') . "', - 'cost', + '" . _('cost') . "', '" . $CurrentStandardCost * $OrderLine->ReceiveQty . "')"; $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE The fixed asset transaction could not be inserted because'); $DbgMsg = _('The following SQL to insert the fixed asset transaction record was used'); @@ -662,7 +662,7 @@ '" . $OrderLine->GLCode . "', 'PO: " . $_SESSION['PO'.$identifier]->OrderNo . " " . $_SESSION['PO'.$identifier]->SupplierID . " - " . $OrderLine->StockID . " - " . $OrderLine->ItemDescription . " x " . $OrderLine->ReceiveQty . " @ " . - locale_number_format($CurrentStandardCost,2) . "', + locale_number_format($CurrentStandardCost,$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $CurrentStandardCost * $OrderLine->ReceiveQty . "' )"; @@ -685,7 +685,7 @@ '" . $_POST['DefaultReceivedDate'] . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['grnact'] . "', - '" . _('PO'.$identifier) . ': ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . $_SESSION['PO'.$identifier]->SupplierID . ' - ' . $OrderLine->StockID . ' - ' . $OrderLine->ItemDescription . ' x ' . $OrderLine->ReceiveQty . ' @ ' . locale_number_format($UnitCost,2) . "', + '" . _('PO'.$identifier) . ': ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . $_SESSION['PO'.$identifier]->SupplierID . ' - ' . $OrderLine->StockID . ' - ' . $OrderLine->ItemDescription . ' x ' . $OrderLine->ReceiveQty . ' @ ' . locale_number_format($UnitCost,$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . -$UnitCost * $OrderLine->ReceiveQty . "' )"; @@ -705,8 +705,11 @@ WHERE orderno='" . $_SESSION['PO'.$identifier]->OrderNo . "'"; $result=DB_query($sql,$db); } + + if ($_SESSION['PO'.$identifier]->GLLink==1) { + EnsureGLEntriesBalance(25, $GRN,$db); + } - $Result = DB_Txn_Commit($db); $PONo = $_SESSION['PO'.$identifier]->OrderNo; unset($_SESSION['PO'.$identifier]->LineItems); @@ -714,7 +717,7 @@ unset($_POST['ProcessGoodsReceived']); echo '<br /> - <div class=centre> + <div class="centre"> '. prnMsg(_('GRN number'). ' '. $GRN .' '. _('has been processed'),'success') . ' <br /> <br /> Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/PDFCustTransListing.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -130,7 +130,7 @@ $YPos-=$line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,locale_number_format($TotalAmount,$_SESSION['CompanyRecord']['decimalplaces']), 'right'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions') . ' ' . $_SESSION['CompanyRecord']['CurrencyDefault'], 'left'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions') . ' ' . $_SESSION['CompanyRecord']['currencydefault'], 'left'); $ReportFileName = $_SESSION['DatabaseName'] . '_CustTransListing_' . date('Y-m-d').'.pdf'; $pdf->OutputD($ReportFileName); Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/Payments.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -30,10 +30,12 @@ if ((isset($_POST['UpdateHeader']) AND $_POST['BankAccount']=='') OR (isset($_POST['Process']) AND $_POST['BankAccount']=='')) { + prnMsg(_('A bank account must be selected to make this payment from'), 'warn'); - $BankAccountEmpty=TRUE; + $BankAccountEmpty=true; } else { - $BankAccountEmpty=FALSE; + + $BankAccountEmpty=false; } echo '<p class="page_title_text"> @@ -72,7 +74,7 @@ exit; } else { $myrow = DB_fetch_array($Result); - if ($myrow['factorcompanyid'] == 1) { + if ($myrow['factorcompanyid'] == 0) { $_SESSION['PaymentDetail']->SuppName = $myrow['suppname']; $_SESSION['PaymentDetail']->Address1 = $myrow['address1']; $_SESSION['PaymentDetail']->Address2 = $myrow['address2']; @@ -82,6 +84,7 @@ $_SESSION['PaymentDetail']->Address6 = $myrow['address6']; $_SESSION['PaymentDetail']->SupplierID = $_GET['SupplierID']; $_SESSION['PaymentDetail']->Currency = $myrow['currcode']; + $_POST['Currency'] = $_SESSION['PaymentDetail']->Currency; } else { $factorsql= "SELECT coyname, @@ -111,6 +114,7 @@ } if (isset($_POST['BankAccount']) AND $_POST['BankAccount']!=''){ + $_SESSION['PaymentDetail']->Account=$_POST['BankAccount']; /*Get the bank account currency and set that too */ $ErrMsg = _('Could not get the currency of the bank account'); @@ -134,10 +138,10 @@ $_SESSION['PaymentDetail']->DatePaid=$_POST['DatePaid']; } if (isset($_POST['ExRate']) AND $_POST['ExRate']!=''){ - $_SESSION['PaymentDetail']->ExRate=$_POST['ExRate']; //ex rate between payment currency and account currency + $_SESSION['PaymentDetail']->ExRate=filter_number_format($_POST['ExRate']); //ex rate between payment currency and account currency } if (isset($_POST['FunctionalExRate']) AND $_POST['FunctionalExRate']!=''){ - $_SESSION['PaymentDetail']->FunctionalExRate=$_POST['FunctionalExRate']; //ex rate between payment currency and account currency + $_SESSION['PaymentDetail']->FunctionalExRate=filter_number_format($_POST['FunctionalExRate']); //ex rate between payment currency and account currency } if (isset($_POST['Paymenttype']) AND $_POST['Paymenttype']!=''){ $_SESSION['PaymentDetail']->Paymenttype = $_POST['Paymenttype']; @@ -158,8 +162,8 @@ if ($_SESSION['PaymentDetail']->AccountCurrency==$_SESSION['CompanyRecord']['currencydefault']){ $_POST['FunctionalExRate']=1; $_SESSION['PaymentDetail']->FunctionalExRate=filter_number_format($_POST['FunctionalExRate']); + $SuggestedExRate = $tableExRate; $SuggestedFunctionalExRate =1; - $SuggestedExRate = $tableExRate; } else { /*To illustrate the rates required @@ -190,8 +194,8 @@ if (isset($_POST['Narrative']) AND $_POST['Narrative']!=''){ $_SESSION['PaymentDetail']->Narrative=$_POST['Narrative']; } -if (isset($_POST['Amount']) AND $_POST['Amount']!=""){ - $_SESSION['PaymentDetail']->Amount=$_POST['Amount']; +if (isset($_POST['Amount']) AND $_POST['Amount']!=''){ + $_SESSION['PaymentDetail']->Amount=filter_number_format($_POST['Amount']); } else { if (!isset($_SESSION['PaymentDetail']->Amount)) { $_SESSION['PaymentDetail']->Amount=0; @@ -275,11 +279,16 @@ echo '<form method=post action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo _('Has the cheque been printed') . '?<br /><br />'; - echo '<input type="hidden" name="CommitBatch" value="' . $_POST['CommitBatch'] . '" />'; - echo '<input type="hidden" name="BankAccount" value="' . $_POST['BankAccount'] . '" />'; - echo '<input type="submit" name="ChequePrinted" value="' . _('Yes / Continue') . '" /> '; - echo '<input type="submit" name="PaymentCancelled" value="' . _('No / Cancel Payment') . '" />'; + echo _('Has the cheque been printed') . '? + <br /> + <br /> + <input type="hidden" name="CommitBatch" value="' . $_POST['CommitBatch'] . '" /> + <input type="hidden" name="BankAccount" value="' . $_POST['BankAccount'] . '" /> + <input type="submit" name="ChequePrinted" value="' . _('Yes / Continue') . '" /> + <input type="submit" name="PaymentCancelled" value="' . _('No / Cancel Payment') . '" />'; + + echo '<br />Payment amount = ' . $_SESSION['PaymentDetail']->Amount; + } else { //Start a transaction to do the whole lot inside @@ -292,7 +301,7 @@ //its a nominal bank transaction type 1 $TransNo = GetNextTransNo( 1, $db); - $Transtype = 1; + $TransType = 1; if ($_SESSION['CompanyRecord']['gllink_creditors']==1){ /* then enter GLTrans */ $TotalAmount=0; @@ -301,7 +310,7 @@ /*The functional currency amount will be the payment currenct amount / the bank account currency exchange rate - to get to the bank account currency then / the functional currency exchange rate to get to the functional currency */ - if ($PaymentItem->cheque=='') $PaymentItem->cheque=0; + if ($PaymentItem->Cheque=='') $PaymentItem->Cheque=0; $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -318,8 +327,8 @@ '" . $PaymentItem->GLCode . "', '" . $PaymentItem->Narrative . "', '" . ($PaymentItem->Amount/$_SESSION['PaymentDetail']->ExRate/$_SESSION['PaymentDetail']->FunctionalExRate) . "', - '". $PaymentItem->cheque ."', - '" . $PaymentItem->tag . "' + '". $PaymentItem->Cheque ."', + '" . $PaymentItem->Tag . "' )"; $ErrMsg = _('Cannot insert a GL entry for the payment using the SQL'); $result = DB_query($SQL,$db,$ErrMsg,_('The SQL that failed was'),true); @@ -413,7 +422,7 @@ $CreditorTotal = (($_SESSION['PaymentDetail']->Discount + $_SESSION['PaymentDetail']->Amount)/$_SESSION['PaymentDetail']->ExRate)/$_SESSION['PaymentDetail']->FunctionalExRate; $TransNo = GetNextTransNo(22, $db); - $Transtype = 22; + $TransType = 22; /* Create a SuppTrans entry for the supplier payment */ $SQL = "INSERT INTO supptrans (transno, @@ -483,8 +492,8 @@ periodno, account, narrative, - amount) "; - $SQL=$SQL . "VALUES (22, + amount) + VALUES (22, '" . $TransNo . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', '" . $PeriodNo . "', @@ -496,6 +505,7 @@ $DbgMsg = _('Cannot insert a GL transaction for the payment discount credit using the SQL'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } // end if discount + } // end if gl creditors } // end if supplier @@ -510,7 +520,7 @@ account, narrative, amount) - VALUES ('" . $Transtype . "', + VALUES ('" . $TransType . "', '" . $TransNo . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', '" . $PeriodNo . "', @@ -522,11 +532,12 @@ $DbgMsg = _('Cannot insert a GL transaction for the bank account credit using the SQL'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + EnsureGLEntriesBalance($TransType,$TransNo,$db); } } /*now enter the BankTrans entry */ - if ($Transtype==22) { + if ($TransType==22) { $SQL="INSERT INTO banktrans (transno, type, bankact, @@ -538,7 +549,7 @@ amount, currcode) VALUES ('" . $TransNo . "', - '" . $Transtype . "', + '" . $TransType . "', '" . $_SESSION['PaymentDetail']->Account . "', '" . $_SESSION['PaymentDetail']->Narrative . "', '" . $_SESSION['PaymentDetail']->ExRate . "', @@ -565,7 +576,7 @@ amount, currcode) VALUES ('" . $TransNo . "', - '" . $Transtype . "', + '" . $TransType . "', '" . $_SESSION['PaymentDetail']->Account . "', '" . $_SESSION['PaymentDetail']->Narrative . "', '" . $_SESSION['PaymentDetail']->ExRate . "', @@ -616,9 +627,10 @@ } elseif (isset($_GET['Delete'])){ /* User hit delete the receipt entry from the batch */ $_SESSION['PaymentDetail']->Remove_GLItem($_GET['Delete']); + } elseif (isset($_POST['Process']) AND !$BankAccountEmpty){ //user hit submit a new GL Analysis line into the payment - $ChequeNoSQL="SELECT account FROM gltrans WHERE chequeno='" . $_POST['cheque'] ."'"; + $ChequeNoSQL="SELECT account FROM gltrans WHERE chequeno='" . $_POST['Cheque'] ."'"; $ChequeNoResult=DB_query($ChequeNoSQL, $db); if (is_numeric($_POST['GLManualCode'])){ @@ -632,7 +644,7 @@ if (DB_num_rows($Result)==0){ prnMsg( _('The manual GL code entered does not exist in the database') . ' - ' . _('so this GL analysis item could not be added'),'warn'); unset($_POST['GLManualCode']); - } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['cheque']!=''){ + } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['Cheque']!=''){ prnMsg( _('The Cheque/Voucher number has already been used') . ' - ' . _('This GL analysis item could not be added'),'error'); } else { $myrow = DB_fetch_array($Result); @@ -640,11 +652,11 @@ $_POST['GLNarrative'], $_POST['GLManualCode'], $myrow['accountname'], - $_POST['tag'], - $_POST['cheque']); + $_POST['Tag'], + $_POST['Cheque']); unset($_POST['GLManualCode']); } - } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['cheque']!=''){ + } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['Cheque']!=''){ prnMsg( _('The cheque number has already been used') . ' - ' . _('This GL analysis item could not be added'),'error'); } else if ($_POST['GLCode'] == '') { prnMsg( _('No General Ledger code has been chosen') . ' - ' . _('so this GL analysis item could not be added'),'warn'); @@ -656,8 +668,8 @@ $_POST['GLNarrative'], $_POST['GLCode'], $myrow['accountname'], - $_POST['tag'], - $_POST['cheque']); + $_POST['Tag'], + $_POST['Cheque']); } /*Make sure the same receipt is not double processed by a page refresh */ @@ -821,7 +833,7 @@ $SuggestedExRateText =''; } if ($_POST['ExRate']==1 AND isset($SuggestedExRate)){ - $_POST['ExRate'] = $SuggestedExRate; + $_POST['ExRate'] = locale_number_format($SuggestedExRate,6); } echo '<tr> <td>' . _('Payment Exchange Rate') . ':</td> @@ -896,10 +908,10 @@ echo '<br /><table class="selection">'; echo '<tr><th colspan="2"><font size="3" color="blue">' . _('General Ledger Payment Analysis Entry') . '</font></th></tr>'; - //Select the tag + //Select the Tag echo '<tr> <td>' . _('Select Tag') . ':</td> - <td><select name="tag">'; + <td><select name="Tag">'; $SQL = "SELECT tagref, tagdescription @@ -909,7 +921,7 @@ $result=DB_query($SQL,$db); echo '<option value=0></option>'; while ($myrow=DB_fetch_array($result)){ - if (isset($_POST['tag']) AND $_POST['tag']==$myrow['tagref']){ + if (isset($_POST['Tag']) AND $_POST['Tag']==$myrow['tagref']){ echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; @@ -917,7 +929,7 @@ } echo '</select></td> </tr>'; -// End select tag +// End select Tag /*now set up a GLCode field to select from avaialble GL accounts */ if (isset($_POST['GLManualCode'])) { @@ -994,7 +1006,7 @@ echo '<tr> <td>'. _('Cheque/Voucher Number') .'</td> - <td><input type="text" name="cheque" maxlength="12" size="12" /></td> + <td><input type="text" name="Cheque" maxlength="12" size="12" /></td> </tr>'; if (isset($_POST['GLNarrative'])) { @@ -1039,21 +1051,21 @@ $PaymentTotal = 0; foreach ($_SESSION['PaymentDetail']->GLItems as $PaymentItem) { - $tagsql="SELECT tagdescription from tags where tagref='" . $PaymentItem->tag . "'"; - $TagResult=DB_query($tagsql, $db); + $Tagsql="SELECT tagdescription from tags where tagref='" . $PaymentItem->Tag . "'"; + $TagResult=DB_query($Tagsql, $db); $TagMyrow=DB_fetch_row($TagResult); - if ($PaymentItem->tag==0) { + if ($PaymentItem->Tag==0) { $TagName='None'; } else { $TagName=$TagMyrow[0]; } echo '<tr> - <td align=left>' . $PaymentItem->cheque . '</td> + <td>' . $PaymentItem->Cheque . '</td> <td class="number">' . locale_number_format($PaymentItem->Amount,$_SESSION['PaymentDetail']->CurrDecimalPlaces) . '</td> <td>' . $PaymentItem->GLCode . ' - ' . $PaymentItem->GLActName . '</td> <td>' . stripslashes($PaymentItem->Narrative) . '</td> - <td>' . $PaymentItem->tag . ' - ' . $TagName . '</td> + <td>' . $PaymentItem->Tag . ' - ' . $TagName . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $PaymentItem->ID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment analysis item?') . '\');">' . _('Delete') . '</a></td> </tr>'; $PaymentTotal += $PaymentItem->Amount; @@ -1077,7 +1089,7 @@ echo '<table class="selection"> <tr> <td>' . _('Amount of Payment') . ' ' . $_SESSION['PaymentDetail']->Currency . ':</td> - <td><input class="number" type="text" name="Amount" maxlength=12 size=13 value=' . $_SESSION['PaymentDetail']->Amount . '></td> + <td><input class="number" type="text" name="Amount" maxlength="12" size="13" value=' . $_SESSION['PaymentDetail']->Amount . '></td> </tr>'; if (isset($_SESSION['PaymentDetail']->SupplierID)){ /*So it is a supplier payment so show the discount entry item */ @@ -1087,7 +1099,7 @@ </tr>'; echo '<input type="hidden" name="SuppName" value="' . $_SESSION['PaymentDetail']->SuppName . '" />'; } else { - echo '<input type="hidden" name="discount" Value="0" />'; + echo '<input type="hidden" name="Discount" Value="0" />'; } echo '</table><br />'; echo '<input type=submit name="CommitBatch" value="' . _('Accept and Process Payment') . '" />'; Modified: trunk/PrintCheque.php =================================================================== --- trunk/PrintCheque.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/PrintCheque.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -2,10 +2,12 @@ /* $Id$*/ +/*Hard coded for currencies with 2 decimal places */ + include('includes/DefinePaymentClass.php'); include('includes/session.inc'); -include('Numbers/Words.php'); + include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Print Cheque')); $pdf->addInfo('Subject', _('Print Cheque')); @@ -14,7 +16,8 @@ $line_height=12; $result = db_query("SELECT hundredsname, - decimalplaces + decimalplaces, + currency FROM currencies WHERE currabrev='" . $_SESSION['PaymentDetail']->Currency . "'",$db); @@ -25,15 +28,23 @@ exit; } -$CurrencyRow = db_fetch_row($result); -$HundredsName = $CurrencyRow[0]; -$CurrDecimalPlaces = $CurrencyRow[1]; +$CurrencyRow = db_fetch_array($result); +$HundredsName = $CurrencyRow['hundredsname']; +$CurrDecimalPlaces = $CurrencyRow['decimalplaces']; +$CurrencyName = mb_strtolower($CurrencyRow['currency']); // cheque $YPos= $Page_Height-5*$line_height; $LeftOvers = $pdf->addTextWrap($Page_Width-75,$YPos,100,$FontSize,$_GET['ChequeNum'], 'left'); $YPos -= 3*$line_height; +$AmountWords = number_to_words($_SESSION['PaymentDetail']->Amount) . ' ' . $CurrencyName; +$Cents = intval(round(($_SESSION['PaymentDetail']->Amount - intval($_SESSION['PaymentDetail']->Amount))*100,0)); +if ($Cents > 0){ + $AmountWords .= ' ' . _('and') . ' ' . strval($Cents) . ' ' . $HundredsName; +} else { + $AmountWords .= ' ' . _('only'); +} $LeftOvers = $pdf->addTextWrap(75,$YPos,475,$FontSize,$AmountWords, 'left'); $YPos -= 1*$line_height; @@ -50,8 +61,6 @@ $Address3 = $_SESSION['PaymentDetail']->Address3 . ' ' . $_SESSION['PaymentDetail']->Address4 . ' ' . $_SESSION['PaymentDetail']->Address5 . ' ' . $_SESSION['PaymentDetail']->Address6; $LeftOvers = $pdf->addTextWrap(75,$YPos,300,$FontSize, $Address3, 'left'); -$AmountWords = Numbers_Words::toWords(intval($_SESSION['PaymentDetail']->Amount),$Locale); -$AmountWords .= ' ' . _('and') . ' ' . Numbers_Words::toWords(intval(($_SESSION['PaymentDetail']->Amount - intval($_SESSION['PaymentDetail']->Amount))*100),$Locale) . ' ' . $HundredsName; $YPos -= 2*$line_height; $LeftOvers = $pdf->addTextWrap(75,$YPos,300,$FontSize, $AmountWords, 'left'); @@ -88,4 +97,94 @@ $pdf->OutputD($_SESSION['DatabaseName'] . '_Cheque_' . date('Y-m-d') . '_ChequeNum_' . $_GET['ChequeNum'] . '.pdf'); $pdf->__destruct(); + +exit; +/* ****************************************************************************************** */ + +function number_to_words($Number) { + + if (($Number < 0) OR ($Number > 999999999)) { + prnMsg(_('Number is out of the range of numbers that can be expressed in words'),'error'); + return _('error'); + } + + $Millions = floor($Number / 1000000); + $Number -= $Millions * 1000000; + $Thousands = floor($Number / 1000); + $Number -= $Thousands * 1000; + $Hundreds = floor($Number / 100); + $Number -= $Hundreds * 100; + $NoOfTens = floor($Number / 10); + $NoOfOnes = $Number % 10; + + $NumberInWords = ''; + + if ($Millions) { + $NumberInWords .= number_to_words($Millions) . ' ' . _('million'); + } + + if ($Thousands) { + $NumberInWords .= (empty($NumberInWords) ? '' : ' ') . number_to_words($Thousands) . ' ' . _('thousand'); + } + + if ($Hundreds) { + $NumberInWords .= (empty($NumberInWords) ? '' : ' ') . number_to_words($Hundreds) . ' ' . _('hundred'); + } + + $Ones = array( 0 => '', + 1 => _('one'), + 2 => _('two'), + 3 => _('three'), + 4 => _('four'), + 5 => _('five'), + 6 => _('six'), + 7 => _('seven'), + 8 => _('eight'), + 9 => _('nine'), + 10 => _('ten'), + 11 => _('eleven'), + 12 => _('twelve'), + 13 => _('thirteen'), + 14 => _('fourteen'), + 15 => _('fifteen'), + 16 => _('sixteen'), + 17 => _('seventeen'), + 18 => _('eighteen'), + 19 => _('nineteen') ); + + $Tens = array( 0 => '', + 1 => '', + 2 => _('twenty'), + 3 => _('thirty'), + 4 => _('forty'), + 5 => _('fifty'), + 6 => _('sixty'), + 7 => _('seventy'), + 8 => _('eighty'), + 9 => _('ninety') ); + + + if ($NoOfTens OR $NoOfOnes) { + if (!empty($NumberInWords)) { + $NumberInWords .= ' ' . _('and') . ' '; + } + + if ($NoOfTens < 2){ + $NumberInWords .= $Ones[$NoOfTens * 10 + $NoOfOnes]; + } + else { + $NumberInWords .= $Tens[$NoOfTens]; + if ($NoOfOnes) { + $NumberInWords .= '-' . $Ones[$NoOfOnes]; + } + } + } + + if (empty($NumberInWords)){ + $NumberInWords = _('zero'); + } + + return $NumberInWords; +} + ?> \ No newline at end of file Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/SelectCreditItems.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -1553,7 +1553,7 @@ } - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement record to write the stock off could not be inserted because'); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement record to write the stock off could not be inserted because'); $DbgMsg = _('The following SQL to insert the stock movement to write off the stock was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); @@ -1823,9 +1823,9 @@ $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); } - } /* end of if GL and stock integrated and standard cost !=0 */ + } /* end of if GL and stock integrated and standard cost !=0 */ - if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $CreditLine->Price !=0){ + if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $CreditLine->Price !=0){ //Post sales transaction to GL credit sales $SalesGLAccounts = GetSalesGLAccount($Area, @@ -1849,49 +1849,49 @@ '" . (($CreditLine->Price * $CreditLine->Quantity)/$_SESSION['CurrencyRate']) . "' )"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note GL posting could not be inserted because'); - $DbgMsg = _('The following SQL to insert the GLTrans record was used'); - $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - - if ($CreditLine->DiscountPercent !=0){ - - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', - '" . -(($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "' - )"; - - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note discount GL posting could not be inserted because'); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - }/* end of if discount not equal to 0 */ - } /*end of if sales integrated with debtors */ + + if ($CreditLine->DiscountPercent !=0){ + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['discountglcode'] . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', + '" . -(($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "' + )"; + + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note discount GL posting could not be inserted because'); + $DbgMsg = _('The following SQL to insert the GLTrans record was used'); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + }/* end of if discount not equal to 0 */ + } /*end of if sales integrated with debtors */ } /*Quantity credited is more than 0 */ - } /*end of CreditLine loop */ + } /*end of CreditLine loop */ - if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ + if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /*Post credit note transaction to GL credit debtors, debit freight re-charged and debit sales */ - if (($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost + $TaxTotal) !=0) { - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + if (($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost + $TaxTotal) !=0) { + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES (11, '" . $CreditNo . "', '" . $SQLCreditDate . "', @@ -1903,8 +1903,8 @@ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting for the credit note could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - } - if ($_SESSION['CreditItems'.$identifier]->FreightCost !=0) { + } + if ($_SESSION['CreditItems'.$identifier]->FreightCost !=0) { $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1946,7 +1946,10 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } - } /*end of if Sales and GL integrated */ + + EnsureGLEntriesBalance(11,$CreditNo,$db); + + } /*end of if Sales and GL integrated */ DB_Txn_Commit($db); Modified: trunk/SuppPaymentRun.php =================================================================== --- trunk/SuppPaymentRun.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/SuppPaymentRun.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -205,10 +205,11 @@ } /* end while there are suppliers to retrieve transactions for */ if ($SupplierID!=''){ - + /*All the payment processing is in the below file */ include('includes/PDFPaymentRun_PymtFooter.php'); - $ProcessResult = DB_Txn_Commit($db); + $ProcessResult = DB_Txn_Commit($db); + if (DB_error_no($db) !=0) { $title = _('Payment Processing - Problem Report') . '.... '; include('includes/header.inc'); @@ -228,7 +229,7 @@ } - $pdf->OutputD($_SESSION['DatabaseName'] . '_Payment_Run_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputD($_SESSION['DatabaseName'] . '_Payment_Run_' . Date('Y-m-d_Hms') . '.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit */ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/doc/Change.log 2011-11-12 09:42:34 UTC (rev 4744) @@ -1,9 +1,13 @@ webERP Change Log +12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines +12/11/11 Phil: Removed old Numbers to words class code - this code was not in keeping with the rest of the system and not PHP 5 compatible anyway. Replaced with a much simpler function. This code is only used for pre-printed cheques - so it is in that script only. The new function may not effective for other languages but will be easily adapted as needed. The PrintCheque.php script needs to be modified specifically for the business stationery. +10/11/11 Phil: added a function in includes/SQL_CommonFunctions.inc EnsureGLTransBalance that looks at the gltrans entries for a given transaction type and type number and if the total is not zero and less than 0.05 it fudges the largest gltrans record to make the gltrans balance in total - added to ConfirmDispatch_Invoice.php Credit_Invoice.php SelectCreditItems.php CounterSales.php Payments.php CustomerReceipt.php 10/11/11 Phil: includes/DateFunctions.inc fixed GetPeriod function to create new period when just one month ahead of last period - worried about this can't see how it could have been like this so long without a bug report? 10/11/11 Phil: includes/LanguageSetup.php now sets LC_NUMERIC locale category after LC_ALL to ensure SQL compliant calculations 8/11/11 Phil: includes/GetConfig.php no longer casts the VersionNumber to a double - issue highlighted by Tim 8/11/11 Felix Lim: includes/InputSerialItems.php and InputSerialItemsKeyed.php now sends $identifier +8/11/11 Phil: CustomerReceipt.php now shows entries made with decimal places of the currency being entered 8/11/11 Phil: fixed bugs reported by Ron Wong and Don SelectSupplier.php sql error missed "s" off suppliers and CustomerReceipt.php - had not populated new class variable (property) of CurrDecimalPlaces 6/11/11 Release 4.06RC1 Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/DefinePOClass.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -146,7 +146,7 @@ /* Checks if there have been deliveries or invoiced entered against any of the line items */ if (count($this->LineItems)>0){ foreach ($this->LineItems as $OrderedItems) { - if ($OrderedItems->QtyReceived !=0 OR $OrderedItems->QtyInvoiced !=0){ + if ($OrderedItems->QtyReceived !=0 OR $OrderedItems->QtyInv !=0){ return 1; } } @@ -167,7 +167,9 @@ function Order_Value() { $TotalValue=0; foreach ($this->LineItems as $OrderedItems) { - $TotalValue += ($OrderedItems->Price)*($OrderedItems->Quantity); + if ($OrderedItems->Deleted = False){ + $TotalValue += ($OrderedItems->Price)*($OrderedItems->Quantity); + } } return $TotalValue; } Modified: trunk/includes/DefinePaymentClass.php =================================================================== --- trunk/includes/DefinePaymentClass.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/DefinePaymentClass.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -41,10 +41,23 @@ } - function Add_To_GLAnalysis($Amount, $Narrative, $GLCode, $GLActName, $tag, $cheque){ + function Add_To_GLAnalysis($Amount, + $Narrative, + $GLCode, + $GLActName, + $Tag, + $Cheque){ + if (isset($GLCode) AND $Amount!=0){ - $this->GLItems[$this->GLItemCounter] = new PaymentGLAnalysis($Amount, $Narrative, $this->GLItemCounter, $GLCode, $GLActName, $tag, $cheque); + $this->GLItems[$this->GLItemCounter] = new PaymentGLAnalysis($Amount, + $Narrative, + $this->GLItemCounter, + $GLCode, + $GLActName, + $Tag, + $Cheque); $this->GLItemCounter++; + $this->Amount += $Amount; Return 1; } Return 0; @@ -63,10 +76,16 @@ var $GLCode; var $GLActName; var $ID; - var $tag; - var $cheque; + var $Tag; + var $Cheque; - function PaymentGLAnalysis ($Amt, $Narr, $id, $GLCode, $GLActName, $tag, $cheque){ + function PaymentGLAnalysis ($Amt, + $Narr, + $id, + $GLCode, + $GLActName, + $Tag, + $Cheque){ /* Constructor function to add a new PaymentGLAnalysis object with passed params */ $this->Amount =$Amt; @@ -74,8 +93,8 @@ $this->GLCode = $GLCode; $this->GLActName = $GLActName; $this->ID = $id; - $this->tag = $tag; - $this->cheque = $cheque; + $this->Tag = $Tag; + $this->Cheque = $Cheque; } } Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/MiscFunctions.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -238,7 +238,6 @@ }//wikiLink - // Lindsay debug stuff function LogBackTrace( $dest = 0 ) { error_log( "***BEGIN STACK BACKTRACE***", $dest ); @@ -334,4 +333,6 @@ global $ThousandsSeparator; return str_replace($DecimalPoint,'.',str_replace($ThousandsSeparator,'',trim($Number))); } -?> + + +?> \ No newline at end of file Modified: trunk/includes/PDFPaymentRun_PymtFooter.php =================================================================== --- trunk/includes/PDFPaymentRun_PymtFooter.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/PDFPaymentRun_PymtFooter.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -10,14 +10,14 @@ $TotalPayments += $AccumBalance; $TotalAccumDiffOnExch += $AccumDiffOnExch; -$LeftOvers = $pdf->addTextWrap(340,$YPos,60,$FontSize,locale_number_format($AccumBalance,2), 'right'); -$LeftOvers = $pdf->addTextWrap(405,$YPos,60,$FontSize,locale_number_format($AccumDiffOnExch,2), 'right'); +$LeftOvers = $pdf->addTextWrap(340,$YPos,60,$FontSize,locale_number_format($AccumBalance,$CurrDecimalPlaces), 'right'); +$LeftOvers = $pdf->addTextWrap(405,$YPos,60,$FontSize,locale_number_format($AccumDiffOnExch,$CurrDecimalPlaces), 'right'); if (isset($_POST['PrintPDFAndProcess'])){ - if (is_numeric($_POST['Ref'])) { - $PaytReference = $_POST['Ref'] + $RefCounter; + if (is_numeric(filter_number_format($_POST['Ref']))) { + $PaytReference = filter_number_format($_POST['Ref']) + $RefCounter; } else { $PaytReference = $_POST['Ref'] . ($RefCounter + 1); } @@ -36,8 +36,8 @@ rate, ovamount, diffonexch, - alloc) "; - $SQL = $SQL . "VALUES (22, + alloc) + VALUES (22, '" . $SuppPaymentNo . "', '" . $PaytReference . "', '" . $SupplierID . "', @@ -45,18 +45,20 @@ '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', '" . date('Y-m-d H-i-s') . "', 1, - '" . $_POST['ExRate'] . "', + '" . filter_number_format($_POST['ExRate']) . "', '" . -$AccumBalance . "', '" . -$AccumDiffOnExch . "', '" . -$AccumBalance . "')"; + $ProcessResult = DB_query($SQL,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Payment Processing - Problem Report'); include('header.inc'); prnMsg(_('None of the payments will be processed because the payment record for') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo "<BR><A HREF='$rootpath/index.php'>" . _("Back to the menu") . "</A>"; + echo '<br> + <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - prnMsg(_("The SQL that failed was") . ' ' . $SQL,'error'); + prnMsg(_('The SQL that failed was') . ' ' . $SQL,'error'); } $ProcessResult = DB_Txn_Rollback($db); include('footer.inc'); @@ -84,7 +86,7 @@ $title = _('Payment Processing - Problem Report') . '.... '; include('header.inc'); prnMsg(_('None of the payments will be processed since an allocation record for') . $SupplierName . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo '<BR><A HREF="' . $rootpath . '/index.php">' . _('Back to the menu') . '</A>'; + echo '<br><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . $SQL,'error'); } @@ -104,7 +106,7 @@ amount) "; $SQL = $SQL . "VALUES ( " . $_POST['BankAccount'] . ", '" . $PaytReference . " " . $SupplierID . "', - " . $_POST['ExRate'] . ", + " . filter_number_format($_POST['ExRate']) . ", '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', '" . $_POST['PaytType'] . "', " . -$AccumBalance . ")"; @@ -113,7 +115,8 @@ $title = _('Payment Processing - Problem Report'); include('header.inc'); prnMsg(_('None of the payments will be processed because the bank account payment record for') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo "<BR><A HREF='$rootpath/index.php'>" . _("Back to the menu") . "</A>"; + echo '<br /> + <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . ' ' . $SQL,'error'); } @@ -142,16 +145,17 @@ '" . $PeriodNo . "', '" . $_POST['BankAccount'] . "', '" . $SupplierID . " - " . $SupplierName . ' ' . _('payment run on') . ' ' . Date($_SESSION['DefaultDateFormat']) . ' - ' . $PaytReference . "', - '" . (-$AccumBalance/ $_POST['ExRate']) . "')"; + '" . (-$AccumBalance/ filter_number_format($_POST['ExRate'])) . "')"; $ProcessResult = DB_query($SQL,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Payment Processing') . ' - ' . _('Problem Report') . '.... '; include('header.inc'); prnMsg(_('None of the payments will be processed since the general ledger posting for the payment to') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo "<BR><A HREF='$rootpath/index.php'>" . _('Back to the menu') . '</A>'; + echo '<br /> + <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - prnMsg(_('The SQL that failed was') . ':<BR>' . $SQL, 'error'); + prnMsg(_('The SQL that failed was') . ':<br />' . $SQL, 'error'); } $ProcessResult = DB_Txn_Rollback($db); include('footer.inc'); @@ -173,19 +177,18 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['creditorsact'] . "', '" . $SupplierID . ' - ' . $SupplierName . ' ' . _('payment run on') . ' ' . Date($_SESSION['DefaultDateFormat']) . ' - ' . $PaytReference . "', - '" . ($AccumBalance/ $_POST['ExRate'] + $AccumDiffOnExch) . "')"; + '" . ($AccumBalance/ filter_number_format($_POST['ExRate']) + $AccumDiffOnExch) . "')"; $ProcessResult = DB_query($SQL,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Payment Processing - Problem Report'); include('header.inc'); - echo '<BR>' . _('None of the payments will be processed since the general ledger posting for the payment to') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db); - echo "<BR><A HREF='$rootpath/index.php'>" . _('Back to the menu') . '</A>'; + prnMsg(_('None of the payments will be processed since the general ledger posting for the payment to') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . ':<BR>' . $SQL,'error'); } $ProcessResult = DB_Txn_Rollback($db); - include('footer.inc'); exit; } @@ -193,12 +196,12 @@ /*Do the GL trans for the exch diff */ if ($AccumDiffOnExch != 0){ $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount ) + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES (22, '" . $SuppPaymentNo . "', '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', @@ -212,7 +215,7 @@ $title = _('Payment Processing - Problem Report'); include('header.inc'); prnMsg(_('None of the payments will be processed since the general ledger posting for the exchange difference on') . ' ' . $SupplierName . ' ' . _('could not be inserted because') .' - ' . DB_error_msg($db),'error'); - echo "<br /><a href='$rootpath/index.php'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was: ') . '<br />' . $SQL,'error'); } @@ -221,6 +224,7 @@ exit; } } + EnsureGLEntriesBalance(22,$SuppPaymentNo,$db); } /*end if GL linked to creditors */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-10 09:31:03
|
Revision: 4743 http://web-erp.svn.sourceforge.net/web-erp/?rev=4743&view=rev Author: daintree Date: 2011-11-10 09:30:52 +0000 (Thu, 10 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/GLTrialBalance.php trunk/PO_Items.php trunk/Z_DescribeTable.php trunk/doc/Change.log trunk/includes/DateFunctions.inc trunk/includes/LanguageSetup.php trunk/includes/PDFTransPageHeader.inc trunk/includes/SQL_CommonFunctions.inc Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/ConfirmDispatch_Invoice.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -225,7 +225,7 @@ $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; } } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items']->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyInv)){ - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']); + $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); } foreach ($Itm->Taxes as $TaxLine) { if (isset($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ @@ -395,7 +395,7 @@ echo '</tr>'; if (mb_strlen($LnItm->Narrative)>1){ $Narrative=str_replace('\r\n','<br />', $LnItm->Narrative); - echo $RowStarter . '<td colspan=12>' . stripslashes($Narrative) . '</td></tr>'; + echo $RowStarter . '<td colspan="12">' . stripslashes($Narrative) . '</td></tr>'; } }//end foreach ($line) @@ -523,7 +523,7 @@ /* round the totals to avoid silly entries */ -$TaxTotal = round($TaxTotal,2); +$TaxTotal = round($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces); $_SESSION['Items']->total = round($_SESSION['Items']->total,$_SESSION['Items']->CurrDecimalPlaces); $_POST['ChargeFreightCost'] = round($_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces); @@ -770,9 +770,9 @@ '" . $TaxTotal . "', '" . filter_number_format($_POST['ChargeFreightCost']) . "', '" . $_SESSION['CurrencyRate'] . "', - '" . DB_escape_string($_POST['InvoiceText']) . "', + '" . $_POST['InvoiceText'] . "', '" . $_SESSION['Items']->ShipVia . "', - '" . DB_escape_string($_POST['Consignment']) . "' )"; + '" . $_POST['Consignment'] . "' )"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction record could not be inserted because'); $DbgMsg = _('The following SQL to insert the debtor transaction record was used'); @@ -829,31 +829,30 @@ if (($OrderLine->Quantity - $OrderLine->QtyDispatched)>0){ - $SQL = "INSERT INTO orderdeliverydifferenceslog ( orderno, + $SQL = "INSERT INTO orderdeliverydifferenceslog (orderno, invoiceno, stockid, quantitydiff, debtorno, branch, - can_or_bo ) + can_or_bo) VALUES ( '" . $_SESSION['ProcessingOrder'] . "', '" . $InvoiceNo . "', '" . $OrderLine->StockID . "', - '" . $OrderLine->Quantity - $OrderLine->QtyDispatched . "', + '" . ($OrderLine->Quantity - $OrderLine->QtyDispatched) . "', '" . $_SESSION['Items']->DebtorNo . "', '" . $_SESSION['Items']->Branch . "', 'CAN')"; - + $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The order delivery differences log record could not be inserted because'); $DbgMsg = _('The following SQL to insert the order delivery differences record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } + } elseif (($OrderLine->Quantity - $OrderLine->QtyDispatched)>0 + AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items']->DeliveryDate,'d')>0) { - - } elseif (($OrderLine->Quantity - $OrderLine->QtyDispatched) >0 AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items']->DeliveryDate,'d') > 0) { - /*The order is being short delivered after the due date - need to insert a delivery differnce log */ $SQL = "INSERT INTO orderdeliverydifferenceslog (orderno, @@ -919,9 +918,9 @@ /* Need to get the current location quantity will need it later for the stock movement */ $SQL="SELECT locstock.quantity - FROM locstock - WHERE locstock.stockid='" . $OrderLine->StockID . "' - AND loccode= '" . $_SESSION['Items']->Location . "'"; + FROM locstock + WHERE locstock.stockid='" . $OrderLine->StockID . "' + AND loccode= '" . $_SESSION['Items']->Location . "'"; $ErrMsg = _('WARNING') . ': ' . _('Could not retrieve current location stock'); $Result = DB_query($SQL, $db, $ErrMsg); @@ -933,7 +932,8 @@ $QtyOnHandPrior = 0; } - $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " + $SQL = "UPDATE locstock + SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " WHERE locstock.stockid = '" . $OrderLine->StockID . "' AND loccode = '" . $_SESSION['Items']->Location . "'"; @@ -949,10 +949,9 @@ $SQL = "SELECT bom.component, bom.quantity, stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost AS standard - FROM bom, - stockmaster - WHERE bom.component=stockmaster.stockid - AND bom.parent='" . $OrderLine->StockID . "' + FROM bom INNER JOIN stockmaster + ON bom.component=stockmaster.stockid + WHERE bom.parent='" . $OrderLine->StockID . "' AND bom.effectiveto >= '" . Date('Y-m-d') . "' AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; @@ -1031,7 +1030,7 @@ } /* end of its an assembly */ // Insert stock movements - with unit cost - $LocalCurrencyPrice = ($OrderLine->Price / $_SESSION['CurrencyRate']); + $LocalCurrencyPrice = round(($OrderLine->Price / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']); if (empty($OrderLine->StandardCost)) { $OrderLine->StandardCost=0; @@ -1205,10 +1204,10 @@ if ($myrow[0]>0){ /*Update the existing record that already exists */ - $SQL = "UPDATE salesanalysis SET amt=amt+" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . ", - cost=cost+" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . ", + $SQL = "UPDATE salesanalysis SET amt=amt+" . round(($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . ", + cost=cost+" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . ", qty=qty +" . $OrderLine->QtyDispatched . ", - disc=disc+" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . " + disc=disc+" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . " WHERE salesanalysis.area='" . $myrow[5] . "' AND salesanalysis.salesperson='" . $myrow[8] . "' AND typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' @@ -1236,12 +1235,12 @@ stkcategory ) SELECT '" . $_SESSION['Items']->DefaultSalesType . "', '" . $PeriodNo . "', - '" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', - '" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "', + '" . round(($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', + '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $_SESSION['Items']->DebtorNo . "', '" . $_SESSION['Items']->Branch . "', '" . ($OrderLine->QtyDispatched) . "', - '" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', + '" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $OrderLine->StockID . "', custbranch.area, 1, @@ -1278,7 +1277,7 @@ '" . $PeriodNo . "', '" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db) . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "')"; + '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1301,7 +1300,7 @@ '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . (-$OrderLine->StandardCost * $OrderLine->QtyDispatched) . "')"; + '" . round((-$OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side of the cost of sales GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1328,7 +1327,7 @@ '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', - '" . (-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales GL posting could not be inserted because'); $DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used'); @@ -1350,7 +1349,7 @@ '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', - '" . ($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']) . "')"; + '" . round(($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales discount GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1462,7 +1461,7 @@ '" . $PeriodNo . "', '" . $DisposalRow['disposalact'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', - '" . (-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal proceeds GL posting could not be inserted because'); $DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used'); @@ -1490,14 +1489,14 @@ '" . $PeriodNo . "', '" . Date('Y-m-d') . "', 'disposal', - '" . ($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "', + '" . round(($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $DefaultDispatchDate . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The fixed asset transaction could not be inserted because'); $DbgMsg = '<br />' ._('The following SQL to insert the fixed asset transaction record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); $SQL = "UPDATE fixedassets - SET disposalproceeds ='" . ($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "', + SET disposalproceeds ='" . round(($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', disposaldate ='" . $DefaultDispatchDate . "' WHERE assetid ='" . $AssetNumber . "'"; @@ -1528,7 +1527,7 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', '" . $_SESSION['Items']->DebtorNo . "', - '" . (($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']) . "')"; + '" . round((($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the total debtors control GLTrans record was used'); @@ -1553,7 +1552,7 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['freightact'] . "', '" . $_SESSION['Items']->DebtorNo . "', - '" . (-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1575,13 +1574,14 @@ '" . $PeriodNo . "', '" . $TaxGLCodes[$TaxAuthID] . "', '" . $_SESSION['Items']->DebtorNo . "', - '" . (-$TaxAmount/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$TaxAmount/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } + EnsureGLEntriesBalance(10,$InvoiceNo,$db); } /*end of if Sales and GL integrated */ DB_Txn_Commit($db); @@ -1617,36 +1617,39 @@ $_POST['InvoiceText']=''; } $j++; - echo '<table class=selection><tr> - <td>' ._('Date On Invoice'). ':</td> - <td><input tabindex='.$j.' type="text" maxlength="10" size="15" - name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" - alt="'.$_SESSION['DefaultDateFormat'].'" class="date"></td> - </tr>'; + echo '<table class="selection"> + <tr> + <td>' ._('Date On Invoice'). ':</td> + <td><input tabindex='.$j.' type="text" maxlength="10" size="15" name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" alt="'.$_SESSION['DefaultDateFormat'].'" class="date"></td> + </tr>'; $j++; echo '<tr> - <td>' . _('Consignment Note Ref'). ':</td> - <td><input tabindex='.$j.' type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '"></td> - </tr>'; + <td>' . _('Consignment Note Ref'). ':</td> + <td><input tabindex='.$j.' type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '"></td> + </tr>'; $j++; echo '<tr> - <td>'._('Action For Balance'). ':</td> - <td><select tabindex='.$j.' name="BOPolicy"><option selected value="BO">'._('Automatically put balance on back order').'</option><option value="CAN">'._('Cancel any quantities not delivered').'</option></select></td> - </tr>'; + <td>'._('Action For Balance'). ':</td> + <td><select tabindex='.$j.' name="BOPolicy"><option selected value="BO">'._('Automatically put balance on back order').'</option><option value="CAN">'._('Cancel any quantities not delivered').'</option></select></td> + </tr>'; $j++; echo '<tr> - <td>' ._('Invoice Text'). ':</td> - <td><textarea tabindex="'.$j.'" name="InvoiceText" cols="31" rows="5">' . reverse_escape($_POST['InvoiceText']) . '</textarea></td> - </tr>'; - + <td>' ._('Invoice Text'). ':</td> + <td><textarea tabindex="'.$j.'" name="InvoiceText" cols="31" rows="5">' . reverse_escape($_POST['InvoiceText']) . '</textarea></td> + </tr>'; + $j++; echo '</table> - <br /><div class="centre"> - <input type=submit tabindex='.$j.' name="Update" value=' . _('Update'). '><br />'; + <br /> + <div class="centre"> + <input type="submit" tabindex="'.$j.'" name="Update" value="' . _('Update'). '" /> + <br />'; $j++; - echo '<br /><input type=submit tabindex='.$j.' name="ProcessInvoice" value="'._('Process Invoice').'"</div>'; - echo '<input type=hidden name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '">'; + echo '<br /> + <input type="submit" tabindex="'.$j.'" name="ProcessInvoice" value="'._('Process Invoice').'" /> + </div> + <input type="hidden" name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '" />'; } echo '</form>'; Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/CounterSales.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -239,31 +239,31 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decmimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decmimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } else if (mb_strlen($_POST['StockCode'])>0){ @@ -273,59 +273,59 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } else { if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } @@ -465,6 +465,8 @@ prnMsg(_('Phantom assemblies cannot be sold, these items exist only as bills of materials used in other manufactured items. The following item has not been added to the order:') . ' ' . $NewItem, 'warn'); } else if ($myrow['controlled']==1){ prnMsg(_('The system does not currently cater for counter sales of lot controlled or serialised items'),'warn'); + } else if ($NewItemQty<=0) { + prnMsg(_('Only items entered with a positive quantity can be added to the sale'),'warn'); } else { /*Its not a kit set item*/ include('includes/SelectOrderItems_IntoCart.inc'); $_SESSION['Items'.$identifier]->GetTaxes(($_SESSION['Items'.$identifier]->LineCounter - 1)); Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/GLTrialBalance.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -40,7 +40,8 @@ $DefaultFromDate = Date ('Y-m-d', Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y')-1)); $FromDate = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y')-1)); } - $period=GetPeriod($FromDate, $db); + /*GetPeriod function creates periods if need be the return value is not used */ + $NotUsedPeriodNo = GetPeriod($FromDate, $db); /*Show a form to allow input of criteria for TB to show */ echo '<table class="selection"> @@ -75,14 +76,7 @@ echo '</select></td> </tr>'; if (!isset($_POST['ToPeriod']) OR $_POST['ToPeriod']==''){ - $lastDate = date('Y-m-d',mktime(0,0,0,Date('m')+1,0,Date('Y'))); - $sql = "SELECT periodno - FROM periods - WHERE lastdate_in_period = '" . $lastDate . "'"; - $MaxPrd = DB_query($sql,$db); - $MaxPrdrow = DB_fetch_row($MaxPrd); - $DefaultToPeriod = (int) ($MaxPrdrow[0]); - + $DefaultToPeriod = GetPeriod(date($_SESSION['DefaultDateFormat'],mktime(0,0,0,Date('m')+1,0,Date('Y'))),$db); } else { $DefaultToPeriod = $_POST['ToPeriod']; } Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/PO_Items.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -166,22 +166,22 @@ '" . $_SESSION['PO'.$identifier]->Initiator . "', '" . $_SESSION['PO'.$identifier]->RequisitionNo . "', '" . $_SESSION['PO'.$identifier]->Location . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd1) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd2) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd3) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd4) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd5) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd6) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->Tel) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd1) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd2) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd3) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd4) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd5) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd6) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SupplierContact) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppTel). "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->Contact) . "', + '" . $_SESSION['PO'.$identifier]->DelAdd1 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd2 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd3 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd4 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd5 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd6 . "', + '" . $_SESSION['PO'.$identifier]->Tel . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd4 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd5 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd6 . "', + '" . $_SESSION['PO'.$identifier]->SupplierContact . "', + '" . $_SESSION['PO'.$identifier]->SuppTel. "', + '" . $_SESSION['PO'.$identifier]->Contact . "', '" . $_SESSION['PO'.$identifier]->Version . "', '" . Date('Y-m-d') . "', '" . $_SESSION['PO'.$identifier]->DeliveryBy . "', @@ -254,7 +254,7 @@ /*Update the purchase order header with any changes */ $sql = "UPDATE purchorders SET supplierno = '" . $_SESSION['PO'.$identifier]->SupplierID . "' , - comments='" . DB_escape_string($_SESSION['PO'.$identifier]->Comments) . "', + comments='" . $_SESSION['PO'.$identifier]->Comments . "', rate='" . $_SESSION['PO'.$identifier]->ExRate . "', initiator='" . $_SESSION['PO'.$identifier]->Initiator . "', requisitionno= '" . $_SESSION['PO'.$identifier]->RequisitionNo . "', @@ -263,26 +263,26 @@ deliverydate='" . FormatDateForSQL($_SESSION['PO'.$identifier]->DeliveryDate) . "', revised= '" . Date('Y-m-d') . "', intostocklocation='" . $_SESSION['PO'.$identifier]->Location . "', - deladd1='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd1) . "', - deladd2='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd2) . "', - deladd3='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd3) . "', - deladd4='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd4) . "', - deladd5='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd5) . "', - deladd6='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd6) . "', - deladd6='" . DB_escape_string($_SESSION['PO'.$identifier]->Tel) . "', - suppdeladdress1='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd1) . "', - suppdeladdress2='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd2) . "', - suppdeladdress3='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd3) . "', - suppdeladdress4='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd4) . "', - suppdeladdress5='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd5) . "', - suppdeladdress6='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd6) . "', - suppliercontact='" . DB_escape_string($_SESSION['PO'.$identifier]->SupplierContact) . "', - supptel='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppTel) . "', - contact='" . DB_escape_string($_SESSION['PO'.$identifier]->Contact) . "', + deladd1='" . $_SESSION['PO'.$identifier]->DelAdd1 . "', + deladd2='" . $_SESSION['PO'.$identifier]->DelAdd2 . "', + deladd3='" . $_SESSION['PO'.$identifier]->DelAdd3 . "', + deladd4='" . $_SESSION['PO'.$identifier]->DelAdd4 . "', + deladd5='" . $_SESSION['PO'.$identifier]->DelAdd5 . "', + deladd6='" . $_SESSION['PO'.$identifier]->DelAdd6 . "', + deladd6='" . $_SESSION['PO'.$identifier]->Tel . "', + suppdeladdress1='" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', + suppdeladdress2='" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', + suppdeladdress3='" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', + suppdeladdress4='" . $_SESSION['PO'.$identifier]->SuppDelAdd4 . "', + suppdeladdress5='" . $_SESSION['PO'.$identifier]->SuppDelAdd5 . "', + suppdeladdress6='" . $_SESSION['PO'.$identifier]->SuppDelAdd6 . "', + suppliercontact='" . $_SESSION['PO'.$identifier]->SupplierContact . "', + supptel='" . $_SESSION['PO'.$identifier]->SuppTel . "', + contact='" . $_SESSION['PO'.$identifier]->Contact . "', paymentterms='" . $_SESSION['PO'.$identifier]->PaymentTerms . "', allowprint='" . $_SESSION['PO'.$identifier]->AllowPrintPO . "', status = '" . $_SESSION['PO'.$identifier]->Status . "', - stat_comment = '" . DB_escape_string($_SESSION['PO'.$identifier]->StatusComments) . "' + stat_comment = '" . $_SESSION['PO'.$identifier]->StatusComments . "' WHERE orderno = '" . $_SESSION['PO'.$identifier]->OrderNo ."'"; $ErrMsg = _('The purchase order could not be updated because'); Modified: trunk/Z_DescribeTable.php =================================================================== --- trunk/Z_DescribeTable.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/Z_DescribeTable.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -//$PageSecurity = 11; - include('includes/session.inc'); $title = _('Database table details'); include('includes/header.inc'); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/doc/Change.log 2011-11-10 09:30:52 UTC (rev 4743) @@ -1,5 +1,7 @@ webERP Change Log +10/11/11 Phil: includes/DateFunctions.inc fixed GetPeriod function to create new period when just one month ahead of last period - worried about this can't see how it could have been like this so long without a bug report? +10/11/11 Phil: includes/LanguageSetup.php now sets LC_NUMERIC locale category after LC_ALL to ensure SQL compliant calculations 8/11/11 Phil: includes/GetConfig.php no longer casts the VersionNumber to a double - issue highlighted by Tim 8/11/11 Felix Lim: includes/InputSerialItems.php and InputSerialItemsKeyed.php now sends $identifier 8/11/11 Phil: fixed bugs reported by Ron Wong and Don SelectSupplier.php sql error missed "s" off suppliers and CustomerReceipt.php - had not populated new class variable (property) of CurrDecimalPlaces Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/DateFunctions.inc 2011-11-10 09:30:52 UTC (rev 4743) @@ -858,6 +858,7 @@ } elseif (mb_strpos ($TransDate,'.')) { $Date_Array = explode('.',$TransDate); } + if (($_SESSION['DefaultDateFormat']=='d/m/Y') or ($_SESSION['DefaultDateFormat']=='d.m.Y')){ $TransDate = mktime(0,0,0,$Date_Array[1],$Date_Array[0],$Date_Array[2]); } elseif ($_SESSION['DefaultDateFormat']=='m/d/Y'){ @@ -879,6 +880,7 @@ $sql = "SELECT MAX(lastdate_in_period), MAX(periodno) from periods"; $result = DB_query($sql, $db); $myrow=DB_fetch_row($result); + if (is_null($myrow[0])){ $InsertFirstPeriodResult = DB_query("INSERT INTO periods VALUES (0,'" . Date('Y-m-d',mktime(0,0,0,Date('m')+1,0,Date('Y'))) . "')",$db,_('Could not insert first period')); $InsertFirstPeriodResult = DB_query("INSERT INTO periods VALUES (1,'" . Date('Y-m-d',mktime(0,0,0,Date('m')+2,0,Date('Y'))) . "')",$db,_('Could not insert second period')); @@ -886,7 +888,7 @@ $LastPeriodEnd = mktime(0,0,0,Date('m')+2,0,Date('Y')); } else { $Date_Array = explode('-', $myrow[0]); - $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+2,0,(int)$Date_Array[0]); + $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+1,0,(int)$Date_Array[0]); $LastPeriod = $myrow[1]; } /* Find the unix timestamp of the first period end date in periods table */ @@ -900,20 +902,20 @@ /* If the period number doesn't exist */ if (!PeriodExists($TransDate, $db)) { /* if the transaction is after the last period */ + if ($TransDate > $LastPeriodEnd) { + $PeriodEnd = mktime(0,0,0,Date('m', $TransDate)+1, 0, Date('Y', $TransDate)); - $Period = $LastPeriod + 1; + while ($PeriodEnd >= $LastPeriodEnd) { - CreatePeriod($Period, $LastPeriodEnd, $db); - $Period++; if (Date('m', $LastPeriodEnd)<=13) { $LastPeriodEnd = mktime(0,0,0,Date('m', $LastPeriodEnd)+2, 0, Date('Y', $LastPeriodEnd)); } else { $LastPeriodEnd = mktime(0,0,0,2, 0, Date('Y', $LastPeriodEnd)+1); } + $LastPeriod++; + CreatePeriod($LastPeriod, $LastPeriodEnd, $db); } - $PeriodEnd = mktime(0,0,0,Date('m', $LastPeriodEnd)+1, 0, Date('Y', $LastPeriodEnd)); - CreatePeriod($Period, $PeriodEnd, $db); } else { /* The transaction is before the first period */ $PeriodEnd = mktime(0,0,0,Date('m', $TransDate), 0, Date('Y', $TransDate)); Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/LanguageSetup.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -63,8 +63,9 @@ include('includes/LanguagesArray.php'); } else { include('includes/LanguagesArray.php'); - $LocaleSet = setlocale (LC_NUMERIC, 'en_US','english-us'); + $LocaleSet = setlocale (LC_ALL, $_SESSION['Language'],$LanguagesArray[$_SESSION['Language']]['WindowsLocale']); + $LocaleSet = setlocale (LC_NUMERIC, 'C','en_GB.utf8','en_GB','en_US','english-us'); if (defined('LC_MESSAGES')){ //it's a unix/linux server $LocaleSet = setlocale (LC_MESSAGES, $_SESSION['Language']); @@ -73,6 +74,7 @@ if ($_SESSION['Language']=='tr_TR.utf8') { $Locale = setlocale(LC_CTYPE, 'C'); } + // possibly even if locale fails the language will still switch by using Language instead of locale variable putenv('LANG=' . $_SESSION['Language']); putenv('LANGUAGE=' . $_SESSION['Language']); Modified: trunk/includes/PDFTransPageHeader.inc =================================================================== --- trunk/includes/PDFTransPageHeader.inc 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/PDFTransPageHeader.inc 2011-11-10 09:30:52 UTC (rev 4743) @@ -180,14 +180,14 @@ /*Set up headings */ $FontSize=10; $pdf->addText($Left_Margin + 2, $YPos, $FontSize, _('Customer Tax Ref') . ':'); -$pdf->addText($Left_Margin+80, $YPos, $FontSize, $myrow['taxref']); +$pdf->addText($Left_Margin+100, $YPos, $FontSize, $myrow['taxref']); /*Print a vertical line */ $pdf->line($Left_Margin+248, $YPos-10+$line_height+3,$Left_Margin+248, $YPos - 18); if ($InvOrCredit=='Invoice'){ $pdf->addText($Left_Margin + 252, $YPos, $FontSize, _('Customer Order Ref.') . ':'); - $pdf->addText($Left_Margin+340, $YPos, $FontSize, $myrow['customerref']); + $pdf->addText($Left_Margin+370, $YPos, $FontSize, $myrow['customerref']); } /*Print a vertical line */ $pdf->line($Left_Margin+450, $YPos+$line_height-7,$Left_Margin+450,$YPos-18); Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/SQL_CommonFunctions.inc 2011-11-10 09:30:52 UTC (rev 4743) @@ -330,4 +330,35 @@ } +/*Ensures general ledger entries balance for a given transaction */ +function EnsureGLEntriesBalance ($TransType, $TransTypeNo, $db) { + + $result = DB_query("SELECT SUM(amount) + FROM gltrans + WHERE type = '" . $TransType . "' + AND typeno = '" . $TransTypeNo . "'", + $db); + $myrow = DB_fetch_row($result); + $Difference = $myrow[0]; + if (abs($Difference)!=0){ + if (abs($Difference)>0.1){ + prnMsg(_('The general ledger entries created do not balance. See your system administrator'),'error'); + } else { + $result = DB_query("SELECT counterindex, + MAX(amount) + FROM gltrans + WHERE type = '" . $TransType . "' + AND typeno = '" . $TransTypeNo . "' + GROUP BY counterindex", + $db); + $myrow = DB_fetch_array($result); + $TransToAmend = $myrow['counterindex']; + $result = DB_query("UPDATE gltrans SET amount = amount - " . $Difference . " + WHERE counterindex = '" . $TransToAmend . "'", + $db); + + } + } +} + ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-10 09:31:00
|
Revision: 4743 http://web-erp.svn.sourceforge.net/web-erp/?rev=4743&view=rev Author: daintree Date: 2011-11-10 09:30:52 +0000 (Thu, 10 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/GLTrialBalance.php trunk/PO_Items.php trunk/Z_DescribeTable.php trunk/doc/Change.log trunk/includes/DateFunctions.inc trunk/includes/LanguageSetup.php trunk/includes/PDFTransPageHeader.inc trunk/includes/SQL_CommonFunctions.inc Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/ConfirmDispatch_Invoice.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -225,7 +225,7 @@ $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; } } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items']->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyInv)){ - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']); + $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); } foreach ($Itm->Taxes as $TaxLine) { if (isset($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ @@ -395,7 +395,7 @@ echo '</tr>'; if (mb_strlen($LnItm->Narrative)>1){ $Narrative=str_replace('\r\n','<br />', $LnItm->Narrative); - echo $RowStarter . '<td colspan=12>' . stripslashes($Narrative) . '</td></tr>'; + echo $RowStarter . '<td colspan="12">' . stripslashes($Narrative) . '</td></tr>'; } }//end foreach ($line) @@ -523,7 +523,7 @@ /* round the totals to avoid silly entries */ -$TaxTotal = round($TaxTotal,2); +$TaxTotal = round($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces); $_SESSION['Items']->total = round($_SESSION['Items']->total,$_SESSION['Items']->CurrDecimalPlaces); $_POST['ChargeFreightCost'] = round($_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces); @@ -770,9 +770,9 @@ '" . $TaxTotal . "', '" . filter_number_format($_POST['ChargeFreightCost']) . "', '" . $_SESSION['CurrencyRate'] . "', - '" . DB_escape_string($_POST['InvoiceText']) . "', + '" . $_POST['InvoiceText'] . "', '" . $_SESSION['Items']->ShipVia . "', - '" . DB_escape_string($_POST['Consignment']) . "' )"; + '" . $_POST['Consignment'] . "' )"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction record could not be inserted because'); $DbgMsg = _('The following SQL to insert the debtor transaction record was used'); @@ -829,31 +829,30 @@ if (($OrderLine->Quantity - $OrderLine->QtyDispatched)>0){ - $SQL = "INSERT INTO orderdeliverydifferenceslog ( orderno, + $SQL = "INSERT INTO orderdeliverydifferenceslog (orderno, invoiceno, stockid, quantitydiff, debtorno, branch, - can_or_bo ) + can_or_bo) VALUES ( '" . $_SESSION['ProcessingOrder'] . "', '" . $InvoiceNo . "', '" . $OrderLine->StockID . "', - '" . $OrderLine->Quantity - $OrderLine->QtyDispatched . "', + '" . ($OrderLine->Quantity - $OrderLine->QtyDispatched) . "', '" . $_SESSION['Items']->DebtorNo . "', '" . $_SESSION['Items']->Branch . "', 'CAN')"; - + $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The order delivery differences log record could not be inserted because'); $DbgMsg = _('The following SQL to insert the order delivery differences record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } + } elseif (($OrderLine->Quantity - $OrderLine->QtyDispatched)>0 + AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items']->DeliveryDate,'d')>0) { - - } elseif (($OrderLine->Quantity - $OrderLine->QtyDispatched) >0 AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items']->DeliveryDate,'d') > 0) { - /*The order is being short delivered after the due date - need to insert a delivery differnce log */ $SQL = "INSERT INTO orderdeliverydifferenceslog (orderno, @@ -919,9 +918,9 @@ /* Need to get the current location quantity will need it later for the stock movement */ $SQL="SELECT locstock.quantity - FROM locstock - WHERE locstock.stockid='" . $OrderLine->StockID . "' - AND loccode= '" . $_SESSION['Items']->Location . "'"; + FROM locstock + WHERE locstock.stockid='" . $OrderLine->StockID . "' + AND loccode= '" . $_SESSION['Items']->Location . "'"; $ErrMsg = _('WARNING') . ': ' . _('Could not retrieve current location stock'); $Result = DB_query($SQL, $db, $ErrMsg); @@ -933,7 +932,8 @@ $QtyOnHandPrior = 0; } - $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " + $SQL = "UPDATE locstock + SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " WHERE locstock.stockid = '" . $OrderLine->StockID . "' AND loccode = '" . $_SESSION['Items']->Location . "'"; @@ -949,10 +949,9 @@ $SQL = "SELECT bom.component, bom.quantity, stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost AS standard - FROM bom, - stockmaster - WHERE bom.component=stockmaster.stockid - AND bom.parent='" . $OrderLine->StockID . "' + FROM bom INNER JOIN stockmaster + ON bom.component=stockmaster.stockid + WHERE bom.parent='" . $OrderLine->StockID . "' AND bom.effectiveto >= '" . Date('Y-m-d') . "' AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; @@ -1031,7 +1030,7 @@ } /* end of its an assembly */ // Insert stock movements - with unit cost - $LocalCurrencyPrice = ($OrderLine->Price / $_SESSION['CurrencyRate']); + $LocalCurrencyPrice = round(($OrderLine->Price / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']); if (empty($OrderLine->StandardCost)) { $OrderLine->StandardCost=0; @@ -1205,10 +1204,10 @@ if ($myrow[0]>0){ /*Update the existing record that already exists */ - $SQL = "UPDATE salesanalysis SET amt=amt+" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . ", - cost=cost+" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . ", + $SQL = "UPDATE salesanalysis SET amt=amt+" . round(($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . ", + cost=cost+" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . ", qty=qty +" . $OrderLine->QtyDispatched . ", - disc=disc+" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . " + disc=disc+" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . " WHERE salesanalysis.area='" . $myrow[5] . "' AND salesanalysis.salesperson='" . $myrow[8] . "' AND typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' @@ -1236,12 +1235,12 @@ stkcategory ) SELECT '" . $_SESSION['Items']->DefaultSalesType . "', '" . $PeriodNo . "', - '" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', - '" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "', + '" . round(($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', + '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $_SESSION['Items']->DebtorNo . "', '" . $_SESSION['Items']->Branch . "', '" . ($OrderLine->QtyDispatched) . "', - '" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', + '" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $OrderLine->StockID . "', custbranch.area, 1, @@ -1278,7 +1277,7 @@ '" . $PeriodNo . "', '" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db) . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "')"; + '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1301,7 +1300,7 @@ '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . (-$OrderLine->StandardCost * $OrderLine->QtyDispatched) . "')"; + '" . round((-$OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side of the cost of sales GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1328,7 +1327,7 @@ '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', - '" . (-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales GL posting could not be inserted because'); $DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used'); @@ -1350,7 +1349,7 @@ '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', - '" . ($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']) . "')"; + '" . round(($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales discount GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1462,7 +1461,7 @@ '" . $PeriodNo . "', '" . $DisposalRow['disposalact'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', - '" . (-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal proceeds GL posting could not be inserted because'); $DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used'); @@ -1490,14 +1489,14 @@ '" . $PeriodNo . "', '" . Date('Y-m-d') . "', 'disposal', - '" . ($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "', + '" . round(($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $DefaultDispatchDate . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The fixed asset transaction could not be inserted because'); $DbgMsg = '<br />' ._('The following SQL to insert the fixed asset transaction record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); $SQL = "UPDATE fixedassets - SET disposalproceeds ='" . ($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "', + SET disposalproceeds ='" . round(($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', disposaldate ='" . $DefaultDispatchDate . "' WHERE assetid ='" . $AssetNumber . "'"; @@ -1528,7 +1527,7 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', '" . $_SESSION['Items']->DebtorNo . "', - '" . (($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']) . "')"; + '" . round((($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the total debtors control GLTrans record was used'); @@ -1553,7 +1552,7 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['freightact'] . "', '" . $_SESSION['Items']->DebtorNo . "', - '" . (-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1575,13 +1574,14 @@ '" . $PeriodNo . "', '" . $TaxGLCodes[$TaxAuthID] . "', '" . $_SESSION['Items']->DebtorNo . "', - '" . (-$TaxAmount/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$TaxAmount/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } + EnsureGLEntriesBalance(10,$InvoiceNo,$db); } /*end of if Sales and GL integrated */ DB_Txn_Commit($db); @@ -1617,36 +1617,39 @@ $_POST['InvoiceText']=''; } $j++; - echo '<table class=selection><tr> - <td>' ._('Date On Invoice'). ':</td> - <td><input tabindex='.$j.' type="text" maxlength="10" size="15" - name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" - alt="'.$_SESSION['DefaultDateFormat'].'" class="date"></td> - </tr>'; + echo '<table class="selection"> + <tr> + <td>' ._('Date On Invoice'). ':</td> + <td><input tabindex='.$j.' type="text" maxlength="10" size="15" name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" alt="'.$_SESSION['DefaultDateFormat'].'" class="date"></td> + </tr>'; $j++; echo '<tr> - <td>' . _('Consignment Note Ref'). ':</td> - <td><input tabindex='.$j.' type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '"></td> - </tr>'; + <td>' . _('Consignment Note Ref'). ':</td> + <td><input tabindex='.$j.' type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '"></td> + </tr>'; $j++; echo '<tr> - <td>'._('Action For Balance'). ':</td> - <td><select tabindex='.$j.' name="BOPolicy"><option selected value="BO">'._('Automatically put balance on back order').'</option><option value="CAN">'._('Cancel any quantities not delivered').'</option></select></td> - </tr>'; + <td>'._('Action For Balance'). ':</td> + <td><select tabindex='.$j.' name="BOPolicy"><option selected value="BO">'._('Automatically put balance on back order').'</option><option value="CAN">'._('Cancel any quantities not delivered').'</option></select></td> + </tr>'; $j++; echo '<tr> - <td>' ._('Invoice Text'). ':</td> - <td><textarea tabindex="'.$j.'" name="InvoiceText" cols="31" rows="5">' . reverse_escape($_POST['InvoiceText']) . '</textarea></td> - </tr>'; - + <td>' ._('Invoice Text'). ':</td> + <td><textarea tabindex="'.$j.'" name="InvoiceText" cols="31" rows="5">' . reverse_escape($_POST['InvoiceText']) . '</textarea></td> + </tr>'; + $j++; echo '</table> - <br /><div class="centre"> - <input type=submit tabindex='.$j.' name="Update" value=' . _('Update'). '><br />'; + <br /> + <div class="centre"> + <input type="submit" tabindex="'.$j.'" name="Update" value="' . _('Update'). '" /> + <br />'; $j++; - echo '<br /><input type=submit tabindex='.$j.' name="ProcessInvoice" value="'._('Process Invoice').'"</div>'; - echo '<input type=hidden name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '">'; + echo '<br /> + <input type="submit" tabindex="'.$j.'" name="ProcessInvoice" value="'._('Process Invoice').'" /> + </div> + <input type="hidden" name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '" />'; } echo '</form>'; Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/CounterSales.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -239,31 +239,31 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decmimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decmimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } else if (mb_strlen($_POST['StockCode'])>0){ @@ -273,59 +273,59 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } else { if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } @@ -465,6 +465,8 @@ prnMsg(_('Phantom assemblies cannot be sold, these items exist only as bills of materials used in other manufactured items. The following item has not been added to the order:') . ' ' . $NewItem, 'warn'); } else if ($myrow['controlled']==1){ prnMsg(_('The system does not currently cater for counter sales of lot controlled or serialised items'),'warn'); + } else if ($NewItemQty<=0) { + prnMsg(_('Only items entered with a positive quantity can be added to the sale'),'warn'); } else { /*Its not a kit set item*/ include('includes/SelectOrderItems_IntoCart.inc'); $_SESSION['Items'.$identifier]->GetTaxes(($_SESSION['Items'.$identifier]->LineCounter - 1)); Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/GLTrialBalance.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -40,7 +40,8 @@ $DefaultFromDate = Date ('Y-m-d', Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y')-1)); $FromDate = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y')-1)); } - $period=GetPeriod($FromDate, $db); + /*GetPeriod function creates periods if need be the return value is not used */ + $NotUsedPeriodNo = GetPeriod($FromDate, $db); /*Show a form to allow input of criteria for TB to show */ echo '<table class="selection"> @@ -75,14 +76,7 @@ echo '</select></td> </tr>'; if (!isset($_POST['ToPeriod']) OR $_POST['ToPeriod']==''){ - $lastDate = date('Y-m-d',mktime(0,0,0,Date('m')+1,0,Date('Y'))); - $sql = "SELECT periodno - FROM periods - WHERE lastdate_in_period = '" . $lastDate . "'"; - $MaxPrd = DB_query($sql,$db); - $MaxPrdrow = DB_fetch_row($MaxPrd); - $DefaultToPeriod = (int) ($MaxPrdrow[0]); - + $DefaultToPeriod = GetPeriod(date($_SESSION['DefaultDateFormat'],mktime(0,0,0,Date('m')+1,0,Date('Y'))),$db); } else { $DefaultToPeriod = $_POST['ToPeriod']; } Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/PO_Items.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -166,22 +166,22 @@ '" . $_SESSION['PO'.$identifier]->Initiator . "', '" . $_SESSION['PO'.$identifier]->RequisitionNo . "', '" . $_SESSION['PO'.$identifier]->Location . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd1) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd2) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd3) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd4) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd5) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd6) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->Tel) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd1) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd2) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd3) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd4) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd5) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd6) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SupplierContact) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppTel). "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->Contact) . "', + '" . $_SESSION['PO'.$identifier]->DelAdd1 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd2 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd3 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd4 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd5 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd6 . "', + '" . $_SESSION['PO'.$identifier]->Tel . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd4 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd5 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd6 . "', + '" . $_SESSION['PO'.$identifier]->SupplierContact . "', + '" . $_SESSION['PO'.$identifier]->SuppTel. "', + '" . $_SESSION['PO'.$identifier]->Contact . "', '" . $_SESSION['PO'.$identifier]->Version . "', '" . Date('Y-m-d') . "', '" . $_SESSION['PO'.$identifier]->DeliveryBy . "', @@ -254,7 +254,7 @@ /*Update the purchase order header with any changes */ $sql = "UPDATE purchorders SET supplierno = '" . $_SESSION['PO'.$identifier]->SupplierID . "' , - comments='" . DB_escape_string($_SESSION['PO'.$identifier]->Comments) . "', + comments='" . $_SESSION['PO'.$identifier]->Comments . "', rate='" . $_SESSION['PO'.$identifier]->ExRate . "', initiator='" . $_SESSION['PO'.$identifier]->Initiator . "', requisitionno= '" . $_SESSION['PO'.$identifier]->RequisitionNo . "', @@ -263,26 +263,26 @@ deliverydate='" . FormatDateForSQL($_SESSION['PO'.$identifier]->DeliveryDate) . "', revised= '" . Date('Y-m-d') . "', intostocklocation='" . $_SESSION['PO'.$identifier]->Location . "', - deladd1='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd1) . "', - deladd2='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd2) . "', - deladd3='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd3) . "', - deladd4='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd4) . "', - deladd5='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd5) . "', - deladd6='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd6) . "', - deladd6='" . DB_escape_string($_SESSION['PO'.$identifier]->Tel) . "', - suppdeladdress1='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd1) . "', - suppdeladdress2='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd2) . "', - suppdeladdress3='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd3) . "', - suppdeladdress4='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd4) . "', - suppdeladdress5='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd5) . "', - suppdeladdress6='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd6) . "', - suppliercontact='" . DB_escape_string($_SESSION['PO'.$identifier]->SupplierContact) . "', - supptel='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppTel) . "', - contact='" . DB_escape_string($_SESSION['PO'.$identifier]->Contact) . "', + deladd1='" . $_SESSION['PO'.$identifier]->DelAdd1 . "', + deladd2='" . $_SESSION['PO'.$identifier]->DelAdd2 . "', + deladd3='" . $_SESSION['PO'.$identifier]->DelAdd3 . "', + deladd4='" . $_SESSION['PO'.$identifier]->DelAdd4 . "', + deladd5='" . $_SESSION['PO'.$identifier]->DelAdd5 . "', + deladd6='" . $_SESSION['PO'.$identifier]->DelAdd6 . "', + deladd6='" . $_SESSION['PO'.$identifier]->Tel . "', + suppdeladdress1='" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', + suppdeladdress2='" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', + suppdeladdress3='" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', + suppdeladdress4='" . $_SESSION['PO'.$identifier]->SuppDelAdd4 . "', + suppdeladdress5='" . $_SESSION['PO'.$identifier]->SuppDelAdd5 . "', + suppdeladdress6='" . $_SESSION['PO'.$identifier]->SuppDelAdd6 . "', + suppliercontact='" . $_SESSION['PO'.$identifier]->SupplierContact . "', + supptel='" . $_SESSION['PO'.$identifier]->SuppTel . "', + contact='" . $_SESSION['PO'.$identifier]->Contact . "', paymentterms='" . $_SESSION['PO'.$identifier]->PaymentTerms . "', allowprint='" . $_SESSION['PO'.$identifier]->AllowPrintPO . "', status = '" . $_SESSION['PO'.$identifier]->Status . "', - stat_comment = '" . DB_escape_string($_SESSION['PO'.$identifier]->StatusComments) . "' + stat_comment = '" . $_SESSION['PO'.$identifier]->StatusComments . "' WHERE orderno = '" . $_SESSION['PO'.$identifier]->OrderNo ."'"; $ErrMsg = _('The purchase order could not be updated because'); Modified: trunk/Z_DescribeTable.php =================================================================== --- trunk/Z_DescribeTable.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/Z_DescribeTable.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -//$PageSecurity = 11; - include('includes/session.inc'); $title = _('Database table details'); include('includes/header.inc'); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/doc/Change.log 2011-11-10 09:30:52 UTC (rev 4743) @@ -1,5 +1,7 @@ webERP Change Log +10/11/11 Phil: includes/DateFunctions.inc fixed GetPeriod function to create new period when just one month ahead of last period - worried about this can't see how it could have been like this so long without a bug report? +10/11/11 Phil: includes/LanguageSetup.php now sets LC_NUMERIC locale category after LC_ALL to ensure SQL compliant calculations 8/11/11 Phil: includes/GetConfig.php no longer casts the VersionNumber to a double - issue highlighted by Tim 8/11/11 Felix Lim: includes/InputSerialItems.php and InputSerialItemsKeyed.php now sends $identifier 8/11/11 Phil: fixed bugs reported by Ron Wong and Don SelectSupplier.php sql error missed "s" off suppliers and CustomerReceipt.php - had not populated new class variable (property) of CurrDecimalPlaces Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/DateFunctions.inc 2011-11-10 09:30:52 UTC (rev 4743) @@ -858,6 +858,7 @@ } elseif (mb_strpos ($TransDate,'.')) { $Date_Array = explode('.',$TransDate); } + if (($_SESSION['DefaultDateFormat']=='d/m/Y') or ($_SESSION['DefaultDateFormat']=='d.m.Y')){ $TransDate = mktime(0,0,0,$Date_Array[1],$Date_Array[0],$Date_Array[2]); } elseif ($_SESSION['DefaultDateFormat']=='m/d/Y'){ @@ -879,6 +880,7 @@ $sql = "SELECT MAX(lastdate_in_period), MAX(periodno) from periods"; $result = DB_query($sql, $db); $myrow=DB_fetch_row($result); + if (is_null($myrow[0])){ $InsertFirstPeriodResult = DB_query("INSERT INTO periods VALUES (0,'" . Date('Y-m-d',mktime(0,0,0,Date('m')+1,0,Date('Y'))) . "')",$db,_('Could not insert first period')); $InsertFirstPeriodResult = DB_query("INSERT INTO periods VALUES (1,'" . Date('Y-m-d',mktime(0,0,0,Date('m')+2,0,Date('Y'))) . "')",$db,_('Could not insert second period')); @@ -886,7 +888,7 @@ $LastPeriodEnd = mktime(0,0,0,Date('m')+2,0,Date('Y')); } else { $Date_Array = explode('-', $myrow[0]); - $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+2,0,(int)$Date_Array[0]); + $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+1,0,(int)$Date_Array[0]); $LastPeriod = $myrow[1]; } /* Find the unix timestamp of the first period end date in periods table */ @@ -900,20 +902,20 @@ /* If the period number doesn't exist */ if (!PeriodExists($TransDate, $db)) { /* if the transaction is after the last period */ + if ($TransDate > $LastPeriodEnd) { + $PeriodEnd = mktime(0,0,0,Date('m', $TransDate)+1, 0, Date('Y', $TransDate)); - $Period = $LastPeriod + 1; + while ($PeriodEnd >= $LastPeriodEnd) { - CreatePeriod($Period, $LastPeriodEnd, $db); - $Period++; if (Date('m', $LastPeriodEnd)<=13) { $LastPeriodEnd = mktime(0,0,0,Date('m', $LastPeriodEnd)+2, 0, Date('Y', $LastPeriodEnd)); } else { $LastPeriodEnd = mktime(0,0,0,2, 0, Date('Y', $LastPeriodEnd)+1); } + $LastPeriod++; + CreatePeriod($LastPeriod, $LastPeriodEnd, $db); } - $PeriodEnd = mktime(0,0,0,Date('m', $LastPeriodEnd)+1, 0, Date('Y', $LastPeriodEnd)); - CreatePeriod($Period, $PeriodEnd, $db); } else { /* The transaction is before the first period */ $PeriodEnd = mktime(0,0,0,Date('m', $TransDate), 0, Date('Y', $TransDate)); Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/LanguageSetup.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -63,8 +63,9 @@ include('includes/LanguagesArray.php'); } else { include('includes/LanguagesArray.php'); - $LocaleSet = setlocale (LC_NUMERIC, 'en_US','english-us'); + $LocaleSet = setlocale (LC_ALL, $_SESSION['Language'],$LanguagesArray[$_SESSION['Language']]['WindowsLocale']); + $LocaleSet = setlocale (LC_NUMERIC, 'C','en_GB.utf8','en_GB','en_US','english-us'); if (defined('LC_MESSAGES')){ //it's a unix/linux server $LocaleSet = setlocale (LC_MESSAGES, $_SESSION['Language']); @@ -73,6 +74,7 @@ if ($_SESSION['Language']=='tr_TR.utf8') { $Locale = setlocale(LC_CTYPE, 'C'); } + // possibly even if locale fails the language will still switch by using Language instead of locale variable putenv('LANG=' . $_SESSION['Language']); putenv('LANGUAGE=' . $_SESSION['Language']); Modified: trunk/includes/PDFTransPageHeader.inc =================================================================== --- trunk/includes/PDFTransPageHeader.inc 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/PDFTransPageHeader.inc 2011-11-10 09:30:52 UTC (rev 4743) @@ -180,14 +180,14 @@ /*Set up headings */ $FontSize=10; $pdf->addText($Left_Margin + 2, $YPos, $FontSize, _('Customer Tax Ref') . ':'); -$pdf->addText($Left_Margin+80, $YPos, $FontSize, $myrow['taxref']); +$pdf->addText($Left_Margin+100, $YPos, $FontSize, $myrow['taxref']); /*Print a vertical line */ $pdf->line($Left_Margin+248, $YPos-10+$line_height+3,$Left_Margin+248, $YPos - 18); if ($InvOrCredit=='Invoice'){ $pdf->addText($Left_Margin + 252, $YPos, $FontSize, _('Customer Order Ref.') . ':'); - $pdf->addText($Left_Margin+340, $YPos, $FontSize, $myrow['customerref']); + $pdf->addText($Left_Margin+370, $YPos, $FontSize, $myrow['customerref']); } /*Print a vertical line */ $pdf->line($Left_Margin+450, $YPos+$line_height-7,$Left_Margin+450,$YPos-18); Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/SQL_CommonFunctions.inc 2011-11-10 09:30:52 UTC (rev 4743) @@ -330,4 +330,35 @@ } +/*Ensures general ledger entries balance for a given transaction */ +function EnsureGLEntriesBalance ($TransType, $TransTypeNo, $db) { + + $result = DB_query("SELECT SUM(amount) + FROM gltrans + WHERE type = '" . $TransType . "' + AND typeno = '" . $TransTypeNo . "'", + $db); + $myrow = DB_fetch_row($result); + $Difference = $myrow[0]; + if (abs($Difference)!=0){ + if (abs($Difference)>0.1){ + prnMsg(_('The general ledger entries created do not balance. See your system administrator'),'error'); + } else { + $result = DB_query("SELECT counterindex, + MAX(amount) + FROM gltrans + WHERE type = '" . $TransType . "' + AND typeno = '" . $TransTypeNo . "' + GROUP BY counterindex", + $db); + $myrow = DB_fetch_array($result); + $TransToAmend = $myrow['counterindex']; + $result = DB_query("UPDATE gltrans SET amount = amount - " . $Difference . " + WHERE counterindex = '" . $TransToAmend . "'", + $db); + + } + } +} + ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-08 09:03:16
|
Revision: 4742 http://web-erp.svn.sourceforge.net/web-erp/?rev=4742&view=rev Author: daintree Date: 2011-11-08 09:03:06 +0000 (Tue, 08 Nov 2011) Log Message: ----------- bug fixes Modified Paths: -------------- trunk/CounterSales.php trunk/CustomerReceipt.php trunk/GoodsReceived.php trunk/SelectSupplier.php trunk/Stocks.php trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/includes/Add_SerialItems.php trunk/includes/GetConfig.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/CounterSales.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -39,7 +39,6 @@ foreach ($_POST as $FormVariable => $Quantity) { if (mb_strpos($FormVariable,'OrderQty')!==false) { $NewItemArray[$_POST['StockID' . mb_substr($FormVariable,8)]] = filter_number_format($Quantity); - echo '<br/> The quantitiy entered was ' . filter_number_format($Quantity) . ' the quantity for ' . $_POST['StockID' . mb_substr($FormVariable,8)] . ' unfiltered was: ' . $Quantity; } } } @@ -2022,7 +2021,7 @@ echo $TableHeader; $i = 0; $j = 1; - $k=0; //row colour counter + $k = 0; //row colour counter while ($myrow=DB_fetch_array($result2)) { // This code needs sorting out, but until then : @@ -2097,15 +2096,16 @@ $OnOrder = $PurchQty + $WoQty; $Available = $QOH - $DemandQty + $OnOrder; - + printf('<td>%s</font></td> <td>%s</td> <td>%s</td> - <td style="text-align:center">%s</td> - <td style="text-align:center">%s</td> - <td style="text-align:center">%s</td> - <td style="text-align:center">%s</td> - <td><font size=1><input class="number" tabindex="'.strval($j+7).'" type="textbox" size="6" name="OrderQty%s" value="0" /><input type="hidden" name="StockID%s" value="%s" /> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><input class="number" tabindex="'.strval($j+7).'" type="text" size="6" name="OrderQty%s" value="0" /> + <input type="hidden" name="StockID%s" value="%s" /> </td> </tr>', $myrow['stockid'], @@ -2189,10 +2189,13 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID .'identifier='.$identifier . '" method="post" name="orderform">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="table1">'; - echo '<tr><td><input type="hidden" name="previous" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; - echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sale').'" /></td>'; - echo '<td><input type="hidden" name="NextList" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; - $TableHeader = '<tr><th>' . _('Code') . '</th> + echo '<tr> + <td><input type="hidden" name="previous" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td> + <td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sale').'" /></td> + <td><input type="hidden" name="NextList" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td> + </tr>'; + $TableHeader = '<tr> + <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Units') . '</th> <th>' . _('On Hand') . '</th> @@ -2284,7 +2287,7 @@ <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><font size="1"><input class="number" tabindex="'.strval($j+7).'" type="textbox" size="6" name="OrderQty%s" value="0" /></font><input type="hidden" name="StockID%s" value="%s" /></td> + <td><input class="number" tabindex="'.strval($j+7).'" type="text" size="6" name="OrderQty%s" value="0" /></font><input type="hidden" name="StockID%s" value="%s" /></td> </tr>', $myrow['stockid'], $myrow['description'], @@ -2300,6 +2303,7 @@ $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; } $j++; + $i++; #end of page full new headings if } #end of while loop Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/CustomerReceipt.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -33,11 +33,11 @@ echo '<br />'; prnMsg(_('A bank account must be selected for this receipt'), 'warn'); - $BankAccountEmpty=TRUE; + $BankAccountEmpty=true; } else if(isset($_GET['NewReceipt'])) { - $BankAccountEmpty=TRUE; + $BankAccountEmpty=true; } else { - $BankAccountEmpty=FALSE; + $BankAccountEmpty=false; } if (!isset($_GET['Delete']) AND isset($_SESSION['ReceiptBatch'])){ @@ -47,17 +47,21 @@ /*Get the bank account currency and set that too */ $SQL = "SELECT bankaccountname, - currcode + currcode, + decimalplaces FROM bankaccounts + INNER JOIN currencies + ON bankaccounts.currcode=currencies.currabrev WHERE accountcode='" . $_POST['BankAccount']."'"; $ErrMsg =_('The bank account name cannot be retrieved because'); $result= DB_query($SQL,$db,$ErrMsg); if (DB_num_rows($result)==1){ - $myrow = DB_fetch_row($result); - $_SESSION['ReceiptBatch']->BankAccountName = $myrow[0]; - $_SESSION['ReceiptBatch']->AccountCurrency=$myrow[1]; + $myrow = DB_fetch_array($result); + $_SESSION['ReceiptBatch']->BankAccountName = $myrow['bankaccountname']; + $_SESSION['ReceiptBatch']->AccountCurrency=$myrow['currcode']; + $_SESSION['ReceiptBatch']->CurrDecimalPlaces=$myrow['decimalplaces']; unset($result); } elseif (DB_num_rows($result)==0 AND !$BankAccountEmpty){ prnMsg( _('The bank account number') . ' ' . $_POST['BankAccount'] . ' ' . _('is not set up as a bank account'),'error'); Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/GoodsReceived.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -83,7 +83,7 @@ echo '<table class="selection"> <tr> <td>'. _('Date Goods/Service Received'). ':</td> - <td><input type="text" class="date" alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength=10 size=10 onChange="return isDate(this, this.value, '."'". + <td><input type="text" class="date" alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength="10" size="10" onChange="return isDate(this, this.value, '."'". $_SESSION['DefaultDateFormat']."'".')" name="DefaultReceivedDate" value="' . $_POST['DefaultReceivedDate'] . '"></td> </tr> </table> Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/SelectSupplier.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -321,7 +321,7 @@ } else { echo '<div class="centre"><br />'; echo '<tr><td colspan="2">'; - echo '<table width=45% colspan=2 border=2 cellpadding=4>'; + echo '<table width="45%" class="selection">'; echo '<tr><th width=33%>' . _('Supplier Mapping') . '</th></tr>'; echo '</td><td valign=top>'; /* Mapping */ echo '<div class="centre">' . _('Mapping is enabled, Map will display below.') . '</div>'; @@ -338,13 +338,13 @@ suppliersince, currencies.decimalplaces AS currdecimalplaces FROM suppliers INNER JOIN currencies - ON supplier.currcode=currencies.currabrev + ON suppliers.currcode=currencies.currabrev WHERE suppliers.supplierid ='" . $_SESSION['SupplierID'] . "'"; $ErrMsg = _('An error occurred in retrieving the information'); $DataResult = DB_query($sql, $db, $ErrMsg); $myrow = DB_fetch_array($DataResult); // Select some more data about the supplier - $SQL = "SELECT sum(-ovamount) AS total FROM supptrans WHERE supplierno = '" . $_SESSION['SupplierID'] . "' and type != '20'"; + $SQL = "SELECT SUM(-ovamount) AS total FROM supptrans WHERE supplierno = '" . $_SESSION['SupplierID'] . "' and type != '20'"; $Total1Result = DB_query($SQL, $db); $row = DB_fetch_array($Total1Result); echo '<br />'; Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/Stocks.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -754,7 +754,9 @@ discountcategory, taxcatid, decimalplaces, - nextserialno + nextserialno, + pansize, + shrinkfactor FROM stockmaster WHERE stockid = '".$StockID."'"; Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/UpgradeDatabase.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -44,7 +44,9 @@ prnMsg(_('This script will perform any modifications to the database required to allow the additional functionality in later scripts.') . '<br />' . _('The webERP code is version') . ' ' . $Version . ' ' . _('and the database version is') . ' ' . $_SESSION['VersionNumber'] . '<br /><a target="_blank" href="' . $rootpath . '/BackupDatabase.php">' ._('Click to do a database backup now before proceeding!') . '</a>','info'); echo '<input type="hidden" name="OldVersion" value="' . $_SESSION['VersionNumber'] . '" />'; - echo '<div class="centre"><input type="submit" name="DoUpgrade" value="' . _('Perform Database Upgrade') . '" /></div>'; + echo '<div class="centre"> + <input type="submit" name="DoUpgrade" value="' . _('Perform Database Upgrade') . '" /> + </div>'; } } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/doc/Change.log 2011-11-08 09:03:06 UTC (rev 4742) @@ -1,5 +1,9 @@ webERP Change Log +8/11/11 Phil: includes/GetConfig.php no longer casts the VersionNumber to a double - issue highlighted by Tim +8/11/11 Felix Lim: includes/InputSerialItems.php and InputSerialItemsKeyed.php now sends $identifier +8/11/11 Phil: fixed bugs reported by Ron Wong and Don SelectSupplier.php sql error missed "s" off suppliers and CustomerReceipt.php - had not populated new class variable (property) of CurrDecimalPlaces + 6/11/11 Release 4.06RC1 30/10/11 Exson: Modification to Stocks.php to avoid losing PanSize and ShrinkFactor Modified: trunk/includes/Add_SerialItems.php =================================================================== --- trunk/includes/Add_SerialItems.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/Add_SerialItems.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -80,7 +80,7 @@ $_POST['Bundles']=0; } //echo count($_POST['Bundles']); - for ($i=0;$i < count($_POST['Bundles']);$i++){ /*there is an entry in the multi select list box */ + for ($i=0;$i < count($_POST['Bundles']) AND $_POST['Bundles']!=0;$i++){ /*there is an entry in the multi select list box */ if ($LineItem->Serialised==1){ /*only if the item is serialised */ $LineItem->SerialItems[$_POST['Bundles'][$i]] = new SerialItem ($_POST['Bundles'][$i], ($InOutModifier>0 ? 1:-1) ); } else { Modified: trunk/includes/GetConfig.php =================================================================== --- trunk/includes/GetConfig.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/GetConfig.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -8,12 +8,12 @@ $sql = "SELECT confname, confvalue FROM config"; $ErrMsg = _('Could not get the configuration parameters from the database because'); $ConfigResult = DB_query($sql,$db,$ErrMsg); - while( $myrow = DB_fetch_row($ConfigResult) ) { - if (is_numeric($myrow[1]) and $myrow[0]!='DefaultPriceList'){ + while( $myrow = DB_fetch_array($ConfigResult) ) { + if (is_numeric($myrow['confvalue']) AND $myrow['confname']!='DefaultPriceList' AND $myrow['confname']!='VersionNumber'){ //the variable name is given by $myrow[0] - $_SESSION[$myrow[0]] = (double) $myrow[1]; + $_SESSION[$myrow['confname']] = (double) $myrow['confvalue']; } else { - $_SESSION[$myrow[0]] = $myrow[1]; + $_SESSION[$myrow['confname']] = $myrow['confvalue']; } } //end loop through all config variables $_SESSION['CompanyDefaultsLoaded'] = true; Modified: trunk/includes/InputSerialItems.php =================================================================== --- trunk/includes/InputSerialItems.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/InputSerialItems.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -48,7 +48,7 @@ $invalid_imports = 0; $valid = true; -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) .'" enctype="multipart/form-data" >'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) .'?identifier='.$identifier.'" enctype="multipart/form-data" >'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type=hidden name="LineNo" value="' . $LineNo . '">'; echo '<input type=hidden name="StockID" value="'. $StockID. '">'; @@ -84,9 +84,9 @@ global $tableheader; /* Link to clear the list and start from scratch */ -$EditLink = '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?EditControlled=true&StockID=' . $LineItem->StockID . +$EditLink = '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'&EditControlled=true&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Edit'). '</a> | '; -$RemoveLink = '<a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DELETEALL=YES&StockID=' . $LineItem->StockID . +$RemoveLink = '<a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'&DELETEALL=YES&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Remove All'). '</a><br /></div>'; $sql="SELECT perishable FROM stockmaster Modified: trunk/includes/InputSerialItemsKeyed.php =================================================================== --- trunk/includes/InputSerialItemsKeyed.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/InputSerialItemsKeyed.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -55,9 +55,9 @@ echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; echo '<td class="number">' . $Bundle->ExpiryDate . '</td>'; } - - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Delete'). '</a></td></tr>'; - + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'&identifier='.$identifier.'">'. _('Delete'). '</a></td> + </tr>'; + $TotalQuantity += $Bundle->BundleQty; } @@ -84,7 +84,7 @@ echo $tableheader; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" name="Ga6uF5Wa" method="post"> +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'" name="Ga6uF5Wa" method="post"> <input type=hidden name="LineNo" value="' . $LineNo . '"> <input type=hidden name="StockID" value="' . $StockID . '"> <input type=hidden name="EntryType" value="KEYED">'; @@ -101,7 +101,8 @@ if ($EditControlled){ foreach ($LineItem->SerialItems as $Bundle){ - echo '<tr><td valign=top><input type="text" name="SerialNo'. $StartAddingAt .'" value="' .$Bundle->BundleRef.'" size="21" maxlength="20" /></td>'; + echo '<tr> + <td valign=top><input type="text" name="SerialNo'. $StartAddingAt .'" value="' .$Bundle->BundleRef.'" size="21" maxlength="20" /></td>'; /*if the item is controlled not serialised - batch quantity required so just enter bundle refs into the form for entry of quantities manually */ @@ -110,10 +111,10 @@ echo '<input type=hidden name="Qty' . $StartAddingAt .'" Value=1></TR>'; } else if ($LineItem->Serialised==0 and $Perishable==1) { echo '<td><input type="text" class="number" name="Qty' . $StartAddingAt .'" size=11 - value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength=10></tr>'; + value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength="10"></tr>'; } else { echo '<td><input type="text" class="number" name="Qty' . $StartAddingAt .'" size=11 - value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength=10></tr>'; + value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength="10"></tr>'; } $StartAddingAt++; @@ -138,13 +139,22 @@ } } -echo '</table>'; -echo '<br /><div class=centre><input type="submit" name="AddBatches" value="'. _('Enter'). '"></div>'; -echo '</form></td><td valign="top">'; +echo '</table> + <br /> + <div class="centre"> + <input type="submit" name="AddBatches" value="'. _('Enter'). '" /> + </div> + + </form> + </td> + <td valign="top">'; if ($ShowExisting){ include('includes/InputSerialItemsExisting.php'); } -echo '</td></tr></table><script type="text/javascript"> +echo '</td> + </tr> + </table> + <script type="text/javascript"> //<![CDATA[ document.Ga6uF5Wa.SerialNo0.focus(); //]]> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-08 09:03:16
|
Revision: 4742 http://web-erp.svn.sourceforge.net/web-erp/?rev=4742&view=rev Author: daintree Date: 2011-11-08 09:03:06 +0000 (Tue, 08 Nov 2011) Log Message: ----------- bug fixes Modified Paths: -------------- trunk/CounterSales.php trunk/CustomerReceipt.php trunk/GoodsReceived.php trunk/SelectSupplier.php trunk/Stocks.php trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/includes/Add_SerialItems.php trunk/includes/GetConfig.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/CounterSales.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -39,7 +39,6 @@ foreach ($_POST as $FormVariable => $Quantity) { if (mb_strpos($FormVariable,'OrderQty')!==false) { $NewItemArray[$_POST['StockID' . mb_substr($FormVariable,8)]] = filter_number_format($Quantity); - echo '<br/> The quantitiy entered was ' . filter_number_format($Quantity) . ' the quantity for ' . $_POST['StockID' . mb_substr($FormVariable,8)] . ' unfiltered was: ' . $Quantity; } } } @@ -2022,7 +2021,7 @@ echo $TableHeader; $i = 0; $j = 1; - $k=0; //row colour counter + $k = 0; //row colour counter while ($myrow=DB_fetch_array($result2)) { // This code needs sorting out, but until then : @@ -2097,15 +2096,16 @@ $OnOrder = $PurchQty + $WoQty; $Available = $QOH - $DemandQty + $OnOrder; - + printf('<td>%s</font></td> <td>%s</td> <td>%s</td> - <td style="text-align:center">%s</td> - <td style="text-align:center">%s</td> - <td style="text-align:center">%s</td> - <td style="text-align:center">%s</td> - <td><font size=1><input class="number" tabindex="'.strval($j+7).'" type="textbox" size="6" name="OrderQty%s" value="0" /><input type="hidden" name="StockID%s" value="%s" /> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><input class="number" tabindex="'.strval($j+7).'" type="text" size="6" name="OrderQty%s" value="0" /> + <input type="hidden" name="StockID%s" value="%s" /> </td> </tr>', $myrow['stockid'], @@ -2189,10 +2189,13 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID .'identifier='.$identifier . '" method="post" name="orderform">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="table1">'; - echo '<tr><td><input type="hidden" name="previous" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; - echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sale').'" /></td>'; - echo '<td><input type="hidden" name="NextList" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; - $TableHeader = '<tr><th>' . _('Code') . '</th> + echo '<tr> + <td><input type="hidden" name="previous" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td> + <td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sale').'" /></td> + <td><input type="hidden" name="NextList" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td> + </tr>'; + $TableHeader = '<tr> + <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Units') . '</th> <th>' . _('On Hand') . '</th> @@ -2284,7 +2287,7 @@ <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><font size="1"><input class="number" tabindex="'.strval($j+7).'" type="textbox" size="6" name="OrderQty%s" value="0" /></font><input type="hidden" name="StockID%s" value="%s" /></td> + <td><input class="number" tabindex="'.strval($j+7).'" type="text" size="6" name="OrderQty%s" value="0" /></font><input type="hidden" name="StockID%s" value="%s" /></td> </tr>', $myrow['stockid'], $myrow['description'], @@ -2300,6 +2303,7 @@ $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; } $j++; + $i++; #end of page full new headings if } #end of while loop Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/CustomerReceipt.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -33,11 +33,11 @@ echo '<br />'; prnMsg(_('A bank account must be selected for this receipt'), 'warn'); - $BankAccountEmpty=TRUE; + $BankAccountEmpty=true; } else if(isset($_GET['NewReceipt'])) { - $BankAccountEmpty=TRUE; + $BankAccountEmpty=true; } else { - $BankAccountEmpty=FALSE; + $BankAccountEmpty=false; } if (!isset($_GET['Delete']) AND isset($_SESSION['ReceiptBatch'])){ @@ -47,17 +47,21 @@ /*Get the bank account currency and set that too */ $SQL = "SELECT bankaccountname, - currcode + currcode, + decimalplaces FROM bankaccounts + INNER JOIN currencies + ON bankaccounts.currcode=currencies.currabrev WHERE accountcode='" . $_POST['BankAccount']."'"; $ErrMsg =_('The bank account name cannot be retrieved because'); $result= DB_query($SQL,$db,$ErrMsg); if (DB_num_rows($result)==1){ - $myrow = DB_fetch_row($result); - $_SESSION['ReceiptBatch']->BankAccountName = $myrow[0]; - $_SESSION['ReceiptBatch']->AccountCurrency=$myrow[1]; + $myrow = DB_fetch_array($result); + $_SESSION['ReceiptBatch']->BankAccountName = $myrow['bankaccountname']; + $_SESSION['ReceiptBatch']->AccountCurrency=$myrow['currcode']; + $_SESSION['ReceiptBatch']->CurrDecimalPlaces=$myrow['decimalplaces']; unset($result); } elseif (DB_num_rows($result)==0 AND !$BankAccountEmpty){ prnMsg( _('The bank account number') . ' ' . $_POST['BankAccount'] . ' ' . _('is not set up as a bank account'),'error'); Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/GoodsReceived.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -83,7 +83,7 @@ echo '<table class="selection"> <tr> <td>'. _('Date Goods/Service Received'). ':</td> - <td><input type="text" class="date" alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength=10 size=10 onChange="return isDate(this, this.value, '."'". + <td><input type="text" class="date" alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength="10" size="10" onChange="return isDate(this, this.value, '."'". $_SESSION['DefaultDateFormat']."'".')" name="DefaultReceivedDate" value="' . $_POST['DefaultReceivedDate'] . '"></td> </tr> </table> Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/SelectSupplier.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -321,7 +321,7 @@ } else { echo '<div class="centre"><br />'; echo '<tr><td colspan="2">'; - echo '<table width=45% colspan=2 border=2 cellpadding=4>'; + echo '<table width="45%" class="selection">'; echo '<tr><th width=33%>' . _('Supplier Mapping') . '</th></tr>'; echo '</td><td valign=top>'; /* Mapping */ echo '<div class="centre">' . _('Mapping is enabled, Map will display below.') . '</div>'; @@ -338,13 +338,13 @@ suppliersince, currencies.decimalplaces AS currdecimalplaces FROM suppliers INNER JOIN currencies - ON supplier.currcode=currencies.currabrev + ON suppliers.currcode=currencies.currabrev WHERE suppliers.supplierid ='" . $_SESSION['SupplierID'] . "'"; $ErrMsg = _('An error occurred in retrieving the information'); $DataResult = DB_query($sql, $db, $ErrMsg); $myrow = DB_fetch_array($DataResult); // Select some more data about the supplier - $SQL = "SELECT sum(-ovamount) AS total FROM supptrans WHERE supplierno = '" . $_SESSION['SupplierID'] . "' and type != '20'"; + $SQL = "SELECT SUM(-ovamount) AS total FROM supptrans WHERE supplierno = '" . $_SESSION['SupplierID'] . "' and type != '20'"; $Total1Result = DB_query($SQL, $db); $row = DB_fetch_array($Total1Result); echo '<br />'; Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/Stocks.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -754,7 +754,9 @@ discountcategory, taxcatid, decimalplaces, - nextserialno + nextserialno, + pansize, + shrinkfactor FROM stockmaster WHERE stockid = '".$StockID."'"; Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/UpgradeDatabase.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -44,7 +44,9 @@ prnMsg(_('This script will perform any modifications to the database required to allow the additional functionality in later scripts.') . '<br />' . _('The webERP code is version') . ' ' . $Version . ' ' . _('and the database version is') . ' ' . $_SESSION['VersionNumber'] . '<br /><a target="_blank" href="' . $rootpath . '/BackupDatabase.php">' ._('Click to do a database backup now before proceeding!') . '</a>','info'); echo '<input type="hidden" name="OldVersion" value="' . $_SESSION['VersionNumber'] . '" />'; - echo '<div class="centre"><input type="submit" name="DoUpgrade" value="' . _('Perform Database Upgrade') . '" /></div>'; + echo '<div class="centre"> + <input type="submit" name="DoUpgrade" value="' . _('Perform Database Upgrade') . '" /> + </div>'; } } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/doc/Change.log 2011-11-08 09:03:06 UTC (rev 4742) @@ -1,5 +1,9 @@ webERP Change Log +8/11/11 Phil: includes/GetConfig.php no longer casts the VersionNumber to a double - issue highlighted by Tim +8/11/11 Felix Lim: includes/InputSerialItems.php and InputSerialItemsKeyed.php now sends $identifier +8/11/11 Phil: fixed bugs reported by Ron Wong and Don SelectSupplier.php sql error missed "s" off suppliers and CustomerReceipt.php - had not populated new class variable (property) of CurrDecimalPlaces + 6/11/11 Release 4.06RC1 30/10/11 Exson: Modification to Stocks.php to avoid losing PanSize and ShrinkFactor Modified: trunk/includes/Add_SerialItems.php =================================================================== --- trunk/includes/Add_SerialItems.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/Add_SerialItems.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -80,7 +80,7 @@ $_POST['Bundles']=0; } //echo count($_POST['Bundles']); - for ($i=0;$i < count($_POST['Bundles']);$i++){ /*there is an entry in the multi select list box */ + for ($i=0;$i < count($_POST['Bundles']) AND $_POST['Bundles']!=0;$i++){ /*there is an entry in the multi select list box */ if ($LineItem->Serialised==1){ /*only if the item is serialised */ $LineItem->SerialItems[$_POST['Bundles'][$i]] = new SerialItem ($_POST['Bundles'][$i], ($InOutModifier>0 ? 1:-1) ); } else { Modified: trunk/includes/GetConfig.php =================================================================== --- trunk/includes/GetConfig.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/GetConfig.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -8,12 +8,12 @@ $sql = "SELECT confname, confvalue FROM config"; $ErrMsg = _('Could not get the configuration parameters from the database because'); $ConfigResult = DB_query($sql,$db,$ErrMsg); - while( $myrow = DB_fetch_row($ConfigResult) ) { - if (is_numeric($myrow[1]) and $myrow[0]!='DefaultPriceList'){ + while( $myrow = DB_fetch_array($ConfigResult) ) { + if (is_numeric($myrow['confvalue']) AND $myrow['confname']!='DefaultPriceList' AND $myrow['confname']!='VersionNumber'){ //the variable name is given by $myrow[0] - $_SESSION[$myrow[0]] = (double) $myrow[1]; + $_SESSION[$myrow['confname']] = (double) $myrow['confvalue']; } else { - $_SESSION[$myrow[0]] = $myrow[1]; + $_SESSION[$myrow['confname']] = $myrow['confvalue']; } } //end loop through all config variables $_SESSION['CompanyDefaultsLoaded'] = true; Modified: trunk/includes/InputSerialItems.php =================================================================== --- trunk/includes/InputSerialItems.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/InputSerialItems.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -48,7 +48,7 @@ $invalid_imports = 0; $valid = true; -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) .'" enctype="multipart/form-data" >'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) .'?identifier='.$identifier.'" enctype="multipart/form-data" >'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type=hidden name="LineNo" value="' . $LineNo . '">'; echo '<input type=hidden name="StockID" value="'. $StockID. '">'; @@ -84,9 +84,9 @@ global $tableheader; /* Link to clear the list and start from scratch */ -$EditLink = '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?EditControlled=true&StockID=' . $LineItem->StockID . +$EditLink = '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'&EditControlled=true&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Edit'). '</a> | '; -$RemoveLink = '<a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DELETEALL=YES&StockID=' . $LineItem->StockID . +$RemoveLink = '<a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'&DELETEALL=YES&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Remove All'). '</a><br /></div>'; $sql="SELECT perishable FROM stockmaster Modified: trunk/includes/InputSerialItemsKeyed.php =================================================================== --- trunk/includes/InputSerialItemsKeyed.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/InputSerialItemsKeyed.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -55,9 +55,9 @@ echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; echo '<td class="number">' . $Bundle->ExpiryDate . '</td>'; } - - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Delete'). '</a></td></tr>'; - + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'&identifier='.$identifier.'">'. _('Delete'). '</a></td> + </tr>'; + $TotalQuantity += $Bundle->BundleQty; } @@ -84,7 +84,7 @@ echo $tableheader; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" name="Ga6uF5Wa" method="post"> +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'" name="Ga6uF5Wa" method="post"> <input type=hidden name="LineNo" value="' . $LineNo . '"> <input type=hidden name="StockID" value="' . $StockID . '"> <input type=hidden name="EntryType" value="KEYED">'; @@ -101,7 +101,8 @@ if ($EditControlled){ foreach ($LineItem->SerialItems as $Bundle){ - echo '<tr><td valign=top><input type="text" name="SerialNo'. $StartAddingAt .'" value="' .$Bundle->BundleRef.'" size="21" maxlength="20" /></td>'; + echo '<tr> + <td valign=top><input type="text" name="SerialNo'. $StartAddingAt .'" value="' .$Bundle->BundleRef.'" size="21" maxlength="20" /></td>'; /*if the item is controlled not serialised - batch quantity required so just enter bundle refs into the form for entry of quantities manually */ @@ -110,10 +111,10 @@ echo '<input type=hidden name="Qty' . $StartAddingAt .'" Value=1></TR>'; } else if ($LineItem->Serialised==0 and $Perishable==1) { echo '<td><input type="text" class="number" name="Qty' . $StartAddingAt .'" size=11 - value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength=10></tr>'; + value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength="10"></tr>'; } else { echo '<td><input type="text" class="number" name="Qty' . $StartAddingAt .'" size=11 - value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength=10></tr>'; + value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength="10"></tr>'; } $StartAddingAt++; @@ -138,13 +139,22 @@ } } -echo '</table>'; -echo '<br /><div class=centre><input type="submit" name="AddBatches" value="'. _('Enter'). '"></div>'; -echo '</form></td><td valign="top">'; +echo '</table> + <br /> + <div class="centre"> + <input type="submit" name="AddBatches" value="'. _('Enter'). '" /> + </div> + + </form> + </td> + <td valign="top">'; if ($ShowExisting){ include('includes/InputSerialItemsExisting.php'); } -echo '</td></tr></table><script type="text/javascript"> +echo '</td> + </tr> + </table> + <script type="text/javascript"> //<![CDATA[ document.Ga6uF5Wa.SerialNo0.focus(); //]]> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-06 07:09:31
|
Revision: 4741 http://web-erp.svn.sourceforge.net/web-erp/?rev=4741&view=rev Author: daintree Date: 2011-11-06 07:09:21 +0000 (Sun, 06 Nov 2011) Log Message: ----------- pre 4.06RC1 Modified Paths: -------------- trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/includes/ConnectDB.inc trunk/includes/LanguagesArray.php trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/upgrade4.05-4.06.sql trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/UpgradeDatabase.php 2011-11-06 07:09:21 UTC (rev 4741) @@ -117,6 +117,7 @@ case '4.05': case '4.05.1': case '4.05.2': + case '4.05.3': $SQLScripts[] = './sql/mysql/upgrade4.05-4.06.sql'; case '4.06': break; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/doc/Change.log 2011-11-06 07:09:21 UTC (rev 4741) @@ -1,5 +1,7 @@ webERP Change Log +6/11/11 Release 4.06RC1 + 30/10/11 Exson: Modification to Stocks.php to avoid losing PanSize and ShrinkFactor 30/10/11 Phil: Made it so a saleman cannot be deleted if a user is setup referring only to this salesperson 29/10/11 High-Tech Bridge SA Security Research Lab <adv...@ht...> - sanitising $_SERVER['PHP_SELF'] and unquoted sql in reportwriter/FormMaker.php and reportwriter/ReportMaker.php Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/includes/ConnectDB.inc 2011-11-06 07:09:21 UTC (rev 4741) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.05.3'; //must update manually every time there is a DB change +$Version='4.06'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/includes/LanguagesArray.php =================================================================== --- trunk/includes/LanguagesArray.php 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/includes/LanguagesArray.php 2011-11-06 07:09:21 UTC (rev 4741) @@ -8,8 +8,8 @@ $LanguagesArray['en_GB.utf8']['LanguageName'] = _('English British'); $LanguagesArray['en_GB.utf8']['WindowsLocale'] = 'english-uk'; -$LanguagesArray['en_GB.utf8']['DecimalPoint'] = ','; -$LanguagesArray['en_GB.utf8']['ThousandsSeparator'] = '.'; +$LanguagesArray['en_GB.utf8']['DecimalPoint'] = '.'; +$LanguagesArray['en_GB.utf8']['ThousandsSeparator'] = ','; $LanguagesArray['cz_CZ.utf8']['LanguageName'] = _('Czech'); $LanguagesArray['cz_CZ.utf8']['WindowsLocale'] = 'czech'; Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-06 07:09:21 UTC (rev 4741) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-01 22:26+1300\n" +"POT-Creation-Date: 2011-11-06 19:49+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -142,7 +142,7 @@ #: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306 #: CustomerBranches.php:316 CustomerTypes.php:147 CustomerTypes.php:157 #: Customers.php:289 Customers.php:298 Customers.php:306 Customers.php:314 -#: Factors.php:134 FixedAssetCategories.php:129 GLAccounts.php:80 +#: Factors.php:134 FixedAssetCategories.php:133 GLAccounts.php:80 #: GLAccounts.php:96 Locations.php:237 Locations.php:245 Locations.php:256 #: Locations.php:265 Locations.php:274 Locations.php:283 Locations.php:292 #: Locations.php:301 MRPDemandTypes.php:87 PaymentMethods.php:138 @@ -210,7 +210,7 @@ #: CustEDISetup.php:17 DailyBankTransactions.php:11 DebtorsAtPeriodEnd.php:125 #: DiscountCategories.php:10 DiscountCategories.php:131 DiscountMatrix.php:16 #: EDIMessageFormat.php:104 FixedAssetLocations.php:9 -#: FixedAssetRegister.php:13 FixedAssetRegister.php:237 +#: FixedAssetRegister.php:13 FixedAssetRegister.php:243 #: FixedAssetTransfer.php:31 FormDesigner.php:129 GLBalanceSheet.php:362 #: GLBudgets.php:29 GLJournal.php:246 InventoryPlanning.php:374 #: InventoryPlanningPrefSupplier.php:467 Labels.php:115 Labels.php:270 @@ -237,7 +237,7 @@ #: WWW_Users.php:31 WhereUsedInquiry.php:18 WorkCentres.php:111 #: WorkCentres.php:162 WorkOrderCosting.php:13 WorkOrderEntry.php:11 #: WorkOrderIssue.php:22 WorkOrderReceive.php:15 WorkOrderStatus.php:42 -#: Z_BottomUpCosts.php:51 +#: Z_BottomUpCosts.php:56 msgid "Search" msgstr "Vyhledávání" @@ -245,7 +245,7 @@ msgid "Group Name" msgstr "Název skupiny" -#: AccountGroups.php:228 EDIMessageFormat.php:129 EDIMessageFormat.php:207 +#: AccountGroups.php:228 EDIMessageFormat.php:129 EDIMessageFormat.php:208 msgid "Section" msgstr "Sekce" @@ -292,8 +292,8 @@ #: SystemParameters.php:654 SystemParameters.php:781 SystemParameters.php:916 #: SystemParameters.php:918 SystemParameters.php:928 SystemParameters.php:930 #: SystemParameters.php:984 SystemParameters.php:996 SystemParameters.php:998 -#: TaxGroups.php:307 TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:629 -#: WWW_Users.php:631 +#: TaxGroups.php:307 TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:632 +#: WWW_Users.php:634 msgid "Yes" msgstr "Ano" @@ -327,8 +327,8 @@ #: SystemParameters.php:655 SystemParameters.php:782 SystemParameters.php:915 #: SystemParameters.php:919 SystemParameters.php:927 SystemParameters.php:931 #: SystemParameters.php:985 SystemParameters.php:995 SystemParameters.php:999 -#: TaxGroups.php:308 TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:628 -#: WWW_Users.php:632 includes/PDFLowGPPageHeader.inc:44 +#: TaxGroups.php:308 TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:631 +#: WWW_Users.php:635 includes/PDFLowGPPageHeader.inc:44 #: includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Ne" @@ -338,8 +338,8 @@ #: BOMs.php:149 BankAccounts.php:223 COGSGLPostings.php:108 #: COGSGLPostings.php:206 CreditStatus.php:174 Currencies.php:272 #: CustomerBranches.php:414 CustomerTypes.php:202 Customers.php:1011 -#: Customers.php:1045 EDIMessageFormat.php:150 Factors.php:300 -#: FixedAssetCategories.php:182 FixedAssetLocations.php:102 +#: Customers.php:1045 EDIMessageFormat.php:150 Factors.php:329 +#: FixedAssetCategories.php:186 FixedAssetLocations.php:107 #: FreightCosts.php:240 GLAccounts.php:312 GLTags.php:91 GeocodeSetup.php:173 #: Labels.php:411 Locations.php:382 MRPDemandTypes.php:120 MRPDemands.php:306 #: PO_AuthorisationLevels.php:151 PaymentMethods.php:200 PaymentTerms.php:205 @@ -353,7 +353,7 @@ #: SuppTransGLAnalysis.php:120 SupplierContacts.php:163 SupplierTypes.php:189 #: TaxAuthorities.php:174 TaxCategories.php:182 TaxGroups.php:188 #: TaxProvinces.php:180 UnitsOfMeasure.php:185 WWW_Access.php:123 -#: WWW_Users.php:315 WorkCentres.php:141 includes/InputSerialItems.php:88 +#: WWW_Users.php:318 WorkCentres.php:141 includes/InputSerialItems.php:88 #: includes/OutputSerialItems.php:20 #, php-format msgid "Edit" @@ -369,9 +369,9 @@ #: BOMs.php:151 BankAccounts.php:224 COGSGLPostings.php:109 #: COGSGLPostings.php:207 ContractBOM.php:266 ContractOtherReqts.php:119 #: CounterSales.php:812 CreditStatus.php:175 Credit_Invoice.php:381 -#: Currencies.php:275 CustomerReceipt.php:865 CustomerTypes.php:203 -#: Customers.php:1046 DiscountCategories.php:219 DiscountMatrix.php:175 -#: EDIMessageFormat.php:151 FixedAssetCategories.php:183 FreightCosts.php:241 +#: Currencies.php:275 CustomerReceipt.php:913 CustomerTypes.php:203 +#: Customers.php:1046 DiscountCategories.php:219 DiscountMatrix.php:182 +#: EDIMessageFormat.php:151 FixedAssetCategories.php:187 FreightCosts.php:241 #: GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 GeocodeSetup.php:174 #: Labels.php:411 Locations.php:383 MRPDemandTypes.php:121 MRPDemands.php:307 #: PO_AuthorisationLevels.php:153 PO_Items.php:711 PaymentMethods.php:201 @@ -390,7 +390,7 @@ #: SuppTransGLAnalysis.php:121 SupplierContacts.php:164 SupplierTypes.php:191 #: TaxAuthorities.php:175 TaxCategories.php:183 TaxGroups.php:189 #: TaxProvinces.php:181 UnitsOfMeasure.php:186 WOSerialNos.php:319 -#: WWW_Access.php:124 WWW_Users.php:316 WorkCentres.php:142 +#: WWW_Access.php:124 WWW_Users.php:319 WorkCentres.php:142 #: includes/InputSerialItemsKeyed.php:59 includes/OutputSerialItems.php:99 #, php-format msgid "Delete" @@ -436,18 +436,18 @@ #: AccountGroups.php:397 AccountSections.php:264 AddCustomerContacts.php:258 #: AddCustomerNotes.php:245 AddCustomerTypeNotes.php:210 Areas.php:227 #: BOMs.php:759 BankAccounts.php:391 COGSGLPostings.php:354 -#: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:261 -#: DiscountMatrix.php:136 EDIMessageFormat.php:247 -#: FixedAssetCategories.php:322 FixedAssetLocations.php:148 +#: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:272 +#: DiscountMatrix.php:141 EDIMessageFormat.php:248 +#: FixedAssetCategories.php:344 FixedAssetLocations.php:156 #: FreightCosts.php:339 GLAccounts.php:262 GeocodeSetup.php:270 #: Locations.php:597 MRPDemandTypes.php:187 MRPDemands.php:419 #: OffersReceived.php:56 OffersReceived.php:143 PO_AuthorisationLevels.php:248 #: PaymentMethods.php:282 PaymentTerms.php:309 Prices_Customer.php:354 #: SalesAnalReptCols.php:552 SalesAnalRepts.php:514 SalesGLPostings.php:416 #: SalesPeople.php:368 Shippers.php:200 StockCategories.php:581 -#: SuppLoginSetup.php:285 SupplierContacts.php:281 TaxAuthorities.php:327 +#: SuppLoginSetup.php:293 SupplierContacts.php:281 TaxAuthorities.php:327 #: TaxCategories.php:237 TaxProvinces.php:235 UnitsOfMeasure.php:240 -#: WWW_Users.php:671 WorkCentres.php:279 +#: WWW_Users.php:674 WorkCentres.php:279 msgid "Enter Information" msgstr "Vložit informace" @@ -517,7 +517,7 @@ msgid "Customer Contacts" msgstr "Zákazník Kontakty" -#: AddCustomerContacts.php:20 CustEDISetup.php:9 CustLoginSetup.php:11 +#: AddCustomerContacts.php:20 CustEDISetup.php:9 CustLoginSetup.php:21 #: Z_CheckDebtorsControl.php:20 msgid "Back to Customers" msgstr "Zpět k zákazníkům" @@ -556,7 +556,7 @@ #: AddCustomerContacts.php:61 AddCustomerNotes.php:52 #: AddCustomerTypeNotes.php:49 Areas.php:73 CustomerTypes.php:69 -#: DeliveryDetails.php:774 Factors.php:105 FixedAssetItems.php:243 +#: DeliveryDetails.php:774 Factors.php:105 FixedAssetItems.php:246 #: MRPCalendar.php:176 PO_Items.php:374 PcAssignCashToTab.php:88 #: PcClaimExpensesFromTab.php:79 PcExpenses.php:95 PcTabs.php:102 #: PcTypeTabs.php:60 SalesAnalReptCols.php:129 SalesPeople.php:97 @@ -594,13 +594,13 @@ #: AddCustomerContacts.php:131 AddCustomerContacts.php:240 #: CustomerBranches.php:374 CustomerBranches.php:774 CustomerInquiry.php:253 #: Customers.php:1001 Customers.php:1009 EmailCustTrans.php:15 -#: EmailCustTrans.php:63 Factors.php:225 Factors.php:263 Locations.php:563 +#: EmailCustTrans.php:63 Factors.php:245 Factors.php:292 Locations.php:563 #: OrderDetails.php:109 PDFRemittanceAdvice.php:243 PO_PDFPurchOrder.php:369 #: PO_PDFPurchOrder.php:372 PrintCustTrans.php:714 PrintCustTrans.php:945 #: PrintCustTrans.php:994 PrintCustTransPortrait.php:753 #: PrintCustTransPortrait.php:999 PrintCustTransPortrait.php:1056 #: SelectCustomer.php:610 SupplierContacts.php:154 SupplierContacts.php:274 -#: UserSettings.php:183 WWW_Users.php:271 includes/PDFPickingListHeader.inc:25 +#: UserSettings.php:183 WWW_Users.php:274 includes/PDFPickingListHeader.inc:25 #: includes/PDFStatementPageHeader.inc:67 includes/PDFTransPageHeader.inc:82 #: includes/PDFTransPageHeaderPortrait.inc:109 #: includes/PO_PDFOrderPageHeader.inc:29 @@ -628,7 +628,7 @@ msgid "Contact Code" msgstr "Kontakt kód" -#: AddCustomerContacts.php:214 Factors.php:219 SupplierContacts.php:236 +#: AddCustomerContacts.php:214 Factors.php:233 SupplierContacts.php:236 msgid "Contact Name" msgstr "Jméno kontaktní osoby" @@ -697,9 +697,9 @@ msgstr "Datum" #: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:109 PcReportTab.php:173 -#: Stocks.php:1017 UpgradeDatabase.php:171 UpgradeDatabase.php:174 -#: UpgradeDatabase.php:177 UpgradeDatabase.php:180 UpgradeDatabase.php:183 -#: UpgradeDatabase.php:186 UpgradeDatabase.php:189 UpgradeDatabase.php:192 +#: Stocks.php:1017 UpgradeDatabase.php:172 UpgradeDatabase.php:175 +#: UpgradeDatabase.php:178 UpgradeDatabase.php:181 UpgradeDatabase.php:184 +#: UpgradeDatabase.php:187 UpgradeDatabase.php:190 UpgradeDatabase.php:193 #: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 #: Z_Upgrade_3.10-3.11.php:70 Z_Upgrade_3.10-3.11.php:74 #: Z_Upgrade_3.10-3.11.php:78 Z_Upgrade_3.11-4.00.php:62 @@ -886,7 +886,7 @@ #: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:960 #: ConfirmDispatch_Invoice.php:974 Contracts.php:580 CounterSales.php:1353 #: CounterSales.php:1367 Credit_Invoice.php:697 Credit_Invoice.php:718 -#: CustomerReceipt.php:523 CustomerReceipt.php:657 CustomerReceipt.php:685 +#: CustomerReceipt.php:537 CustomerReceipt.php:676 CustomerReceipt.php:704 #: CustomerTransInquiry.php:91 DeliveryDetails.php:396 GLProfit_Loss.php:596 #: GLTagProfit_Loss.php:511 PDFRemittanceAdvice.php:85 Payments.php:325 #: PurchData.php:86 PurchData.php:104 PurchData.php:245 @@ -900,7 +900,7 @@ #: SupplierInquiry.php:78 SupplierInquiry.php:100 SupplierInquiry.php:136 #: SupplierInquiry.php:190 SupplierTransInquiry.php:95 WOSerialNos.php:47 #: WorkOrderCosting.php:418 WorkOrderReceive.php:273 -#: Z_ChangeBranchCode.php:105 Z_ChangeCustomerCode.php:92 +#: Z_ChangeBranchCode.php:105 Z_ChangeCustomerCode.php:91 #: Z_DeleteCreditNote.php:58 Z_DeleteInvoice.php:87 #: includes/PDFPaymentRun_PymtFooter.php:59 #: includes/PDFPaymentRun_PymtFooter.php:89 @@ -921,11 +921,11 @@ msgid "Aged Debtor Analysis" msgstr "Ve věku dlužníka analýza" -#: AgedDebtors.php:461 DebtorsAtPeriodEnd.php:136 +#: AgedDebtors.php:461 DebtorsAtPeriodEnd.php:137 msgid "From Customer Code" msgstr "Od kódu zákazníka" -#: AgedDebtors.php:465 DebtorsAtPeriodEnd.php:139 +#: AgedDebtors.php:465 DebtorsAtPeriodEnd.php:141 msgid "To Customer Code" msgstr "Do kódu zákazníka" @@ -972,7 +972,7 @@ #: AgedDebtors.php:517 AgedSuppliers.php:328 BOMExtendedQty.php:295 #: BOMIndented.php:276 BOMIndentedReverse.php:255 BOMListing.php:129 -#: DebtorsAtPeriodEnd.php:157 InventoryPlanning.php:445 +#: DebtorsAtPeriodEnd.php:163 InventoryPlanning.php:445 #: InventoryPlanningPrefSupplier.php:516 InventoryQuantities.php:209 #: InventoryValuation.php:268 MRPPlannedPurchaseOrders.php:280 #: MRPPlannedWorkOrders.php:337 MRPReschedules.php:152 MRPShortages.php:302 @@ -1103,7 +1103,7 @@ msgstr "Kód oblasti" #: Areas.php:132 CustomerTypes.php:164 Factors.php:140 -#: FixedAssetCategories.php:134 GLAccounts.php:197 Locations.php:328 +#: FixedAssetCategories.php:138 GLAccounts.php:197 Locations.php:328 #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 #: PcExpenses.php:166 PcExpensesTypeTab.php:101 PcTabs.php:166 #: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:135 @@ -1155,7 +1155,7 @@ #: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:298 #: CounterSales.php:2141 CounterSales.php:2144 CustomerTransInquiry.php:31 -#: DailySalesInquiry.php:46 DailySalesInquiry.php:48 FixedAssetRegister.php:56 +#: DailySalesInquiry.php:47 DailySalesInquiry.php:49 FixedAssetRegister.php:56 #: FixedAssetRegister.php:65 InventoryQuantities.php:167 #: InventoryQuantities.php:193 InventoryQuantities.php:195 MRP.php:585 #: MRPReport.php:523 MRPReport.php:525 MRPReschedules.php:144 @@ -1209,8 +1209,8 @@ #: StockCategories.php:217 StockLocMovements.php:88 StockMovements.php:92 #: SupplierAllocations.php:453 SupplierInquiry.php:207 #: SupplierTransInquiry.php:19 SupplierTransInquiry.php:100 -#: Z_CheckAllocationsFrom.php:26 Z_CheckAllocationsFrom.php:49 -#: Z_CheckAllocs.php:57 Z_CheckGLTransBalance.php:11 +#: Z_CheckAllocationsFrom.php:32 Z_CheckAllocationsFrom.php:57 +#: Z_CheckAllocs.php:62 Z_CheckGLTransBalance.php:11 #: includes/InputSerialItemsFile.php:86 includes/InputSerialItemsFile.php:126 #: includes/PDFTaxPageHeader.inc:34 msgid "Type" @@ -1383,7 +1383,7 @@ msgstr "Vytištěno" #: BOMExtendedQty.php:321 BOMIndented.php:303 BOMIndentedReverse.php:283 -#: FixedAssetRegister.php:334 GLAccountReport.php:322 +#: FixedAssetRegister.php:351 GLAccountReport.php:322 #: InventoryPlanningPrefSupplier.php:58 InventoryQuantities.php:233 #: MRPPlannedPurchaseOrders.php:304 MRPPlannedWorkOrders.php:361 #: MRPReport.php:814 MRPReschedules.php:178 MRPShortages.php:332 @@ -1518,9 +1518,9 @@ #: BOMInquiry.php:199 BOMs.php:529 BOMs.php:855 ContractBOM.php:236 #: ContractBOM.php:346 ContractOtherReqts.php:93 CounterSales.php:2015 #: CounterSales.php:2196 CreditStatus.php:152 CreditStatus.php:241 -#: EmailConfirmation.php:192 FixedAssetCategories.php:159 -#: FixedAssetDepreciation.php:84 FixedAssetRegister.php:81 -#: FixedAssetRegister.php:355 FixedAssetTransfer.php:50 +#: EmailConfirmation.php:192 FixedAssetCategories.php:163 +#: FixedAssetDepreciation.php:86 FixedAssetRegister.php:83 +#: FixedAssetRegister.php:372 FixedAssetTransfer.php:50 #: FixedAssetTransfer.php:110 GLTags.php:59 GLTags.php:77 #: GLTransInquiry.php:47 GoodsReceived.php:99 InventoryQuantities.php:244 #: Labels.php:410 MRPDemandTypes.php:113 MRPDemands.php:91 MRPDemands.php:292 @@ -1632,7 +1632,7 @@ #: BOMInquiry.php:30 BOMs.php:839 ContractBOM.php:324 ContractBOM.php:329 #: Contracts.php:756 Contracts.php:759 CounterSales.php:2166 -#: CustomerReceipt.php:1026 CustomerReceipt.php:1029 +#: CustomerReceipt.php:1101 CustomerReceipt.php:1104 #: DiscountCategories.php:104 DiscountCategories.php:106 #: DiscountCategories.php:110 DiscountCategories.php:112 #: FixedAssetTransfer.php:61 MRPDemands.php:333 MRPDemands.php:336 @@ -1666,12 +1666,12 @@ #: StockStatus.php:59 StockTransfers.php:47 StockTransfers.php:458 #: StockUsage.php:64 SupplierTenders.php:359 WorkOrderEntry.php:606 #: WorkOrderIssue.php:667 Z_ChangeStockCategory.php:90 -#: Z_ChangeStockCode.php:303 +#: Z_ChangeStockCode.php:313 msgid "Stock Code" msgstr "Skladový kód" #: BOMInquiry.php:37 BOMs.php:844 ContractBOM.php:334 Contracts.php:764 -#: CounterSales.php:2170 CustomerReceipt.php:1034 FixedAssetTransfer.php:72 +#: CounterSales.php:2170 CustomerReceipt.php:1111 FixedAssetTransfer.php:72 #: MRPDemands.php:338 MRPReport.php:554 PO_Header.php:541 PO_Items.php:1060 #: SelectAsset.php:102 SelectCreditItems.php:229 SelectCreditItems.php:978 #: SelectCustomer.php:369 SelectGLAccount.php:96 SelectOrderItems.php:593 @@ -1709,7 +1709,7 @@ #: BOMInquiry.php:112 BOMs.php:528 BOMs.php:854 ContractBOM.php:345 #: CounterSales.php:2014 CounterSales.php:2195 CustomerBranches.php:367 -#: CustomerReceipt.php:1040 GLCodesInquiry.php:26 MRPDemands.php:90 +#: CustomerReceipt.php:1122 GLCodesInquiry.php:26 MRPDemands.php:90 #: MRPPlannedWorkOrders.php:256 MRPReport.php:746 PDFOrderStatus.php:318 #: PDFOrdersInvoiced.php:347 PDFPrintLabel.php:247 PO_Header.php:551 #: PO_Items.php:1072 PO_SelectOSPurchOrder.php:230 PO_SelectPurchOrder.php:211 @@ -2017,7 +2017,7 @@ msgid "Assembly" msgstr "Sestava" -#: BOMs.php:408 FixedAssetRegister.php:357 Stocks.php:958 Stocks.php:960 +#: BOMs.php:408 FixedAssetRegister.php:374 Stocks.php:958 Stocks.php:960 msgid "Purchased" msgstr "Koupeno" @@ -2053,7 +2053,7 @@ msgid "Level" msgstr "Úroveň" -#: BOMs.php:530 BOMs.php:660 Contracts.php:868 FixedAssetRegister.php:83 +#: BOMs.php:530 BOMs.php:660 Contracts.php:868 FixedAssetRegister.php:85 #: InventoryQuantities.php:245 Locations.php:328 MRP.php:551 MRP.php:583 #: PDFOrderStatus.php:278 PDFOrdersInvoiced.php:309 ReorderLevel.php:258 #: ReorderLevel.php:267 ReorderLevelLocation.php:169 StockCounts.php:133 @@ -2306,7 +2306,7 @@ msgid "Bank Address" msgstr "Adresa banky" -#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:755 +#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:783 #: CustomerTransInquiry.php:108 OffersReceived.php:109 PDFPrintLabel.php:97 #: PO_AuthorisationLevels.php:126 PO_AuthorisationLevels.php:209 #: PO_AuthorisationLevels.php:214 PO_AuthoriseMyOrders.php:115 @@ -2413,7 +2413,7 @@ "účtu. Zkontrolujte, zda vaše bankovní výpis a klikněte na check-box, když " "zjistíte, odpovídající transakce." -#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:728 +#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:749 #: DailyBankTransactions.php:32 PDFChequeListing.php:44 Payments.php:741 #: TaxAuthorities.php:151 TaxAuthorities.php:316 msgid "Bank Account" @@ -2545,7 +2545,7 @@ msgstr "Ref" #: BankMatching.php:264 ConfirmDispatch_Invoice.php:276 Credit_Invoice.php:279 -#: CustWhereAlloc.php:109 CustomerAllocations.php:364 CustomerReceipt.php:844 +#: CustWhereAlloc.php:109 CustomerAllocations.php:364 CustomerReceipt.php:892 #: CustomerTransInquiry.php:107 PaymentAllocations.php:67 Payments.php:1014 #: Payments.php:1018 Payments.php:1034 PcAssignCashToTab.php:222 #: PcAssignCashToTab.php:345 PcAuthorizeExpenses.php:90 @@ -2558,7 +2558,7 @@ #: SupplierAllocations.php:457 SupplierCredit.php:352 SupplierCredit.php:385 #: SupplierCredit.php:421 SupplierCredit.php:460 SupplierInvoice.php:330 #: SupplierInvoice.php:371 SupplierInvoice.php:411 SupplierInvoice.php:455 -#: SupplierTransInquiry.php:108 Z_CheckAllocs.php:61 +#: SupplierTransInquiry.php:108 Z_CheckAllocs.php:66 #: includes/PDFBankingSummaryPageHeader.inc:55 #: includes/PDFChequeListingPageHeader.inc:37 msgid "Amount" @@ -2627,25 +2627,25 @@ msgid "The bank accounts could not be retrieved by the SQL because" msgstr "Bankovní účty se nepodařilo získat na SQL, protože" -#: BankReconciliation.php:101 CustomerReceipt.php:719 +#: BankReconciliation.php:101 CustomerReceipt.php:737 #: DailyBankTransactions.php:28 Payments.php:737 SuppPaymentRun.php:317 msgid "The SQL used to retrieve the bank accounts was" msgstr "SQL slouží k získání bankovní účty byly" -#: BankReconciliation.php:111 CustomerReceipt.php:733 +#: BankReconciliation.php:111 CustomerReceipt.php:757 msgid "Bank Accounts have not yet been defined" msgstr "Bankovní účty dosud nebyly definovány" -#: BankReconciliation.php:111 CustomerReceipt.php:733 +#: BankReconciliation.php:111 CustomerReceipt.php:757 msgid "You must first" msgstr "Musíte nejprve" -#: BankReconciliation.php:111 CustomerReceipt.php:733 +#: BankReconciliation.php:111 CustomerReceipt.php:757 #: DailyBankTransactions.php:38 Payments.php:749 SuppPaymentRun.php:330 msgid "define the bank accounts" msgstr "definovat bankovních účtů" -#: BankReconciliation.php:111 CustomerReceipt.php:733 +#: BankReconciliation.php:111 CustomerReceipt.php:757 #: DailyBankTransactions.php:38 Payments.php:749 SuppPaymentRun.php:330 msgid "and general ledger accounts to be affected" msgstr "a účtů hlavní knihy mohly být postiženy" @@ -2686,7 +2686,7 @@ #: PrintCustTransPortrait.php:1038 StockMovements.php:93 #: SupplierAllocations.php:454 SupplierAllocations.php:567 #: SupplierAllocations.php:642 SupplierTransInquiry.php:101 -#: Z_CheckAllocs.php:58 Z_CheckGLTransBalance.php:12 +#: Z_CheckAllocs.php:63 Z_CheckGLTransBalance.php:12 #: includes/PDFQuotationPageHeader.inc:88 #: includes/PDFQuotationPortraitPageHeader.inc:86 #: includes/PDFStatementPageHeader.inc:168 @@ -2701,7 +2701,7 @@ #: GLAccountReport.php:337 PDFRemittanceAdvice.php:301 #: PaymentAllocations.php:64 PaymentAllocations.php:65 ShiptsList.php:37 #: StockCounts.php:99 StockCounts.php:135 StockLocMovements.php:93 -#: StockMovements.php:98 Z_CheckAllocs.php:59 +#: StockMovements.php:98 Z_CheckAllocs.php:64 #: includes/PDFBankingSummaryPageHeader.inc:40 #: includes/PDFCustTransListingPageHeader.inc:49 #: includes/PDFPeriodStockTransListingPageHeader.inc:48 @@ -2825,7 +2825,7 @@ #: COGSGLPostings.php:90 COGSGLPostings.php:189 COGSGLPostings.php:305 #: Customers.php:747 Customers.php:750 DiscountMatrix.php:96 -#: DiscountMatrix.php:153 Prices.php:223 PricesByCost.php:262 +#: DiscountMatrix.php:160 Prices.php:223 PricesByCost.php:262 #: SalesAnalRepts.php:32 SalesAnalRepts.php:34 SalesGLPostings.php:112 #: SalesGLPostings.php:224 SalesGLPostings.php:354 SelectOrderItems.php:710 #: api/api_xml-rpc.php:931 api/api_xml-rpc.php:974 @@ -2841,7 +2841,7 @@ msgid "Are you sure you wish to delete this COGS GL posting record?" msgstr "Jste si jisti, že chcete smazat tuto cenu?" -#: COGSGLPostings.php:190 CustomerReceipt.php:956 GLJournal.php:385 +#: COGSGLPostings.php:190 CustomerReceipt.php:1017 GLJournal.php:385 #: GLTransInquiry.php:44 Payments.php:1035 SupplierTransInquiry.php:170 #: TaxAuthorities.php:148 TaxAuthorities.php:149 index.php:1288 msgid "GL Account" @@ -2953,29 +2953,29 @@ msgid "Tax Authority Reference" msgstr "Daňový úřad Reference" -#: CompanyPreferences.php:238 Factors.php:207 +#: CompanyPreferences.php:238 Factors.php:210 msgid "Address Line 1" msgstr "1. řádek adresy" -#: CompanyPreferences.php:243 Factors.php:209 +#: CompanyPreferences.php:243 Factors.php:213 msgid "Address Line 2" msgstr "2. řádek adresy" -#: CompanyPreferences.php:248 Factors.php:211 +#: CompanyPreferences.php:248 Factors.php:217 msgid "Address Line 3" msgstr "3. řádek adresy" -#: CompanyPreferences.php:253 Factors.php:213 +#: CompanyPreferences.php:253 Factors.php:221 msgid "Address Line 4" msgstr "4. řádek adresy" #: CompanyPreferences.php:258 Customers.php:459 Customers.php:704 -#: Customers.php:734 Factors.php:215 +#: Customers.php:734 Factors.php:225 msgid "Address Line 5" msgstr "5. řádek adresy" #: CompanyPreferences.php:263 Customers.php:461 Customers.php:708 -#: Customers.php:738 Factors.php:217 +#: Customers.php:738 Factors.php:229 msgid "Address Line 6" msgstr "6. řádek adresy" @@ -2987,9 +2987,9 @@ msgid "Facsimile Number" msgstr "Faxové číslo" -#: CompanyPreferences.php:278 CustLoginSetup.php:150 Customers.php:449 -#: SuppLoginSetup.php:138 Suppliers.php:679 Suppliers.php:856 -#: WWW_Users.php:445 +#: CompanyPreferences.php:278 CustLoginSetup.php:161 Customers.php:449 +#: SuppLoginSetup.php:147 Suppliers.php:679 Suppliers.php:856 +#: WWW_Users.php:448 msgid "Email Address" msgstr "E-mailová adresa" @@ -3047,7 +3047,7 @@ #: CompanyPreferences.php:519 ConfirmDispatch_Invoice.php:617 #: ConfirmDispatch_Invoice.php:1645 Credit_Invoice.php:1509 -#: FixedAssetItems.php:120 FixedAssetItems.php:573 GLBudgets.php:234 +#: FixedAssetItems.php:123 FixedAssetItems.php:625 GLBudgets.php:234 #: GLTags.php:64 GoodsReceived.php:248 GoodsReceived.php:254 #: GoodsReceived.php:261 GoodsReceived.php:738 Labels.php:259 #: MRPCalendar.php:314 PO_AuthoriseMyOrders.php:138 Payments.php:886 @@ -3177,10 +3177,10 @@ msgid "Confirm Dispatch and Invoice" msgstr "Potvrdit Expedice a faktury" -#: ConfirmDispatch_Invoice.php:248 Contracts.php:772 CustLoginSetup.php:21 -#: CustLoginSetup.php:22 CustomerAllocations.php:327 CustomerBranches.php:363 +#: ConfirmDispatch_Invoice.php:248 Contracts.php:772 CustLoginSetup.php:31 +#: CustLoginSetup.php:32 CustomerAllocations.php:327 CustomerBranches.php:363 #: CustomerBranches.php:532 CustomerBranches.php:579 CustomerInquiry.php:126 -#: CustomerReceipt.php:846 CustomerReceipt.php:897 CustomerReceipt.php:1022 +#: CustomerReceipt.php:894 CustomerReceipt.php:948 CustomerReceipt.php:1096 #: CustomerTransInquiry.php:101 Customers.php:14 Customers.php:325 #: DeliveryDetails.php:804 FTP_RadioBeacon.php:51 PDFOrderStatus.php:275 #: PDFOrdersInvoiced.php:305 PricesByCost.php:153 SalesGraph.php:180 @@ -3202,14 +3202,14 @@ #: ConfirmDispatch_Invoice.php:248 CustEDISetup.php:93 Customers.php:440 #: Customers.php:643 Customers.php:678 DeliveryDetails.php:804 #: OrderDetails.php:67 SalesAnalRepts.php:27 SalesAnalRepts.php:29 -#: WWW_Users.php:272 WWW_Users.php:491 Z_ChangeBranchCode.php:199 +#: WWW_Users.php:275 WWW_Users.php:494 Z_ChangeBranchCode.php:201 #: includes/PDFStatementPageHeader.inc:112 includes/PDFTransPageHeader.inc:46 #: includes/PDFTransPageHeaderPortrait.inc:55 msgid "Customer Code" msgstr "Kód zákazníka" -#: ConfirmDispatch_Invoice.php:249 CustEDISetup.php:96 CustomerReceipt.php:235 -#: CustomerReceipt.php:1041 Customers.php:443 Customers.php:684 +#: ConfirmDispatch_Invoice.php:249 CustEDISetup.php:96 CustomerReceipt.php:248 +#: CustomerReceipt.php:1123 Customers.php:443 Customers.php:684 #: Customers.php:714 DeliveryDetails.php:805 OrderDetails.php:69 #: POReport.php:494 POReport.php:1268 SalesInquiry.php:754 #: SalesInquiry.php:764 SalesInquiry.php:788 SalesInquiry.php:932 @@ -3311,7 +3311,7 @@ msgstr "Cena" #: ConfirmDispatch_Invoice.php:272 CounterSales.php:736 Credit_Invoice.php:275 -#: CustomerReceipt.php:845 DeliveryDetails.php:828 OrderDetails.php:167 +#: CustomerReceipt.php:893 DeliveryDetails.php:828 OrderDetails.php:167 #: PrintCustTrans.php:865 PrintCustTrans.php:954 PrintCustTrans.php:1003 #: PrintCustTransPortrait.php:912 PrintCustTransPortrait.php:1010 #: PrintCustTransPortrait.php:1067 RecurringSalesOrders.php:323 @@ -3864,7 +3864,7 @@ msgstr "Nelze načíst mbflag" #: ConfirmDispatch_Invoice.php:925 CounterSales.php:1317 -#: FixedAssetItems.php:574 SalesAnalReptCols.php:328 Stocks.php:1199 +#: FixedAssetItems.php:627 SalesAnalReptCols.php:328 Stocks.php:1199 #: Suppliers.php:965 includes/MiscFunctions.php:36 msgid "WARNING" msgstr "UPOZORNĚNÍ" @@ -3893,7 +3893,7 @@ #: ConfirmDispatch_Invoice.php:959 CounterSales.php:1352 #: Credit_Invoice.php:696 EDIMessageFormat.php:43 EDISendInvoices.php:105 -#: FixedAssetCategories.php:86 FixedAssetCategories.php:105 +#: FixedAssetCategories.php:90 FixedAssetCategories.php:109 #: PricesBasedOnMarkUp.php:334 PricesBasedOnMarkUp.php:350 #: SelectCreditItems.php:1407 SpecialOrder.php:493 StockCategories.php:23 #: StockCategories.php:84 StockCategories.php:155 Z_ReApplyCostToSA.php:62 @@ -4175,7 +4175,7 @@ #: ConfirmDispatch_Invoice.php:1601 ConfirmDispatch_Invoice.php:1603 #: ContractBOM.php:293 CounterSales.php:1969 CounterSales.php:1971 -#: CustomerReceipt.php:528 DeliveryDetails.php:577 DeliveryDetails.php:581 +#: CustomerReceipt.php:542 DeliveryDetails.php:577 DeliveryDetails.php:581 #: DeliveryDetails.php:779 DeliveryDetails.php:782 GLBalanceSheet.php:18 #: GLProfit_Loss.php:22 GLTagProfit_Loss.php:22 GLTagProfit_Loss.php:519 #: GLTags.php:51 GLTransInquiry.php:36 PDFStockLocTransfer.php:28 @@ -4282,7 +4282,7 @@ msgstr "To je problém výběru část záznamy k zobrazení, protože" #: ContractBOM.php:140 PO_Items.php:989 SupplierTenders.php:471 -#: Z_ChangeStockCategory.php:63 Z_ChangeStockCode.php:92 +#: Z_ChangeStockCategory.php:63 Z_ChangeStockCode.php:104 msgid "The SQL statement that failed was" msgstr "Příkazu SQL, který byl neúspěšný" @@ -4391,13 +4391,13 @@ msgid "Create a New Stock Item" msgstr "Vytvoření nové položky skladem" -#: ContractBOM.php:348 FixedAssetItems.php:473 Stocks.php:838 +#: ContractBOM.php:348 FixedAssetItems.php:490 Stocks.php:838 #: SupplierTenders.php:492 msgid "Image" msgstr "Obrázek" -#: ContractBOM.php:368 CounterSales.php:2029 FixedAssetItems.php:468 -#: FixedAssetItems.php:472 PO_Items.php:1098 SalesCategories.php:248 +#: ContractBOM.php:368 CounterSales.php:2029 FixedAssetItems.php:485 +#: FixedAssetItems.php:489 PO_Items.php:1098 SalesCategories.php:248 #: SelectCreditItems.php:1017 SelectOrderItems.php:1489 #: SelectOrderItems.php:1667 Stocks.php:832 Stocks.php:836 #: SupplierTenders.php:518 WorkOrderEntry.php:643 WorkOrderIssue.php:709 @@ -4505,7 +4505,7 @@ #: PO_SelectOSPurchOrder.php:480 PO_SelectPurchOrder.php:431 PurchData.php:164 #: ReprintGRN.php:78 SelectProduct.php:349 SelectSupplier.php:143 #: ShipmentCosting.php:531 ShipmentCosting.php:608 Shipt_Select.php:293 -#: ShiptsList.php:11 SuppCreditGRNs.php:269 SuppLoginSetup.php:24 +#: ShiptsList.php:11 SuppCreditGRNs.php:269 SuppLoginSetup.php:33 #: SuppPriceList.php:205 SuppPriceList.php:276 SupplierAllocations.php:566 #: SupplierAllocations.php:641 SupplierCredit.php:262 SupplierInquiry.php:118 #: SupplierInvoice.php:234 SupplierTransInquiry.php:104 @@ -5018,7 +5018,7 @@ "Alespoň jednoho zákazníka Obor Název klíčového slova nebo výpis z oboru " "zákazníka kódu nebo pobočky telefonní číslo musí být zapsány na vyhledávání" -#: Contracts.php:663 CustomerReceipt.php:574 SelectCustomer.php:163 +#: Contracts.php:663 CustomerReceipt.php:592 SelectCustomer.php:163 #: SelectOrderItems.php:327 msgid "The searched customer records requested cannot be retrieved because" msgstr "Hledali záznamy zákazníků požadovaná nelze načíst, protože" @@ -5125,12 +5125,12 @@ msgid "Branch" msgstr "Větev" -#: Contracts.php:774 Factors.php:260 SelectCreditItems.php:240 +#: Contracts.php:774 Factors.php:289 SelectCreditItems.php:240 #: SelectCustomer.php:415 SelectOrderItems.php:603 SupplierContacts.php:226 msgid "Contact" msgstr "Kontakt" -#: Contracts.php:776 EmailConfirmation.php:160 Factors.php:223 +#: Contracts.php:776 EmailConfirmation.php:160 Factors.php:241 #: PDFCustomerList.php:342 PDFRemittanceAdvice.php:241 #: SelectCreditItems.php:242 SelectCustomer.php:418 SelectOrderItems.php:605 #: includes/PDFOrderPageHeader_generic.inc:32 @@ -5143,7 +5143,7 @@ msgid "Fax" msgstr "Fax" -#: Contracts.php:824 CustomerInquiry.php:126 CustomerReceipt.php:897 +#: Contracts.php:824 CustomerInquiry.php:126 CustomerReceipt.php:948 #: PDFRemittanceAdvice.php:267 PO_Header.php:600 PrintCustTrans.php:847 #: PrintCustTransPortrait.php:893 SupplierInquiry.php:118 #: includes/PDFQuotationPageHeader.inc:86 @@ -5174,7 +5174,7 @@ msgid "The stock categories could not be retrieved because" msgstr "Populace kategorie se nepodařilo získat, protože" -#: Contracts.php:850 FixedAssetItems.php:485 PricesBasedOnMarkUp.php:109 +#: Contracts.php:850 FixedAssetItems.php:504 PricesBasedOnMarkUp.php:109 #: SpecialOrder.php:690 Stocks.php:848 msgid "The SQL used to retrieve stock categories and failed was" msgstr "SQL slouží k načtení zásob kategorií a neúspěšný byl" @@ -5233,7 +5233,7 @@ msgid "Contract Status" msgstr "Stav zakázky" -#: Contracts.php:923 SuppLoginSetup.php:20 WWW_Users.php:21 index.php:20 +#: Contracts.php:923 SuppLoginSetup.php:29 WWW_Users.php:21 index.php:20 msgid "Setup" msgstr "Nastavení" @@ -5532,8 +5532,8 @@ msgid "Net" msgstr "Čistý" -#: CounterSales.php:816 CustomerReceipt.php:831 CustomerReceipt.php:848 -#: CustomerReceipt.php:1011 GLAccountInquiry.php:155 GLAccountReport.php:341 +#: CounterSales.php:816 CustomerReceipt.php:869 CustomerReceipt.php:896 +#: CustomerReceipt.php:1079 GLAccountInquiry.php:155 GLAccountReport.php:341 #: GLJournal.php:364 GLJournal.php:388 Payments.php:1036 #: SelectOrderItems.php:1402 SuppContractChgs.php:80 SuppContractChgs.php:167 #: SuppTransGLAnalysis.php:107 SuppTransGLAnalysis.php:199 @@ -5703,7 +5703,7 @@ msgstr "New Work Pořadové číslo" #: CounterSales.php:1212 DeliveryDetails.php:555 EDIMessageFormat.php:127 -#: EDIMessageFormat.php:204 Prices_Customer.php:36 +#: EDIMessageFormat.php:205 Prices_Customer.php:36 #: RecurringSalesOrdersProcess.php:88 ReverseGRN.php:336 SpecialOrder.php:116 #: SpecialOrder.php:119 msgid "for" @@ -5735,42 +5735,42 @@ msgstr "" "SQL, které se nepodařilo vložit GL transakce na vrub bankovního účtu bylo" -#: CounterSales.php:1827 CustomerReceipt.php:442 +#: CounterSales.php:1827 CustomerReceipt.php:456 msgid "Cannot insert a GL transaction for the bank account debit" msgstr "Nelze vložit transakce GL na vrub bankovního účtu" -#: CounterSales.php:1845 CustomerReceipt.php:491 +#: CounterSales.php:1845 CustomerReceipt.php:505 msgid "" "The SQL that failed to insert the GL transaction for the debtors account " "credit was" msgstr "" "SQL, které se nepodařilo vložit GL transakce pro dlužníky účet byl úvěr" -#: CounterSales.php:1846 CustomerReceipt.php:492 +#: CounterSales.php:1846 CustomerReceipt.php:506 msgid "Cannot insert a GL transaction for the debtors account credit" msgstr "Nelze vložit GL transakce pro dlužníky účet kreditní" -#: CounterSales.php:1898 CustomerReceipt.php:469 +#: CounterSales.php:1898 CustomerReceipt.php:483 msgid "The SQL that failed to insert the bank account transaction was" msgstr "SQL, které se nepodařilo vložit na bankovní účet, transakce byla" -#: CounterSales.php:1899 CustomerReceipt.php:470 +#: CounterSales.php:1899 CustomerReceipt.php:484 msgid "Cannot insert a bank transaction" msgstr "Nelze vložit bankovní transakce" -#: CounterSales.php:1927 CustomerReceipt.php:401 +#: CounterSales.php:1927 CustomerReceipt.php:415 msgid "The SQL that failed to insert the customer receipt transaction was" msgstr "SQL, které se nepodařilo vložit zákazníkovi přijetí transakce" -#: CounterSales.php:1928 CustomerReceipt.php:402 +#: CounterSales.php:1928 CustomerReceipt.php:416 msgid "Cannot insert a receipt transaction against the customer because" msgstr "Nelze vložit přijetí transakce vůči zákazníkovi, protože" -#: CounterSales.php:1937 CustomerReceipt.php:410 +#: CounterSales.php:1937 CustomerReceipt.php:424 msgid "The SQL that failed to update the date of the last payment received was" msgstr "SQL, které se nepodařilo aktualizovat datum poslední obdržela platbu," -#: CounterSales.php:1938 CustomerReceipt.php:411 +#: CounterSales.php:1938 CustomerReceipt.php:425 msgid "" "Cannot update the customer record for the date of the last payment received " "because" @@ -6394,9 +6394,9 @@ msgid "The currency code cannot contain any of the following characters" msgstr "Kód měny nemůže obsahovat žádný z těchto znaků" -#: Currencies.php:107 CustEDISetup.php:31 CustLoginSetup.php:40 -#: Customers.php:56 Stocks.php:113 SuppLoginSetup.php:42 TaxCategories.php:31 -#: WWW_Users.php:66 WorkCentres.php:35 Z_ChangeBranchCode.php:28 +#: Currencies.php:107 CustEDISetup.php:31 CustLoginSetup.php:51 +#: Customers.php:56 Stocks.php:113 SuppLoginSetup.php:51 TaxCategories.php:31 +#: WWW_Users.php:68 WorkCentres.php:35 Z_ChangeBranchCode.php:28 #: Z_ImportStocks.php:123 msgid "or a space" msgstr "nebo mezeru" @@ -6622,27 +6622,37 @@ msgid "Customer Login Configuration" msgstr "Přihlášení zákazníka konfigurace" -#: CustLoginSetup.php:22 SelectCustomer.php:210 SuppLoginSetup.php:24 +#: CustLoginSetup.php:15 +#, fuzzy +msgid "A customer must first be selected before logins can be defined for it" +msgstr "Položka musí být nejprve vybrán před tuto stránku se nazývá" + +#: CustLoginSetup.php:15 +#, fuzzy +msgid "Select A Customer" +msgstr "Vybrat zákazníka" + +#: CustLoginSetup.php:32 SelectCustomer.php:210 SuppLoginSetup.php:33 msgid " has been selected" msgstr " byla vybrána" -#: CustLoginSetup.php:37 SuppLoginSetup.php:39 WWW_Users.php:63 +#: CustLoginSetup.php:48 SuppLoginSetup.php:48 WWW_Users.php:65 msgid "The user ID entered must be at least 4 characters long" msgstr "ID uživatele, zadal musí být nejméně 4 znaky dlouhé" -#: CustLoginSetup.php:40 SuppLoginSetup.php:42 WWW_Users.php:66 +#: CustLoginSetup.php:51 SuppLoginSetup.php:51 WWW_Users.php:68 msgid "User names cannot contain any of the following characters" msgstr "Uživatelská jména nesmí obsahovat žádný z následujících znaků" -#: CustLoginSetup.php:44 SuppLoginSetup.php:46 WWW_Users.php:70 +#: CustLoginSetup.php:55 SuppLoginSetup.php:55 WWW_Users.php:72 msgid "The password entered must be at least 5 characters long" msgstr "Zadané heslo musí být minimálně 5 znaků" -#: CustLoginSetup.php:48 SuppLoginSetup.php:50 WWW_Users.php:74 +#: CustLoginSetup.php:59 SuppLoginSetup.php:59 WWW_Users.php:76 msgid "The password cannot contain the user id" msgstr "Heslo nesmí obsahovat uživatelské id" -#: CustLoginSetup.php:51 WWW_Users.php:77 +#: CustLoginSetup.php:62 WWW_Users.php:80 msgid "" "If you enter a Customer Code you must also enter a Branch Code valid for " "this Customer" @@ -6650,109 +6660,109 @@ "Zadáte-li kód zákazníka, musíte také zadat Pobočka kodex platný pro tohoto " "zákazníka" -#: CustLoginSetup.php:61 WWW_Users.php:102 +#: CustLoginSetup.php:72 WWW_Users.php:105 msgid "The check on validity of the customer code and branch failed because" msgstr "Kontrola platnosti kód zákazníka a větve se nezdařilo, protože" -#: CustLoginSetup.php:62 WWW_Users.php:103 +#: CustLoginSetup.php:73 WWW_Users.php:106 msgid "The SQL that was used to check the customer code and branch was" msgstr "SQL, který byl použit ke kontrole kód zákazníka a větev byla" -#: CustLoginSetup.php:66 WWW_Users.php:107 +#: CustLoginSetup.php:77 WWW_Users.php:110 msgid "The entered Branch Code is not valid for the entered Customer Code" msgstr "Vstoupil Pobočka Kód není platný pro zadané kód zákazníka" -#: CustLoginSetup.php:104 SuppLoginSetup.php:93 +#: CustLoginSetup.php:115 SuppLoginSetup.php:102 #, fuzzy msgid "The user could not be added because" msgstr "Aktivum nelze přidat, protože" -#: CustLoginSetup.php:105 SuppLoginSetup.php:94 +#: CustLoginSetup.php:116 SuppLoginSetup.php:103 #, fuzzy msgid "The SQL that was used to insert the new user and failed was" msgstr "SQL, který byl použit k aktualizaci uživatele a neúspěšný byl" -#: CustLoginSetup.php:107 +#: CustLoginSetup.php:118 #, fuzzy msgid "A new customer login has been created" msgstr "Nové práce, aby byla vytvořena pro" -#: CustLoginSetup.php:120 SuppLoginSetup.php:108 WWW_Users.php:268 -#: WWW_Users.php:402 +#: CustLoginSetup.php:131 SuppLoginSetup.php:117 WWW_Users.php:271 +#: WWW_Users.php:405 msgid "User Login" msgstr "Přihlášení uživatele" -#: CustLoginSetup.php:138 SMTPServer.php:59 SuppLoginSetup.php:126 -#: WWW_Users.php:433 includes/Login.php:59 +#: CustLoginSetup.php:149 SMTPServer.php:59 SuppLoginSetup.php:135 +#: WWW_Users.php:436 includes/Login.php:59 msgid "Password" msgstr "Heslo" -#: CustLoginSetup.php:142 SuppLoginSetup.php:130 WWW_Users.php:269 -#: WWW_Users.php:437 +#: CustLoginSetup.php:153 SuppLoginSetup.php:139 WWW_Users.php:272 +#: WWW_Users.php:440 msgid "Full Name" msgstr "Celé jméno" -#: CustLoginSetup.php:146 Locations.php:555 SalesPeople.php:330 -#: SuppLoginSetup.php:134 SupplierContacts.php:262 WWW_Users.php:441 +#: CustLoginSetup.php:157 Locations.php:555 SalesPeople.php:330 +#: SuppLoginSetup.php:143 SupplierContacts.php:262 WWW_Users.php:444 msgid "Telephone No" msgstr "Telefonní číslo" -#: CustLoginSetup.php:155 CustomerBranches.php:545 CustomerBranches.php:582 -#: WWW_Users.php:273 WWW_Users.php:496 +#: CustLoginSetup.php:166 CustomerBranches.php:545 CustomerBranches.php:582 +#: WWW_Users.php:276 WWW_Users.php:499 #: includes/PDFCustomerListPageHeader.inc:84 api/api_xml-rpc.php:244 msgid "Branch Code" msgstr "Kód oboru" -#: CustLoginSetup.php:175 SuppLoginSetup.php:196 WWW_Users.php:530 +#: CustLoginSetup.php:186 SuppLoginSetup.php:205 WWW_Users.php:533 msgid "Reports Page Size" msgstr "Zprávy Velikost stránky" -#: CustLoginSetup.php:179 CustLoginSetup.php:181 EmailConfirmation.php:119 +#: CustLoginSetup.php:190 CustLoginSetup.php:192 EmailConfirmation.php:119 #: PrintCustOrder.php:101 PrintCustOrder_generic.php:111 -#: SuppLoginSetup.php:200 SuppLoginSetup.php:202 WWW_Users.php:534 -#: WWW_Users.php:536 +#: SuppLoginSetup.php:209 SuppLoginSetup.php:211 WWW_Users.php:537 +#: WWW_Users.php:539 msgid "A4" msgstr "A4" -#: CustLoginSetup.php:185 CustLoginSetup.php:187 CustLoginSetup.php:191 -#: CustLoginSetup.php:193 SuppLoginSetup.php:206 SuppLoginSetup.php:208 -#: SuppLoginSetup.php:212 SuppLoginSetup.php:214 WWW_Users.php:540 -#: WWW_Users.php:542 WWW_Users.php:546 WWW_Users.php:548 +#: CustLoginSetup.php:196 CustLoginSetup.php:198 CustLoginSetup.php:202 +#: CustLoginSetup.php:204 SuppLoginSetup.php:215 SuppLoginSetup.php:217 +#: SuppLoginSetup.php:221 SuppLoginSetup.php:223 WWW_Users.php:543 +#: WWW_Users.php:545 WWW_Users.php:549 WWW_Users.php:551 msgid "A3" msgstr "A3" -#: CustLoginSetup.php:191 CustLoginSetup.php:193 CustLoginSetup.php:203 -#: CustLoginSetup.php:205 CustLoginSetup.php:214 CustLoginSetup.php:216 +#: CustLoginSetup.php:202 CustLoginSetup.php:204 CustLoginSetup.php:214 +#: CustLoginSetup.php:216 CustLoginSetup.php:225 CustLoginSetup.php:227 #: EmailConfirmation.php:119 PrintCustOrder.php:101 -#: PrintCustOrder_generic.php:111 SuppLoginSetup.php:212 -#: SuppLoginSetup.php:214 SuppLoginSetup.php:224 SuppLoginSetup.php:226 -#: SuppLoginSetup.php:235 SuppLoginSetup.php:237 WWW_Users.php:546 -#: WWW_Users.php:548 WWW_Users.php:558 WWW_Users.php:560 WWW_Users.php:569 -#: WWW_Users.php:571 +#: PrintCustOrder_generic.php:111 SuppLoginSetup.php:221 +#: SuppLoginSetup.php:223 SuppLoginSetup.php:233 SuppLoginSetup.php:235 +#: SuppLoginSetup.php:244 SuppLoginSetup.php:246 WWW_Users.php:549 +#: WWW_Users.php:551 WWW_Users.php:561 WWW_Users.php:563 WWW_Users.php:572 +#: WWW_Users.php:574 msgid "landscape" msgstr "na šířku" -#: CustLoginSetup.php:197 CustLoginSetup.php:199 CustLoginSetup.php:203 -#: CustLoginSetup.php:205 SuppLoginSetup.php:218 SuppLoginSetup.php:220 -#: SuppLoginSetup.php:224 SuppLoginSetup.php:226 WWW_Users.php:552 -#: WWW_Users.php:554 WWW_Users.php:558 WWW_Users.php:560 +#: CustLoginSetup.php:208 CustLoginSetup.php:210 CustLoginSetup.php:214 +#: CustLoginSetup.php:216 SuppLoginSetup.php:227 SuppLoginSetup.php:229 +#: SuppLoginSetup.php:233 SuppLoginSetup.php:235 WWW_Users.php:555 +#: WWW_Users.php:557 WWW_Users.php:561 WWW_Users.php:563 msgid "Letter" msgstr "Dopis" -#: CustLoginSetup.php:209 CustLoginSetup.php:211 CustLoginSetup.php:214 -#: CustLoginSetup.php:216 SuppLoginSetup.php:230 SuppLoginSetup.php:232 -#: SuppLoginSetup.php:235 SuppLoginSetup.php:237 WWW_Users.php:564 -#: WWW_Users.php:566 WWW_Users.php:569 WWW_Users.php:571 +#: CustLoginSetup.php:220 CustLoginSetup.php:222 CustLoginSetup.php:225 +#: CustLoginSetup.php:227 SuppLoginSetup.php:239 SuppLoginSetup.php:241 +#: SuppLoginSetup.php:244 SuppLoginSetup.php:246 WWW_Users.php:567 +#: WWW_Users.php:569 WWW_Users.php:572 WWW_Users.php:574 msgid "Legal" msgstr "Právní" -#: CustLoginSetup.php:222 SuppLoginSetup.php:243 UserSettings.php:146 -#: WWW_Users.php:279 WWW_Users.php:578 +#: CustLoginSetup.php:233 SuppLoginSetup.php:252 UserSettings.php:146 +#: WWW_Users.php:282 WWW_Users.php:581 msgid "Theme" msgstr "Téma" -#: CustLoginSetup.php:244 SuppLoginSetup.php:267 UserSettings.php:127 -#: WWW_Users.php:280 WWW_Users.php:603 +#: CustLoginSetup.php:255 SuppLoginSetup.php:276 UserSettings.php:127 +#: WWW_Users.php:283 WWW_Users.php:606 msgid "Language" msgstr "Jazyk" @@ -6778,7 +6788,7 @@ msgid "The transaction number to be queried must be entered first" msgstr "Číslo transakce, které budou dotazovány musí být zapsány první" -#: CustWhereAlloc.php:87 CustomerTransInquiry.php:90 Z_CheckAllocs.php:51 +#: CustWhereAlloc.php:87 CustomerTransInquiry.php:90 Z_CheckAllocs.php:56 msgid "" "The customer transactions for the selected criteria could not be retrieved " "because" @@ -6797,23 +6807,23 @@ msgstr "Celkem transakce" #: CustWhereAlloc.php:108 CustomerTransInquiry.php:106 -#: SupplierTransInquiry.php:107 Z_CheckAllocs.php:60 +#: SupplierTransInquiry.php:107 Z_CheckAllocs.php:65 msgid "Ex Rate" msgstr "Ex Hodnotit" -#: CustWhereAlloc.php:110 Z_CheckAllocs.php:62 +#: CustWhereAlloc.php:110 Z_CheckAllocs.php:67 msgid "Alloc" msgstr "Alloc" #: CustWhereAlloc.php:128 EmailCustTrans.php:12 SalesInquiry.php:1080 -#: SupplierCredit.php:1113 Z_CheckAllocs.php:80 +#: SupplierCredit.php:1113 Z_CheckAllocs.php:85 msgid "Credit Note" msgstr "Dobropis" #: CustWhereAlloc.php:130 PcAssignCashToTab.php:225 PcAssignCashToTab.php:361 #: PcAuthorizeExpenses.php:93 PcClaimExpensesFromTab.php:215 #: PcClaimExpensesFromTab.php:379 PcReportTab.php:174 PcReportTab.php:328 -#: Z_CheckAllocs.php:82 Z_SalesIntegrityCheck.php:90 +#: Z_CheckAllocs.php:87 Z_SalesIntegrityCheck.php:90 #: Z_SalesIntegrityCheck.php:105 msgid "Receipt" msgstr "Obdržení" @@ -6879,7 +6889,7 @@ msgid "Allocate Receipt" msgstr "Příjem přidělit" -#: CustomerAllocations.php:322 CustomerReceipt.php:529 +#: CustomerAllocations.php:322 CustomerReceipt.php:543 msgid "Allocate Receipts" msgstr "Příjmy přidělit" @@ -6922,7 +6932,7 @@ msgstr "Přesto se" #: CustomerAllocations.php:365 CustomerAllocations.php:491 -#: CustomerAllocations.php:532 CustomerReceipt.php:231 CustomerReceipt.php:529 +#: CustomerAllocations.php:532 CustomerReceipt.php:240 CustomerReceipt.php:543 #: SupplierAllocations.php:458 SupplierAllocations.php:594 #: SupplierAllocations.php:670 #, php-format @@ -6974,7 +6984,7 @@ msgid "Process Allocations" msgstr "Proces Přidělené" -#: CustomerAllocations.php:434 CustomerReceipt.php:1015 Labels.php:265 +#: CustomerAllocations.php:434 CustomerReceipt.php:1086 Labels.php:265 #: Payments.php:1026 PcAssignCashToTab.php:177 PcAssignCashToTab.php:373 #: PcAuthorizeExpenses.php:323 PcClaimExpensesFromTab.php:167 #: PcClaimExpensesFromTab.php:385 PcExpenses.php:344 PcExpensesTypeTab.php:140 @@ -7313,8 +7323,8 @@ msgid "Define Sales People" msgstr "Definice prodejců" -#: CustomerBranches.php:683 DailySalesInquiry.php:40 SalesPeople.php:170 -#: WWW_Users.php:275 +#: CustomerBranches.php:683 DailySalesInquiry.php:41 SalesPeople.php:170 +#: WWW_Users.php:278 msgid "Salesperson" msgstr "Prodejce" @@ -7369,7 +7379,7 @@ msgid "Phone Number" msgstr "Telefonní číslo" -#: CustomerBranches.php:763 Factors.php:262 +#: CustomerBranches.php:763 Factors.php:291 msgid "Fax Number" msgstr "Faxové číslo" @@ -7459,48 +7469,48 @@ msgid "The config value NumberOfMonthMustBeShown cannot be retrieved" msgstr "Config hodnota NumberOfMonthMustBeShown nelze načíst" -#: CustomerInquiry.php:127 CustomerReceipt.php:897 SelectOrderItems.php:711 +#: CustomerInquiry.php:127 CustomerReceipt.php:948 SelectOrderItems.php:711 #: SupplierCredit.php:264 SupplierInquiry.php:120 SupplierInvoice.php:236 msgid "Terms" msgstr "Podmínky" -#: CustomerInquiry.php:127 CustomerReceipt.php:897 Customers.php:512 +#: CustomerInquiry.php:127 CustomerReceipt.php:948 Customers.php:512 #: Customers.php:806 Customers.php:836 msgid "Credit Limit" msgstr "Úvěrový limit" -#: CustomerInquiry.php:128 CustomerReceipt.php:897 Customers.php:533 +#: CustomerInquiry.php:128 CustomerReceipt.php:948 Customers.php:533 #: Customers.php:873 Customers.php:879 Customers.php:897 Customers.php:919 #: Customers.php:924 index.php:1080 msgid "Credit Status" msgstr "Stav úvěru" -#: CustomerInquiry.php:131 CustomerReceipt.php:900 +#: CustomerInquiry.php:131 CustomerReceipt.php:952 msgid "ACCOUNT ON HOLD" msgstr "ÚČET NA HOLD" -#: CustomerInquiry.php:136 CustomerReceipt.php:905 PrintCustStatements.php:362 +#: CustomerInquiry.php:136 CustomerReceipt.php:958 PrintCustStatements.php:362 #: SupplierInquiry.php:142 msgid "Total Balance" msgstr "Celkem Zůstatek" -#: CustomerInquiry.php:137 CustomerReceipt.php:906 PrintCustStatements.php:358 +#: CustomerInquiry.php:137 CustomerReceipt.php:959 PrintCustStatements.php:358 #: SalesPeople.php:206 Shipments.php:396 Stocks.php:977 Stocks.php:979 #: SupplierInquiry.php:143 includes/PDFAgedDebtorsPageHeader.inc:50 #: includes/PDFAgedSuppliersPageHeader.inc:36 msgid "Current" msgstr "Proud" -#: CustomerInquiry.php:138 CustomerReceipt.php:907 SupplierInquiry.php:144 +#: CustomerInquiry.php:138 CustomerReceipt.php:960 SupplierInquiry.php:144 msgid "Now Due" msgstr "Nyní Díky" -#: CustomerInquiry.php:139 CustomerInquiry.php:140 CustomerReceipt.php:908 -#: CustomerReceipt.php:909 SupplierInquiry.php:145 SupplierInquiry.php:146 +#: CustomerInquiry.php:139 CustomerInquiry.php:140 CustomerReceipt.php:961 +#: CustomerReceipt.php:962 SupplierInquiry.php:145 SupplierInquiry.php:146 msgid "Days Overdue" msgstr "Dnů po splatnosti" -#: CustomerInquiry.php:140 CustomerReceipt.php:909 PrintCustStatements.php:361 +#: CustomerInquiry.php:140 CustomerReceipt.php:962 PrintCustStatements.php:361 #: SupplierInquiry.php:146 msgid "Over" msgstr "Přes" @@ -7522,7 +7532,7 @@ msgstr "Neexistují žádné transakce, k zobrazení, protože" #: CustomerInquiry.php:202 SupplierInquiry.php:211 -#: Z_CheckAllocationsFrom.php:29 Z_CheckAllocationsFrom.php:52 +#: Z_CheckAllocationsFrom.php:35 Z_CheckAllocationsFrom.php:60 #: includes/PDFStatementPageHeader.inc:172 msgid "Allocated" msgstr "Přidělených" @@ -7596,31 +7606,31 @@ msgid "Receipt Entry" msgstr "Příjem Vstup" -#: CustomerReceipt.php:32 +#: CustomerReceipt.php:35 msgid "A bank account must be selected for this receipt" msgstr "Bankovní účet, musí být vybrán pro tento příjem" -#: CustomerReceipt.php:47 Payments.php:699 +#: CustomerReceipt.php:54 Payments.php:699 msgid "The bank account name cannot be retrieved because" msgstr "Na bankovní účet, jméno nemůže získat, protože" -#: CustomerReceipt.php:56 Payments.php:709 +#: CustomerReceipt.php:63 Payments.php:709 msgid "The bank account number" msgstr "Číslo bankovního účtu" -#: CustomerReceipt.php:56 +#: CustomerReceipt.php:63 msgid "is not set up as a bank account" msgstr "není nastavena jako bankovní účet" -#: CustomerReceipt.php:69 +#: CustomerReceipt.php:76 msgid "The exchange rate entered should be numeric" msgstr "Směnného kurzu by měla být součástí číselné" -#: CustomerReceipt.php:76 +#: CustomerReceipt.php:83 msgid "The functional exchange rate entered should be numeric" msgstr "Funkční směnný kurz by měl být součástí číselné" -#: CustomerReceipt.php:92 +#: CustomerReceipt.php:99 msgid "" "Changing the currency of the receipt means that existing entries need to be " "re-done - only customers trading in the selected currency can be selected" @@ -7628,71 +7638,71 @@ "Změna měny přijetí znamená, že stávající položky je třeba re-udělat - jen " "zákazníci obchodování ve vybrané měně je možné zvolit" -#: CustomerReceipt.php:160 Payments.php:650 +#: CustomerReceipt.php:167 Payments.php:650 msgid "No General Ledger code has been chosen" msgstr "Č. General Ledger kód byl vybrán" -#: CustomerReceipt.php:160 GLJournal.php:171 Payments.php:633 Payments.php:650 +#: CustomerReceipt.php:167 GLJournal.php:171 Payments.php:633 Payments.php:650 msgid "so this GL analysis item could not be added" msgstr "takže tato analýza GL položky by neměly být přidávány" -#: CustomerReceipt.php:206 +#: CustomerReceipt.php:213 msgid "The company has not yet been set up properly" msgstr "Společnost dosud nebyl správně nastaven" -#: CustomerReceipt.php:206 +#: CustomerReceipt.php:213 msgid "this information is needed to process the batch" msgstr "tato informace je nutná ke zpracování dávky" -#: CustomerReceipt.php:206 +#: CustomerReceipt.php:213 msgid "Processing has been cancelled" msgstr "Zpracování byla zrušena" -#: CustomerReceipt.php:231 +#: CustomerReceipt.php:240 msgid "Summary of Receipt Batch" msgstr "Shrnutí Příjem dávky" -#: CustomerReceipt.php:233 +#: CustomerReceipt.php:246 msgid "Batch Number" msgstr "Číslo šarže" -#: CustomerReceipt.php:234 CustomerReceipt.php:753 +#: CustomerReceipt.php:247 CustomerReceipt.php:779 msgid "Date Banked" msgstr "Datum Uložené" -#: CustomerReceipt.php:236 CustomerReceipt.php:847 +#: CustomerReceipt.php:249 CustomerReceipt.php:895 msgid "GL Code" msgstr "GL kód" -#: CustomerReceipt.php:237 CustomerReceipt.php:996 +#: CustomerReceipt.php:250 CustomerReceipt.php:1061 msgid "Amount of Receipt" msgstr "Výše Příjem" -#: CustomerReceipt.php:260 +#: CustomerReceipt.php:274 msgid "Print a Customer Receipt" msgstr "Tisk účtenek zákazníka" -#: CustomerReceipt.php:284 +#: CustomerReceipt.php:298 msgid "Cannot insert a GL entry for the receipt because" msgstr "Nelze vložit záznam GL pro přijetí, protože" -#: CustomerReceipt.php:285 +#: CustomerReceipt.php:299 msgid "The SQL that failed to insert the receipt GL entry was" msgstr "SQL, které se nepodařilo vložit převzetí GL vstup" -#: CustomerReceipt.php:354 +#: CustomerReceipt.php:368 msgid "Act Transfer" msgstr "Zákon Transfer" -#: CustomerReceipt.php:363 +#: CustomerReceipt.php:377 msgid "The SQL that failed to insert the bank transaction was" msgstr "SQL, které se nepodařilo vložit bankovní transakce" -#: CustomerReceipt.php:364 Payments.php:553 Payments.php:579 +#: CustomerReceipt.php:378 Payments.php:553 Payments.php:579 msgid "Cannot insert a bank transaction using the SQL" msgstr "Nelze vložit bankovní transakce pomocí SQL" -#: CustomerReceipt.php:441 +#: CustomerReceipt.php:455 msgid "" "The SQL that failed to insert the GL transaction fro the bank account debit " "was" @@ -7700,38 +7710,38 @@ "SQL, které se nepodařilo vložit GL transakci spatřují na bankovní účet, " "debetní byl" -#: CustomerReceipt.php:515 +#: CustomerReceipt.php:529 msgid "" "The SQL that failed to insert the GL transaction for the payment discount " "debit was" msgstr "" "SQL, které se nepodařilo vložit GL transakci debetní platební sleva byla" -#: CustomerReceipt.php:516 +#: CustomerReceipt.php:530 msgid "Cannot in... [truncated message content] |
From: <dai...@us...> - 2011-11-06 07:09:31
|
Revision: 4741 http://web-erp.svn.sourceforge.net/web-erp/?rev=4741&view=rev Author: daintree Date: 2011-11-06 07:09:21 +0000 (Sun, 06 Nov 2011) Log Message: ----------- pre 4.06RC1 Modified Paths: -------------- trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/includes/ConnectDB.inc trunk/includes/LanguagesArray.php trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/upgrade4.05-4.06.sql trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/UpgradeDatabase.php 2011-11-06 07:09:21 UTC (rev 4741) @@ -117,6 +117,7 @@ case '4.05': case '4.05.1': case '4.05.2': + case '4.05.3': $SQLScripts[] = './sql/mysql/upgrade4.05-4.06.sql'; case '4.06': break; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/doc/Change.log 2011-11-06 07:09:21 UTC (rev 4741) @@ -1,5 +1,7 @@ webERP Change Log +6/11/11 Release 4.06RC1 + 30/10/11 Exson: Modification to Stocks.php to avoid losing PanSize and ShrinkFactor 30/10/11 Phil: Made it so a saleman cannot be deleted if a user is setup referring only to this salesperson 29/10/11 High-Tech Bridge SA Security Research Lab <adv...@ht...> - sanitising $_SERVER['PHP_SELF'] and unquoted sql in reportwriter/FormMaker.php and reportwriter/ReportMaker.php Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/includes/ConnectDB.inc 2011-11-06 07:09:21 UTC (rev 4741) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.05.3'; //must update manually every time there is a DB change +$Version='4.06'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/includes/LanguagesArray.php =================================================================== --- trunk/includes/LanguagesArray.php 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/includes/LanguagesArray.php 2011-11-06 07:09:21 UTC (rev 4741) @@ -8,8 +8,8 @@ $LanguagesArray['en_GB.utf8']['LanguageName'] = _('English British'); $LanguagesArray['en_GB.utf8']['WindowsLocale'] = 'english-uk'; -$LanguagesArray['en_GB.utf8']['DecimalPoint'] = ','; -$LanguagesArray['en_GB.utf8']['ThousandsSeparator'] = '.'; +$LanguagesArray['en_GB.utf8']['DecimalPoint'] = '.'; +$LanguagesArray['en_GB.utf8']['ThousandsSeparator'] = ','; $LanguagesArray['cz_CZ.utf8']['LanguageName'] = _('Czech'); $LanguagesArray['cz_CZ.utf8']['WindowsLocale'] = 'czech'; Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-06 07:09:21 UTC (rev 4741) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-01 22:26+1300\n" +"POT-Creation-Date: 2011-11-06 19:49+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -142,7 +142,7 @@ #: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306 #: CustomerBranches.php:316 CustomerTypes.php:147 CustomerTypes.php:157 #: Customers.php:289 Customers.php:298 Customers.php:306 Customers.php:314 -#: Factors.php:134 FixedAssetCategories.php:129 GLAccounts.php:80 +#: Factors.php:134 FixedAssetCategories.php:133 GLAccounts.php:80 #: GLAccounts.php:96 Locations.php:237 Locations.php:245 Locations.php:256 #: Locations.php:265 Locations.php:274 Locations.php:283 Locations.php:292 #: Locations.php:301 MRPDemandTypes.php:87 PaymentMethods.php:138 @@ -210,7 +210,7 @@ #: CustEDISetup.php:17 DailyBankTransactions.php:11 DebtorsAtPeriodEnd.php:125 #: DiscountCategories.php:10 DiscountCategories.php:131 DiscountMatrix.php:16 #: EDIMessageFormat.php:104 FixedAssetLocations.php:9 -#: FixedAssetRegister.php:13 FixedAssetRegister.php:237 +#: FixedAssetRegister.php:13 FixedAssetRegister.php:243 #: FixedAssetTransfer.php:31 FormDesigner.php:129 GLBalanceSheet.php:362 #: GLBudgets.php:29 GLJournal.php:246 InventoryPlanning.php:374 #: InventoryPlanningPrefSupplier.php:467 Labels.php:115 Labels.php:270 @@ -237,7 +237,7 @@ #: WWW_Users.php:31 WhereUsedInquiry.php:18 WorkCentres.php:111 #: WorkCentres.php:162 WorkOrderCosting.php:13 WorkOrderEntry.php:11 #: WorkOrderIssue.php:22 WorkOrderReceive.php:15 WorkOrderStatus.php:42 -#: Z_BottomUpCosts.php:51 +#: Z_BottomUpCosts.php:56 msgid "Search" msgstr "Vyhledávání" @@ -245,7 +245,7 @@ msgid "Group Name" msgstr "Název skupiny" -#: AccountGroups.php:228 EDIMessageFormat.php:129 EDIMessageFormat.php:207 +#: AccountGroups.php:228 EDIMessageFormat.php:129 EDIMessageFormat.php:208 msgid "Section" msgstr "Sekce" @@ -292,8 +292,8 @@ #: SystemParameters.php:654 SystemParameters.php:781 SystemParameters.php:916 #: SystemParameters.php:918 SystemParameters.php:928 SystemParameters.php:930 #: SystemParameters.php:984 SystemParameters.php:996 SystemParameters.php:998 -#: TaxGroups.php:307 TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:629 -#: WWW_Users.php:631 +#: TaxGroups.php:307 TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:632 +#: WWW_Users.php:634 msgid "Yes" msgstr "Ano" @@ -327,8 +327,8 @@ #: SystemParameters.php:655 SystemParameters.php:782 SystemParameters.php:915 #: SystemParameters.php:919 SystemParameters.php:927 SystemParameters.php:931 #: SystemParameters.php:985 SystemParameters.php:995 SystemParameters.php:999 -#: TaxGroups.php:308 TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:628 -#: WWW_Users.php:632 includes/PDFLowGPPageHeader.inc:44 +#: TaxGroups.php:308 TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:631 +#: WWW_Users.php:635 includes/PDFLowGPPageHeader.inc:44 #: includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Ne" @@ -338,8 +338,8 @@ #: BOMs.php:149 BankAccounts.php:223 COGSGLPostings.php:108 #: COGSGLPostings.php:206 CreditStatus.php:174 Currencies.php:272 #: CustomerBranches.php:414 CustomerTypes.php:202 Customers.php:1011 -#: Customers.php:1045 EDIMessageFormat.php:150 Factors.php:300 -#: FixedAssetCategories.php:182 FixedAssetLocations.php:102 +#: Customers.php:1045 EDIMessageFormat.php:150 Factors.php:329 +#: FixedAssetCategories.php:186 FixedAssetLocations.php:107 #: FreightCosts.php:240 GLAccounts.php:312 GLTags.php:91 GeocodeSetup.php:173 #: Labels.php:411 Locations.php:382 MRPDemandTypes.php:120 MRPDemands.php:306 #: PO_AuthorisationLevels.php:151 PaymentMethods.php:200 PaymentTerms.php:205 @@ -353,7 +353,7 @@ #: SuppTransGLAnalysis.php:120 SupplierContacts.php:163 SupplierTypes.php:189 #: TaxAuthorities.php:174 TaxCategories.php:182 TaxGroups.php:188 #: TaxProvinces.php:180 UnitsOfMeasure.php:185 WWW_Access.php:123 -#: WWW_Users.php:315 WorkCentres.php:141 includes/InputSerialItems.php:88 +#: WWW_Users.php:318 WorkCentres.php:141 includes/InputSerialItems.php:88 #: includes/OutputSerialItems.php:20 #, php-format msgid "Edit" @@ -369,9 +369,9 @@ #: BOMs.php:151 BankAccounts.php:224 COGSGLPostings.php:109 #: COGSGLPostings.php:207 ContractBOM.php:266 ContractOtherReqts.php:119 #: CounterSales.php:812 CreditStatus.php:175 Credit_Invoice.php:381 -#: Currencies.php:275 CustomerReceipt.php:865 CustomerTypes.php:203 -#: Customers.php:1046 DiscountCategories.php:219 DiscountMatrix.php:175 -#: EDIMessageFormat.php:151 FixedAssetCategories.php:183 FreightCosts.php:241 +#: Currencies.php:275 CustomerReceipt.php:913 CustomerTypes.php:203 +#: Customers.php:1046 DiscountCategories.php:219 DiscountMatrix.php:182 +#: EDIMessageFormat.php:151 FixedAssetCategories.php:187 FreightCosts.php:241 #: GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 GeocodeSetup.php:174 #: Labels.php:411 Locations.php:383 MRPDemandTypes.php:121 MRPDemands.php:307 #: PO_AuthorisationLevels.php:153 PO_Items.php:711 PaymentMethods.php:201 @@ -390,7 +390,7 @@ #: SuppTransGLAnalysis.php:121 SupplierContacts.php:164 SupplierTypes.php:191 #: TaxAuthorities.php:175 TaxCategories.php:183 TaxGroups.php:189 #: TaxProvinces.php:181 UnitsOfMeasure.php:186 WOSerialNos.php:319 -#: WWW_Access.php:124 WWW_Users.php:316 WorkCentres.php:142 +#: WWW_Access.php:124 WWW_Users.php:319 WorkCentres.php:142 #: includes/InputSerialItemsKeyed.php:59 includes/OutputSerialItems.php:99 #, php-format msgid "Delete" @@ -436,18 +436,18 @@ #: AccountGroups.php:397 AccountSections.php:264 AddCustomerContacts.php:258 #: AddCustomerNotes.php:245 AddCustomerTypeNotes.php:210 Areas.php:227 #: BOMs.php:759 BankAccounts.php:391 COGSGLPostings.php:354 -#: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:261 -#: DiscountMatrix.php:136 EDIMessageFormat.php:247 -#: FixedAssetCategories.php:322 FixedAssetLocations.php:148 +#: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:272 +#: DiscountMatrix.php:141 EDIMessageFormat.php:248 +#: FixedAssetCategories.php:344 FixedAssetLocations.php:156 #: FreightCosts.php:339 GLAccounts.php:262 GeocodeSetup.php:270 #: Locations.php:597 MRPDemandTypes.php:187 MRPDemands.php:419 #: OffersReceived.php:56 OffersReceived.php:143 PO_AuthorisationLevels.php:248 #: PaymentMethods.php:282 PaymentTerms.php:309 Prices_Customer.php:354 #: SalesAnalReptCols.php:552 SalesAnalRepts.php:514 SalesGLPostings.php:416 #: SalesPeople.php:368 Shippers.php:200 StockCategories.php:581 -#: SuppLoginSetup.php:285 SupplierContacts.php:281 TaxAuthorities.php:327 +#: SuppLoginSetup.php:293 SupplierContacts.php:281 TaxAuthorities.php:327 #: TaxCategories.php:237 TaxProvinces.php:235 UnitsOfMeasure.php:240 -#: WWW_Users.php:671 WorkCentres.php:279 +#: WWW_Users.php:674 WorkCentres.php:279 msgid "Enter Information" msgstr "Vložit informace" @@ -517,7 +517,7 @@ msgid "Customer Contacts" msgstr "Zákazník Kontakty" -#: AddCustomerContacts.php:20 CustEDISetup.php:9 CustLoginSetup.php:11 +#: AddCustomerContacts.php:20 CustEDISetup.php:9 CustLoginSetup.php:21 #: Z_CheckDebtorsControl.php:20 msgid "Back to Customers" msgstr "Zpět k zákazníkům" @@ -556,7 +556,7 @@ #: AddCustomerContacts.php:61 AddCustomerNotes.php:52 #: AddCustomerTypeNotes.php:49 Areas.php:73 CustomerTypes.php:69 -#: DeliveryDetails.php:774 Factors.php:105 FixedAssetItems.php:243 +#: DeliveryDetails.php:774 Factors.php:105 FixedAssetItems.php:246 #: MRPCalendar.php:176 PO_Items.php:374 PcAssignCashToTab.php:88 #: PcClaimExpensesFromTab.php:79 PcExpenses.php:95 PcTabs.php:102 #: PcTypeTabs.php:60 SalesAnalReptCols.php:129 SalesPeople.php:97 @@ -594,13 +594,13 @@ #: AddCustomerContacts.php:131 AddCustomerContacts.php:240 #: CustomerBranches.php:374 CustomerBranches.php:774 CustomerInquiry.php:253 #: Customers.php:1001 Customers.php:1009 EmailCustTrans.php:15 -#: EmailCustTrans.php:63 Factors.php:225 Factors.php:263 Locations.php:563 +#: EmailCustTrans.php:63 Factors.php:245 Factors.php:292 Locations.php:563 #: OrderDetails.php:109 PDFRemittanceAdvice.php:243 PO_PDFPurchOrder.php:369 #: PO_PDFPurchOrder.php:372 PrintCustTrans.php:714 PrintCustTrans.php:945 #: PrintCustTrans.php:994 PrintCustTransPortrait.php:753 #: PrintCustTransPortrait.php:999 PrintCustTransPortrait.php:1056 #: SelectCustomer.php:610 SupplierContacts.php:154 SupplierContacts.php:274 -#: UserSettings.php:183 WWW_Users.php:271 includes/PDFPickingListHeader.inc:25 +#: UserSettings.php:183 WWW_Users.php:274 includes/PDFPickingListHeader.inc:25 #: includes/PDFStatementPageHeader.inc:67 includes/PDFTransPageHeader.inc:82 #: includes/PDFTransPageHeaderPortrait.inc:109 #: includes/PO_PDFOrderPageHeader.inc:29 @@ -628,7 +628,7 @@ msgid "Contact Code" msgstr "Kontakt kód" -#: AddCustomerContacts.php:214 Factors.php:219 SupplierContacts.php:236 +#: AddCustomerContacts.php:214 Factors.php:233 SupplierContacts.php:236 msgid "Contact Name" msgstr "Jméno kontaktní osoby" @@ -697,9 +697,9 @@ msgstr "Datum" #: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:109 PcReportTab.php:173 -#: Stocks.php:1017 UpgradeDatabase.php:171 UpgradeDatabase.php:174 -#: UpgradeDatabase.php:177 UpgradeDatabase.php:180 UpgradeDatabase.php:183 -#: UpgradeDatabase.php:186 UpgradeDatabase.php:189 UpgradeDatabase.php:192 +#: Stocks.php:1017 UpgradeDatabase.php:172 UpgradeDatabase.php:175 +#: UpgradeDatabase.php:178 UpgradeDatabase.php:181 UpgradeDatabase.php:184 +#: UpgradeDatabase.php:187 UpgradeDatabase.php:190 UpgradeDatabase.php:193 #: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 #: Z_Upgrade_3.10-3.11.php:70 Z_Upgrade_3.10-3.11.php:74 #: Z_Upgrade_3.10-3.11.php:78 Z_Upgrade_3.11-4.00.php:62 @@ -886,7 +886,7 @@ #: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:960 #: ConfirmDispatch_Invoice.php:974 Contracts.php:580 CounterSales.php:1353 #: CounterSales.php:1367 Credit_Invoice.php:697 Credit_Invoice.php:718 -#: CustomerReceipt.php:523 CustomerReceipt.php:657 CustomerReceipt.php:685 +#: CustomerReceipt.php:537 CustomerReceipt.php:676 CustomerReceipt.php:704 #: CustomerTransInquiry.php:91 DeliveryDetails.php:396 GLProfit_Loss.php:596 #: GLTagProfit_Loss.php:511 PDFRemittanceAdvice.php:85 Payments.php:325 #: PurchData.php:86 PurchData.php:104 PurchData.php:245 @@ -900,7 +900,7 @@ #: SupplierInquiry.php:78 SupplierInquiry.php:100 SupplierInquiry.php:136 #: SupplierInquiry.php:190 SupplierTransInquiry.php:95 WOSerialNos.php:47 #: WorkOrderCosting.php:418 WorkOrderReceive.php:273 -#: Z_ChangeBranchCode.php:105 Z_ChangeCustomerCode.php:92 +#: Z_ChangeBranchCode.php:105 Z_ChangeCustomerCode.php:91 #: Z_DeleteCreditNote.php:58 Z_DeleteInvoice.php:87 #: includes/PDFPaymentRun_PymtFooter.php:59 #: includes/PDFPaymentRun_PymtFooter.php:89 @@ -921,11 +921,11 @@ msgid "Aged Debtor Analysis" msgstr "Ve věku dlužníka analýza" -#: AgedDebtors.php:461 DebtorsAtPeriodEnd.php:136 +#: AgedDebtors.php:461 DebtorsAtPeriodEnd.php:137 msgid "From Customer Code" msgstr "Od kódu zákazníka" -#: AgedDebtors.php:465 DebtorsAtPeriodEnd.php:139 +#: AgedDebtors.php:465 DebtorsAtPeriodEnd.php:141 msgid "To Customer Code" msgstr "Do kódu zákazníka" @@ -972,7 +972,7 @@ #: AgedDebtors.php:517 AgedSuppliers.php:328 BOMExtendedQty.php:295 #: BOMIndented.php:276 BOMIndentedReverse.php:255 BOMListing.php:129 -#: DebtorsAtPeriodEnd.php:157 InventoryPlanning.php:445 +#: DebtorsAtPeriodEnd.php:163 InventoryPlanning.php:445 #: InventoryPlanningPrefSupplier.php:516 InventoryQuantities.php:209 #: InventoryValuation.php:268 MRPPlannedPurchaseOrders.php:280 #: MRPPlannedWorkOrders.php:337 MRPReschedules.php:152 MRPShortages.php:302 @@ -1103,7 +1103,7 @@ msgstr "Kód oblasti" #: Areas.php:132 CustomerTypes.php:164 Factors.php:140 -#: FixedAssetCategories.php:134 GLAccounts.php:197 Locations.php:328 +#: FixedAssetCategories.php:138 GLAccounts.php:197 Locations.php:328 #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 #: PcExpenses.php:166 PcExpensesTypeTab.php:101 PcTabs.php:166 #: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:135 @@ -1155,7 +1155,7 @@ #: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:298 #: CounterSales.php:2141 CounterSales.php:2144 CustomerTransInquiry.php:31 -#: DailySalesInquiry.php:46 DailySalesInquiry.php:48 FixedAssetRegister.php:56 +#: DailySalesInquiry.php:47 DailySalesInquiry.php:49 FixedAssetRegister.php:56 #: FixedAssetRegister.php:65 InventoryQuantities.php:167 #: InventoryQuantities.php:193 InventoryQuantities.php:195 MRP.php:585 #: MRPReport.php:523 MRPReport.php:525 MRPReschedules.php:144 @@ -1209,8 +1209,8 @@ #: StockCategories.php:217 StockLocMovements.php:88 StockMovements.php:92 #: SupplierAllocations.php:453 SupplierInquiry.php:207 #: SupplierTransInquiry.php:19 SupplierTransInquiry.php:100 -#: Z_CheckAllocationsFrom.php:26 Z_CheckAllocationsFrom.php:49 -#: Z_CheckAllocs.php:57 Z_CheckGLTransBalance.php:11 +#: Z_CheckAllocationsFrom.php:32 Z_CheckAllocationsFrom.php:57 +#: Z_CheckAllocs.php:62 Z_CheckGLTransBalance.php:11 #: includes/InputSerialItemsFile.php:86 includes/InputSerialItemsFile.php:126 #: includes/PDFTaxPageHeader.inc:34 msgid "Type" @@ -1383,7 +1383,7 @@ msgstr "Vytištěno" #: BOMExtendedQty.php:321 BOMIndented.php:303 BOMIndentedReverse.php:283 -#: FixedAssetRegister.php:334 GLAccountReport.php:322 +#: FixedAssetRegister.php:351 GLAccountReport.php:322 #: InventoryPlanningPrefSupplier.php:58 InventoryQuantities.php:233 #: MRPPlannedPurchaseOrders.php:304 MRPPlannedWorkOrders.php:361 #: MRPReport.php:814 MRPReschedules.php:178 MRPShortages.php:332 @@ -1518,9 +1518,9 @@ #: BOMInquiry.php:199 BOMs.php:529 BOMs.php:855 ContractBOM.php:236 #: ContractBOM.php:346 ContractOtherReqts.php:93 CounterSales.php:2015 #: CounterSales.php:2196 CreditStatus.php:152 CreditStatus.php:241 -#: EmailConfirmation.php:192 FixedAssetCategories.php:159 -#: FixedAssetDepreciation.php:84 FixedAssetRegister.php:81 -#: FixedAssetRegister.php:355 FixedAssetTransfer.php:50 +#: EmailConfirmation.php:192 FixedAssetCategories.php:163 +#: FixedAssetDepreciation.php:86 FixedAssetRegister.php:83 +#: FixedAssetRegister.php:372 FixedAssetTransfer.php:50 #: FixedAssetTransfer.php:110 GLTags.php:59 GLTags.php:77 #: GLTransInquiry.php:47 GoodsReceived.php:99 InventoryQuantities.php:244 #: Labels.php:410 MRPDemandTypes.php:113 MRPDemands.php:91 MRPDemands.php:292 @@ -1632,7 +1632,7 @@ #: BOMInquiry.php:30 BOMs.php:839 ContractBOM.php:324 ContractBOM.php:329 #: Contracts.php:756 Contracts.php:759 CounterSales.php:2166 -#: CustomerReceipt.php:1026 CustomerReceipt.php:1029 +#: CustomerReceipt.php:1101 CustomerReceipt.php:1104 #: DiscountCategories.php:104 DiscountCategories.php:106 #: DiscountCategories.php:110 DiscountCategories.php:112 #: FixedAssetTransfer.php:61 MRPDemands.php:333 MRPDemands.php:336 @@ -1666,12 +1666,12 @@ #: StockStatus.php:59 StockTransfers.php:47 StockTransfers.php:458 #: StockUsage.php:64 SupplierTenders.php:359 WorkOrderEntry.php:606 #: WorkOrderIssue.php:667 Z_ChangeStockCategory.php:90 -#: Z_ChangeStockCode.php:303 +#: Z_ChangeStockCode.php:313 msgid "Stock Code" msgstr "Skladový kód" #: BOMInquiry.php:37 BOMs.php:844 ContractBOM.php:334 Contracts.php:764 -#: CounterSales.php:2170 CustomerReceipt.php:1034 FixedAssetTransfer.php:72 +#: CounterSales.php:2170 CustomerReceipt.php:1111 FixedAssetTransfer.php:72 #: MRPDemands.php:338 MRPReport.php:554 PO_Header.php:541 PO_Items.php:1060 #: SelectAsset.php:102 SelectCreditItems.php:229 SelectCreditItems.php:978 #: SelectCustomer.php:369 SelectGLAccount.php:96 SelectOrderItems.php:593 @@ -1709,7 +1709,7 @@ #: BOMInquiry.php:112 BOMs.php:528 BOMs.php:854 ContractBOM.php:345 #: CounterSales.php:2014 CounterSales.php:2195 CustomerBranches.php:367 -#: CustomerReceipt.php:1040 GLCodesInquiry.php:26 MRPDemands.php:90 +#: CustomerReceipt.php:1122 GLCodesInquiry.php:26 MRPDemands.php:90 #: MRPPlannedWorkOrders.php:256 MRPReport.php:746 PDFOrderStatus.php:318 #: PDFOrdersInvoiced.php:347 PDFPrintLabel.php:247 PO_Header.php:551 #: PO_Items.php:1072 PO_SelectOSPurchOrder.php:230 PO_SelectPurchOrder.php:211 @@ -2017,7 +2017,7 @@ msgid "Assembly" msgstr "Sestava" -#: BOMs.php:408 FixedAssetRegister.php:357 Stocks.php:958 Stocks.php:960 +#: BOMs.php:408 FixedAssetRegister.php:374 Stocks.php:958 Stocks.php:960 msgid "Purchased" msgstr "Koupeno" @@ -2053,7 +2053,7 @@ msgid "Level" msgstr "Úroveň" -#: BOMs.php:530 BOMs.php:660 Contracts.php:868 FixedAssetRegister.php:83 +#: BOMs.php:530 BOMs.php:660 Contracts.php:868 FixedAssetRegister.php:85 #: InventoryQuantities.php:245 Locations.php:328 MRP.php:551 MRP.php:583 #: PDFOrderStatus.php:278 PDFOrdersInvoiced.php:309 ReorderLevel.php:258 #: ReorderLevel.php:267 ReorderLevelLocation.php:169 StockCounts.php:133 @@ -2306,7 +2306,7 @@ msgid "Bank Address" msgstr "Adresa banky" -#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:755 +#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:783 #: CustomerTransInquiry.php:108 OffersReceived.php:109 PDFPrintLabel.php:97 #: PO_AuthorisationLevels.php:126 PO_AuthorisationLevels.php:209 #: PO_AuthorisationLevels.php:214 PO_AuthoriseMyOrders.php:115 @@ -2413,7 +2413,7 @@ "účtu. Zkontrolujte, zda vaše bankovní výpis a klikněte na check-box, když " "zjistíte, odpovídající transakce." -#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:728 +#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:749 #: DailyBankTransactions.php:32 PDFChequeListing.php:44 Payments.php:741 #: TaxAuthorities.php:151 TaxAuthorities.php:316 msgid "Bank Account" @@ -2545,7 +2545,7 @@ msgstr "Ref" #: BankMatching.php:264 ConfirmDispatch_Invoice.php:276 Credit_Invoice.php:279 -#: CustWhereAlloc.php:109 CustomerAllocations.php:364 CustomerReceipt.php:844 +#: CustWhereAlloc.php:109 CustomerAllocations.php:364 CustomerReceipt.php:892 #: CustomerTransInquiry.php:107 PaymentAllocations.php:67 Payments.php:1014 #: Payments.php:1018 Payments.php:1034 PcAssignCashToTab.php:222 #: PcAssignCashToTab.php:345 PcAuthorizeExpenses.php:90 @@ -2558,7 +2558,7 @@ #: SupplierAllocations.php:457 SupplierCredit.php:352 SupplierCredit.php:385 #: SupplierCredit.php:421 SupplierCredit.php:460 SupplierInvoice.php:330 #: SupplierInvoice.php:371 SupplierInvoice.php:411 SupplierInvoice.php:455 -#: SupplierTransInquiry.php:108 Z_CheckAllocs.php:61 +#: SupplierTransInquiry.php:108 Z_CheckAllocs.php:66 #: includes/PDFBankingSummaryPageHeader.inc:55 #: includes/PDFChequeListingPageHeader.inc:37 msgid "Amount" @@ -2627,25 +2627,25 @@ msgid "The bank accounts could not be retrieved by the SQL because" msgstr "Bankovní účty se nepodařilo získat na SQL, protože" -#: BankReconciliation.php:101 CustomerReceipt.php:719 +#: BankReconciliation.php:101 CustomerReceipt.php:737 #: DailyBankTransactions.php:28 Payments.php:737 SuppPaymentRun.php:317 msgid "The SQL used to retrieve the bank accounts was" msgstr "SQL slouží k získání bankovní účty byly" -#: BankReconciliation.php:111 CustomerReceipt.php:733 +#: BankReconciliation.php:111 CustomerReceipt.php:757 msgid "Bank Accounts have not yet been defined" msgstr "Bankovní účty dosud nebyly definovány" -#: BankReconciliation.php:111 CustomerReceipt.php:733 +#: BankReconciliation.php:111 CustomerReceipt.php:757 msgid "You must first" msgstr "Musíte nejprve" -#: BankReconciliation.php:111 CustomerReceipt.php:733 +#: BankReconciliation.php:111 CustomerReceipt.php:757 #: DailyBankTransactions.php:38 Payments.php:749 SuppPaymentRun.php:330 msgid "define the bank accounts" msgstr "definovat bankovních účtů" -#: BankReconciliation.php:111 CustomerReceipt.php:733 +#: BankReconciliation.php:111 CustomerReceipt.php:757 #: DailyBankTransactions.php:38 Payments.php:749 SuppPaymentRun.php:330 msgid "and general ledger accounts to be affected" msgstr "a účtů hlavní knihy mohly být postiženy" @@ -2686,7 +2686,7 @@ #: PrintCustTransPortrait.php:1038 StockMovements.php:93 #: SupplierAllocations.php:454 SupplierAllocations.php:567 #: SupplierAllocations.php:642 SupplierTransInquiry.php:101 -#: Z_CheckAllocs.php:58 Z_CheckGLTransBalance.php:12 +#: Z_CheckAllocs.php:63 Z_CheckGLTransBalance.php:12 #: includes/PDFQuotationPageHeader.inc:88 #: includes/PDFQuotationPortraitPageHeader.inc:86 #: includes/PDFStatementPageHeader.inc:168 @@ -2701,7 +2701,7 @@ #: GLAccountReport.php:337 PDFRemittanceAdvice.php:301 #: PaymentAllocations.php:64 PaymentAllocations.php:65 ShiptsList.php:37 #: StockCounts.php:99 StockCounts.php:135 StockLocMovements.php:93 -#: StockMovements.php:98 Z_CheckAllocs.php:59 +#: StockMovements.php:98 Z_CheckAllocs.php:64 #: includes/PDFBankingSummaryPageHeader.inc:40 #: includes/PDFCustTransListingPageHeader.inc:49 #: includes/PDFPeriodStockTransListingPageHeader.inc:48 @@ -2825,7 +2825,7 @@ #: COGSGLPostings.php:90 COGSGLPostings.php:189 COGSGLPostings.php:305 #: Customers.php:747 Customers.php:750 DiscountMatrix.php:96 -#: DiscountMatrix.php:153 Prices.php:223 PricesByCost.php:262 +#: DiscountMatrix.php:160 Prices.php:223 PricesByCost.php:262 #: SalesAnalRepts.php:32 SalesAnalRepts.php:34 SalesGLPostings.php:112 #: SalesGLPostings.php:224 SalesGLPostings.php:354 SelectOrderItems.php:710 #: api/api_xml-rpc.php:931 api/api_xml-rpc.php:974 @@ -2841,7 +2841,7 @@ msgid "Are you sure you wish to delete this COGS GL posting record?" msgstr "Jste si jisti, že chcete smazat tuto cenu?" -#: COGSGLPostings.php:190 CustomerReceipt.php:956 GLJournal.php:385 +#: COGSGLPostings.php:190 CustomerReceipt.php:1017 GLJournal.php:385 #: GLTransInquiry.php:44 Payments.php:1035 SupplierTransInquiry.php:170 #: TaxAuthorities.php:148 TaxAuthorities.php:149 index.php:1288 msgid "GL Account" @@ -2953,29 +2953,29 @@ msgid "Tax Authority Reference" msgstr "Daňový úřad Reference" -#: CompanyPreferences.php:238 Factors.php:207 +#: CompanyPreferences.php:238 Factors.php:210 msgid "Address Line 1" msgstr "1. řádek adresy" -#: CompanyPreferences.php:243 Factors.php:209 +#: CompanyPreferences.php:243 Factors.php:213 msgid "Address Line 2" msgstr "2. řádek adresy" -#: CompanyPreferences.php:248 Factors.php:211 +#: CompanyPreferences.php:248 Factors.php:217 msgid "Address Line 3" msgstr "3. řádek adresy" -#: CompanyPreferences.php:253 Factors.php:213 +#: CompanyPreferences.php:253 Factors.php:221 msgid "Address Line 4" msgstr "4. řádek adresy" #: CompanyPreferences.php:258 Customers.php:459 Customers.php:704 -#: Customers.php:734 Factors.php:215 +#: Customers.php:734 Factors.php:225 msgid "Address Line 5" msgstr "5. řádek adresy" #: CompanyPreferences.php:263 Customers.php:461 Customers.php:708 -#: Customers.php:738 Factors.php:217 +#: Customers.php:738 Factors.php:229 msgid "Address Line 6" msgstr "6. řádek adresy" @@ -2987,9 +2987,9 @@ msgid "Facsimile Number" msgstr "Faxové číslo" -#: CompanyPreferences.php:278 CustLoginSetup.php:150 Customers.php:449 -#: SuppLoginSetup.php:138 Suppliers.php:679 Suppliers.php:856 -#: WWW_Users.php:445 +#: CompanyPreferences.php:278 CustLoginSetup.php:161 Customers.php:449 +#: SuppLoginSetup.php:147 Suppliers.php:679 Suppliers.php:856 +#: WWW_Users.php:448 msgid "Email Address" msgstr "E-mailová adresa" @@ -3047,7 +3047,7 @@ #: CompanyPreferences.php:519 ConfirmDispatch_Invoice.php:617 #: ConfirmDispatch_Invoice.php:1645 Credit_Invoice.php:1509 -#: FixedAssetItems.php:120 FixedAssetItems.php:573 GLBudgets.php:234 +#: FixedAssetItems.php:123 FixedAssetItems.php:625 GLBudgets.php:234 #: GLTags.php:64 GoodsReceived.php:248 GoodsReceived.php:254 #: GoodsReceived.php:261 GoodsReceived.php:738 Labels.php:259 #: MRPCalendar.php:314 PO_AuthoriseMyOrders.php:138 Payments.php:886 @@ -3177,10 +3177,10 @@ msgid "Confirm Dispatch and Invoice" msgstr "Potvrdit Expedice a faktury" -#: ConfirmDispatch_Invoice.php:248 Contracts.php:772 CustLoginSetup.php:21 -#: CustLoginSetup.php:22 CustomerAllocations.php:327 CustomerBranches.php:363 +#: ConfirmDispatch_Invoice.php:248 Contracts.php:772 CustLoginSetup.php:31 +#: CustLoginSetup.php:32 CustomerAllocations.php:327 CustomerBranches.php:363 #: CustomerBranches.php:532 CustomerBranches.php:579 CustomerInquiry.php:126 -#: CustomerReceipt.php:846 CustomerReceipt.php:897 CustomerReceipt.php:1022 +#: CustomerReceipt.php:894 CustomerReceipt.php:948 CustomerReceipt.php:1096 #: CustomerTransInquiry.php:101 Customers.php:14 Customers.php:325 #: DeliveryDetails.php:804 FTP_RadioBeacon.php:51 PDFOrderStatus.php:275 #: PDFOrdersInvoiced.php:305 PricesByCost.php:153 SalesGraph.php:180 @@ -3202,14 +3202,14 @@ #: ConfirmDispatch_Invoice.php:248 CustEDISetup.php:93 Customers.php:440 #: Customers.php:643 Customers.php:678 DeliveryDetails.php:804 #: OrderDetails.php:67 SalesAnalRepts.php:27 SalesAnalRepts.php:29 -#: WWW_Users.php:272 WWW_Users.php:491 Z_ChangeBranchCode.php:199 +#: WWW_Users.php:275 WWW_Users.php:494 Z_ChangeBranchCode.php:201 #: includes/PDFStatementPageHeader.inc:112 includes/PDFTransPageHeader.inc:46 #: includes/PDFTransPageHeaderPortrait.inc:55 msgid "Customer Code" msgstr "Kód zákazníka" -#: ConfirmDispatch_Invoice.php:249 CustEDISetup.php:96 CustomerReceipt.php:235 -#: CustomerReceipt.php:1041 Customers.php:443 Customers.php:684 +#: ConfirmDispatch_Invoice.php:249 CustEDISetup.php:96 CustomerReceipt.php:248 +#: CustomerReceipt.php:1123 Customers.php:443 Customers.php:684 #: Customers.php:714 DeliveryDetails.php:805 OrderDetails.php:69 #: POReport.php:494 POReport.php:1268 SalesInquiry.php:754 #: SalesInquiry.php:764 SalesInquiry.php:788 SalesInquiry.php:932 @@ -3311,7 +3311,7 @@ msgstr "Cena" #: ConfirmDispatch_Invoice.php:272 CounterSales.php:736 Credit_Invoice.php:275 -#: CustomerReceipt.php:845 DeliveryDetails.php:828 OrderDetails.php:167 +#: CustomerReceipt.php:893 DeliveryDetails.php:828 OrderDetails.php:167 #: PrintCustTrans.php:865 PrintCustTrans.php:954 PrintCustTrans.php:1003 #: PrintCustTransPortrait.php:912 PrintCustTransPortrait.php:1010 #: PrintCustTransPortrait.php:1067 RecurringSalesOrders.php:323 @@ -3864,7 +3864,7 @@ msgstr "Nelze načíst mbflag" #: ConfirmDispatch_Invoice.php:925 CounterSales.php:1317 -#: FixedAssetItems.php:574 SalesAnalReptCols.php:328 Stocks.php:1199 +#: FixedAssetItems.php:627 SalesAnalReptCols.php:328 Stocks.php:1199 #: Suppliers.php:965 includes/MiscFunctions.php:36 msgid "WARNING" msgstr "UPOZORNĚNÍ" @@ -3893,7 +3893,7 @@ #: ConfirmDispatch_Invoice.php:959 CounterSales.php:1352 #: Credit_Invoice.php:696 EDIMessageFormat.php:43 EDISendInvoices.php:105 -#: FixedAssetCategories.php:86 FixedAssetCategories.php:105 +#: FixedAssetCategories.php:90 FixedAssetCategories.php:109 #: PricesBasedOnMarkUp.php:334 PricesBasedOnMarkUp.php:350 #: SelectCreditItems.php:1407 SpecialOrder.php:493 StockCategories.php:23 #: StockCategories.php:84 StockCategories.php:155 Z_ReApplyCostToSA.php:62 @@ -4175,7 +4175,7 @@ #: ConfirmDispatch_Invoice.php:1601 ConfirmDispatch_Invoice.php:1603 #: ContractBOM.php:293 CounterSales.php:1969 CounterSales.php:1971 -#: CustomerReceipt.php:528 DeliveryDetails.php:577 DeliveryDetails.php:581 +#: CustomerReceipt.php:542 DeliveryDetails.php:577 DeliveryDetails.php:581 #: DeliveryDetails.php:779 DeliveryDetails.php:782 GLBalanceSheet.php:18 #: GLProfit_Loss.php:22 GLTagProfit_Loss.php:22 GLTagProfit_Loss.php:519 #: GLTags.php:51 GLTransInquiry.php:36 PDFStockLocTransfer.php:28 @@ -4282,7 +4282,7 @@ msgstr "To je problém výběru část záznamy k zobrazení, protože" #: ContractBOM.php:140 PO_Items.php:989 SupplierTenders.php:471 -#: Z_ChangeStockCategory.php:63 Z_ChangeStockCode.php:92 +#: Z_ChangeStockCategory.php:63 Z_ChangeStockCode.php:104 msgid "The SQL statement that failed was" msgstr "Příkazu SQL, který byl neúspěšný" @@ -4391,13 +4391,13 @@ msgid "Create a New Stock Item" msgstr "Vytvoření nové položky skladem" -#: ContractBOM.php:348 FixedAssetItems.php:473 Stocks.php:838 +#: ContractBOM.php:348 FixedAssetItems.php:490 Stocks.php:838 #: SupplierTenders.php:492 msgid "Image" msgstr "Obrázek" -#: ContractBOM.php:368 CounterSales.php:2029 FixedAssetItems.php:468 -#: FixedAssetItems.php:472 PO_Items.php:1098 SalesCategories.php:248 +#: ContractBOM.php:368 CounterSales.php:2029 FixedAssetItems.php:485 +#: FixedAssetItems.php:489 PO_Items.php:1098 SalesCategories.php:248 #: SelectCreditItems.php:1017 SelectOrderItems.php:1489 #: SelectOrderItems.php:1667 Stocks.php:832 Stocks.php:836 #: SupplierTenders.php:518 WorkOrderEntry.php:643 WorkOrderIssue.php:709 @@ -4505,7 +4505,7 @@ #: PO_SelectOSPurchOrder.php:480 PO_SelectPurchOrder.php:431 PurchData.php:164 #: ReprintGRN.php:78 SelectProduct.php:349 SelectSupplier.php:143 #: ShipmentCosting.php:531 ShipmentCosting.php:608 Shipt_Select.php:293 -#: ShiptsList.php:11 SuppCreditGRNs.php:269 SuppLoginSetup.php:24 +#: ShiptsList.php:11 SuppCreditGRNs.php:269 SuppLoginSetup.php:33 #: SuppPriceList.php:205 SuppPriceList.php:276 SupplierAllocations.php:566 #: SupplierAllocations.php:641 SupplierCredit.php:262 SupplierInquiry.php:118 #: SupplierInvoice.php:234 SupplierTransInquiry.php:104 @@ -5018,7 +5018,7 @@ "Alespoň jednoho zákazníka Obor Název klíčového slova nebo výpis z oboru " "zákazníka kódu nebo pobočky telefonní číslo musí být zapsány na vyhledávání" -#: Contracts.php:663 CustomerReceipt.php:574 SelectCustomer.php:163 +#: Contracts.php:663 CustomerReceipt.php:592 SelectCustomer.php:163 #: SelectOrderItems.php:327 msgid "The searched customer records requested cannot be retrieved because" msgstr "Hledali záznamy zákazníků požadovaná nelze načíst, protože" @@ -5125,12 +5125,12 @@ msgid "Branch" msgstr "Větev" -#: Contracts.php:774 Factors.php:260 SelectCreditItems.php:240 +#: Contracts.php:774 Factors.php:289 SelectCreditItems.php:240 #: SelectCustomer.php:415 SelectOrderItems.php:603 SupplierContacts.php:226 msgid "Contact" msgstr "Kontakt" -#: Contracts.php:776 EmailConfirmation.php:160 Factors.php:223 +#: Contracts.php:776 EmailConfirmation.php:160 Factors.php:241 #: PDFCustomerList.php:342 PDFRemittanceAdvice.php:241 #: SelectCreditItems.php:242 SelectCustomer.php:418 SelectOrderItems.php:605 #: includes/PDFOrderPageHeader_generic.inc:32 @@ -5143,7 +5143,7 @@ msgid "Fax" msgstr "Fax" -#: Contracts.php:824 CustomerInquiry.php:126 CustomerReceipt.php:897 +#: Contracts.php:824 CustomerInquiry.php:126 CustomerReceipt.php:948 #: PDFRemittanceAdvice.php:267 PO_Header.php:600 PrintCustTrans.php:847 #: PrintCustTransPortrait.php:893 SupplierInquiry.php:118 #: includes/PDFQuotationPageHeader.inc:86 @@ -5174,7 +5174,7 @@ msgid "The stock categories could not be retrieved because" msgstr "Populace kategorie se nepodařilo získat, protože" -#: Contracts.php:850 FixedAssetItems.php:485 PricesBasedOnMarkUp.php:109 +#: Contracts.php:850 FixedAssetItems.php:504 PricesBasedOnMarkUp.php:109 #: SpecialOrder.php:690 Stocks.php:848 msgid "The SQL used to retrieve stock categories and failed was" msgstr "SQL slouží k načtení zásob kategorií a neúspěšný byl" @@ -5233,7 +5233,7 @@ msgid "Contract Status" msgstr "Stav zakázky" -#: Contracts.php:923 SuppLoginSetup.php:20 WWW_Users.php:21 index.php:20 +#: Contracts.php:923 SuppLoginSetup.php:29 WWW_Users.php:21 index.php:20 msgid "Setup" msgstr "Nastavení" @@ -5532,8 +5532,8 @@ msgid "Net" msgstr "Čistý" -#: CounterSales.php:816 CustomerReceipt.php:831 CustomerReceipt.php:848 -#: CustomerReceipt.php:1011 GLAccountInquiry.php:155 GLAccountReport.php:341 +#: CounterSales.php:816 CustomerReceipt.php:869 CustomerReceipt.php:896 +#: CustomerReceipt.php:1079 GLAccountInquiry.php:155 GLAccountReport.php:341 #: GLJournal.php:364 GLJournal.php:388 Payments.php:1036 #: SelectOrderItems.php:1402 SuppContractChgs.php:80 SuppContractChgs.php:167 #: SuppTransGLAnalysis.php:107 SuppTransGLAnalysis.php:199 @@ -5703,7 +5703,7 @@ msgstr "New Work Pořadové číslo" #: CounterSales.php:1212 DeliveryDetails.php:555 EDIMessageFormat.php:127 -#: EDIMessageFormat.php:204 Prices_Customer.php:36 +#: EDIMessageFormat.php:205 Prices_Customer.php:36 #: RecurringSalesOrdersProcess.php:88 ReverseGRN.php:336 SpecialOrder.php:116 #: SpecialOrder.php:119 msgid "for" @@ -5735,42 +5735,42 @@ msgstr "" "SQL, které se nepodařilo vložit GL transakce na vrub bankovního účtu bylo" -#: CounterSales.php:1827 CustomerReceipt.php:442 +#: CounterSales.php:1827 CustomerReceipt.php:456 msgid "Cannot insert a GL transaction for the bank account debit" msgstr "Nelze vložit transakce GL na vrub bankovního účtu" -#: CounterSales.php:1845 CustomerReceipt.php:491 +#: CounterSales.php:1845 CustomerReceipt.php:505 msgid "" "The SQL that failed to insert the GL transaction for the debtors account " "credit was" msgstr "" "SQL, které se nepodařilo vložit GL transakce pro dlužníky účet byl úvěr" -#: CounterSales.php:1846 CustomerReceipt.php:492 +#: CounterSales.php:1846 CustomerReceipt.php:506 msgid "Cannot insert a GL transaction for the debtors account credit" msgstr "Nelze vložit GL transakce pro dlužníky účet kreditní" -#: CounterSales.php:1898 CustomerReceipt.php:469 +#: CounterSales.php:1898 CustomerReceipt.php:483 msgid "The SQL that failed to insert the bank account transaction was" msgstr "SQL, které se nepodařilo vložit na bankovní účet, transakce byla" -#: CounterSales.php:1899 CustomerReceipt.php:470 +#: CounterSales.php:1899 CustomerReceipt.php:484 msgid "Cannot insert a bank transaction" msgstr "Nelze vložit bankovní transakce" -#: CounterSales.php:1927 CustomerReceipt.php:401 +#: CounterSales.php:1927 CustomerReceipt.php:415 msgid "The SQL that failed to insert the customer receipt transaction was" msgstr "SQL, které se nepodařilo vložit zákazníkovi přijetí transakce" -#: CounterSales.php:1928 CustomerReceipt.php:402 +#: CounterSales.php:1928 CustomerReceipt.php:416 msgid "Cannot insert a receipt transaction against the customer because" msgstr "Nelze vložit přijetí transakce vůči zákazníkovi, protože" -#: CounterSales.php:1937 CustomerReceipt.php:410 +#: CounterSales.php:1937 CustomerReceipt.php:424 msgid "The SQL that failed to update the date of the last payment received was" msgstr "SQL, které se nepodařilo aktualizovat datum poslední obdržela platbu," -#: CounterSales.php:1938 CustomerReceipt.php:411 +#: CounterSales.php:1938 CustomerReceipt.php:425 msgid "" "Cannot update the customer record for the date of the last payment received " "because" @@ -6394,9 +6394,9 @@ msgid "The currency code cannot contain any of the following characters" msgstr "Kód měny nemůže obsahovat žádný z těchto znaků" -#: Currencies.php:107 CustEDISetup.php:31 CustLoginSetup.php:40 -#: Customers.php:56 Stocks.php:113 SuppLoginSetup.php:42 TaxCategories.php:31 -#: WWW_Users.php:66 WorkCentres.php:35 Z_ChangeBranchCode.php:28 +#: Currencies.php:107 CustEDISetup.php:31 CustLoginSetup.php:51 +#: Customers.php:56 Stocks.php:113 SuppLoginSetup.php:51 TaxCategories.php:31 +#: WWW_Users.php:68 WorkCentres.php:35 Z_ChangeBranchCode.php:28 #: Z_ImportStocks.php:123 msgid "or a space" msgstr "nebo mezeru" @@ -6622,27 +6622,37 @@ msgid "Customer Login Configuration" msgstr "Přihlášení zákazníka konfigurace" -#: CustLoginSetup.php:22 SelectCustomer.php:210 SuppLoginSetup.php:24 +#: CustLoginSetup.php:15 +#, fuzzy +msgid "A customer must first be selected before logins can be defined for it" +msgstr "Položka musí být nejprve vybrán před tuto stránku se nazývá" + +#: CustLoginSetup.php:15 +#, fuzzy +msgid "Select A Customer" +msgstr "Vybrat zákazníka" + +#: CustLoginSetup.php:32 SelectCustomer.php:210 SuppLoginSetup.php:33 msgid " has been selected" msgstr " byla vybrána" -#: CustLoginSetup.php:37 SuppLoginSetup.php:39 WWW_Users.php:63 +#: CustLoginSetup.php:48 SuppLoginSetup.php:48 WWW_Users.php:65 msgid "The user ID entered must be at least 4 characters long" msgstr "ID uživatele, zadal musí být nejméně 4 znaky dlouhé" -#: CustLoginSetup.php:40 SuppLoginSetup.php:42 WWW_Users.php:66 +#: CustLoginSetup.php:51 SuppLoginSetup.php:51 WWW_Users.php:68 msgid "User names cannot contain any of the following characters" msgstr "Uživatelská jména nesmí obsahovat žádný z následujících znaků" -#: CustLoginSetup.php:44 SuppLoginSetup.php:46 WWW_Users.php:70 +#: CustLoginSetup.php:55 SuppLoginSetup.php:55 WWW_Users.php:72 msgid "The password entered must be at least 5 characters long" msgstr "Zadané heslo musí být minimálně 5 znaků" -#: CustLoginSetup.php:48 SuppLoginSetup.php:50 WWW_Users.php:74 +#: CustLoginSetup.php:59 SuppLoginSetup.php:59 WWW_Users.php:76 msgid "The password cannot contain the user id" msgstr "Heslo nesmí obsahovat uživatelské id" -#: CustLoginSetup.php:51 WWW_Users.php:77 +#: CustLoginSetup.php:62 WWW_Users.php:80 msgid "" "If you enter a Customer Code you must also enter a Branch Code valid for " "this Customer" @@ -6650,109 +6660,109 @@ "Zadáte-li kód zákazníka, musíte také zadat Pobočka kodex platný pro tohoto " "zákazníka" -#: CustLoginSetup.php:61 WWW_Users.php:102 +#: CustLoginSetup.php:72 WWW_Users.php:105 msgid "The check on validity of the customer code and branch failed because" msgstr "Kontrola platnosti kód zákazníka a větve se nezdařilo, protože" -#: CustLoginSetup.php:62 WWW_Users.php:103 +#: CustLoginSetup.php:73 WWW_Users.php:106 msgid "The SQL that was used to check the customer code and branch was" msgstr "SQL, který byl použit ke kontrole kód zákazníka a větev byla" -#: CustLoginSetup.php:66 WWW_Users.php:107 +#: CustLoginSetup.php:77 WWW_Users.php:110 msgid "The entered Branch Code is not valid for the entered Customer Code" msgstr "Vstoupil Pobočka Kód není platný pro zadané kód zákazníka" -#: CustLoginSetup.php:104 SuppLoginSetup.php:93 +#: CustLoginSetup.php:115 SuppLoginSetup.php:102 #, fuzzy msgid "The user could not be added because" msgstr "Aktivum nelze přidat, protože" -#: CustLoginSetup.php:105 SuppLoginSetup.php:94 +#: CustLoginSetup.php:116 SuppLoginSetup.php:103 #, fuzzy msgid "The SQL that was used to insert the new user and failed was" msgstr "SQL, který byl použit k aktualizaci uživatele a neúspěšný byl" -#: CustLoginSetup.php:107 +#: CustLoginSetup.php:118 #, fuzzy msgid "A new customer login has been created" msgstr "Nové práce, aby byla vytvořena pro" -#: CustLoginSetup.php:120 SuppLoginSetup.php:108 WWW_Users.php:268 -#: WWW_Users.php:402 +#: CustLoginSetup.php:131 SuppLoginSetup.php:117 WWW_Users.php:271 +#: WWW_Users.php:405 msgid "User Login" msgstr "Přihlášení uživatele" -#: CustLoginSetup.php:138 SMTPServer.php:59 SuppLoginSetup.php:126 -#: WWW_Users.php:433 includes/Login.php:59 +#: CustLoginSetup.php:149 SMTPServer.php:59 SuppLoginSetup.php:135 +#: WWW_Users.php:436 includes/Login.php:59 msgid "Password" msgstr "Heslo" -#: CustLoginSetup.php:142 SuppLoginSetup.php:130 WWW_Users.php:269 -#: WWW_Users.php:437 +#: CustLoginSetup.php:153 SuppLoginSetup.php:139 WWW_Users.php:272 +#: WWW_Users.php:440 msgid "Full Name" msgstr "Celé jméno" -#: CustLoginSetup.php:146 Locations.php:555 SalesPeople.php:330 -#: SuppLoginSetup.php:134 SupplierContacts.php:262 WWW_Users.php:441 +#: CustLoginSetup.php:157 Locations.php:555 SalesPeople.php:330 +#: SuppLoginSetup.php:143 SupplierContacts.php:262 WWW_Users.php:444 msgid "Telephone No" msgstr "Telefonní číslo" -#: CustLoginSetup.php:155 CustomerBranches.php:545 CustomerBranches.php:582 -#: WWW_Users.php:273 WWW_Users.php:496 +#: CustLoginSetup.php:166 CustomerBranches.php:545 CustomerBranches.php:582 +#: WWW_Users.php:276 WWW_Users.php:499 #: includes/PDFCustomerListPageHeader.inc:84 api/api_xml-rpc.php:244 msgid "Branch Code" msgstr "Kód oboru" -#: CustLoginSetup.php:175 SuppLoginSetup.php:196 WWW_Users.php:530 +#: CustLoginSetup.php:186 SuppLoginSetup.php:205 WWW_Users.php:533 msgid "Reports Page Size" msgstr "Zprávy Velikost stránky" -#: CustLoginSetup.php:179 CustLoginSetup.php:181 EmailConfirmation.php:119 +#: CustLoginSetup.php:190 CustLoginSetup.php:192 EmailConfirmation.php:119 #: PrintCustOrder.php:101 PrintCustOrder_generic.php:111 -#: SuppLoginSetup.php:200 SuppLoginSetup.php:202 WWW_Users.php:534 -#: WWW_Users.php:536 +#: SuppLoginSetup.php:209 SuppLoginSetup.php:211 WWW_Users.php:537 +#: WWW_Users.php:539 msgid "A4" msgstr "A4" -#: CustLoginSetup.php:185 CustLoginSetup.php:187 CustLoginSetup.php:191 -#: CustLoginSetup.php:193 SuppLoginSetup.php:206 SuppLoginSetup.php:208 -#: SuppLoginSetup.php:212 SuppLoginSetup.php:214 WWW_Users.php:540 -#: WWW_Users.php:542 WWW_Users.php:546 WWW_Users.php:548 +#: CustLoginSetup.php:196 CustLoginSetup.php:198 CustLoginSetup.php:202 +#: CustLoginSetup.php:204 SuppLoginSetup.php:215 SuppLoginSetup.php:217 +#: SuppLoginSetup.php:221 SuppLoginSetup.php:223 WWW_Users.php:543 +#: WWW_Users.php:545 WWW_Users.php:549 WWW_Users.php:551 msgid "A3" msgstr "A3" -#: CustLoginSetup.php:191 CustLoginSetup.php:193 CustLoginSetup.php:203 -#: CustLoginSetup.php:205 CustLoginSetup.php:214 CustLoginSetup.php:216 +#: CustLoginSetup.php:202 CustLoginSetup.php:204 CustLoginSetup.php:214 +#: CustLoginSetup.php:216 CustLoginSetup.php:225 CustLoginSetup.php:227 #: EmailConfirmation.php:119 PrintCustOrder.php:101 -#: PrintCustOrder_generic.php:111 SuppLoginSetup.php:212 -#: SuppLoginSetup.php:214 SuppLoginSetup.php:224 SuppLoginSetup.php:226 -#: SuppLoginSetup.php:235 SuppLoginSetup.php:237 WWW_Users.php:546 -#: WWW_Users.php:548 WWW_Users.php:558 WWW_Users.php:560 WWW_Users.php:569 -#: WWW_Users.php:571 +#: PrintCustOrder_generic.php:111 SuppLoginSetup.php:221 +#: SuppLoginSetup.php:223 SuppLoginSetup.php:233 SuppLoginSetup.php:235 +#: SuppLoginSetup.php:244 SuppLoginSetup.php:246 WWW_Users.php:549 +#: WWW_Users.php:551 WWW_Users.php:561 WWW_Users.php:563 WWW_Users.php:572 +#: WWW_Users.php:574 msgid "landscape" msgstr "na šířku" -#: CustLoginSetup.php:197 CustLoginSetup.php:199 CustLoginSetup.php:203 -#: CustLoginSetup.php:205 SuppLoginSetup.php:218 SuppLoginSetup.php:220 -#: SuppLoginSetup.php:224 SuppLoginSetup.php:226 WWW_Users.php:552 -#: WWW_Users.php:554 WWW_Users.php:558 WWW_Users.php:560 +#: CustLoginSetup.php:208 CustLoginSetup.php:210 CustLoginSetup.php:214 +#: CustLoginSetup.php:216 SuppLoginSetup.php:227 SuppLoginSetup.php:229 +#: SuppLoginSetup.php:233 SuppLoginSetup.php:235 WWW_Users.php:555 +#: WWW_Users.php:557 WWW_Users.php:561 WWW_Users.php:563 msgid "Letter" msgstr "Dopis" -#: CustLoginSetup.php:209 CustLoginSetup.php:211 CustLoginSetup.php:214 -#: CustLoginSetup.php:216 SuppLoginSetup.php:230 SuppLoginSetup.php:232 -#: SuppLoginSetup.php:235 SuppLoginSetup.php:237 WWW_Users.php:564 -#: WWW_Users.php:566 WWW_Users.php:569 WWW_Users.php:571 +#: CustLoginSetup.php:220 CustLoginSetup.php:222 CustLoginSetup.php:225 +#: CustLoginSetup.php:227 SuppLoginSetup.php:239 SuppLoginSetup.php:241 +#: SuppLoginSetup.php:244 SuppLoginSetup.php:246 WWW_Users.php:567 +#: WWW_Users.php:569 WWW_Users.php:572 WWW_Users.php:574 msgid "Legal" msgstr "Právní" -#: CustLoginSetup.php:222 SuppLoginSetup.php:243 UserSettings.php:146 -#: WWW_Users.php:279 WWW_Users.php:578 +#: CustLoginSetup.php:233 SuppLoginSetup.php:252 UserSettings.php:146 +#: WWW_Users.php:282 WWW_Users.php:581 msgid "Theme" msgstr "Téma" -#: CustLoginSetup.php:244 SuppLoginSetup.php:267 UserSettings.php:127 -#: WWW_Users.php:280 WWW_Users.php:603 +#: CustLoginSetup.php:255 SuppLoginSetup.php:276 UserSettings.php:127 +#: WWW_Users.php:283 WWW_Users.php:606 msgid "Language" msgstr "Jazyk" @@ -6778,7 +6788,7 @@ msgid "The transaction number to be queried must be entered first" msgstr "Číslo transakce, které budou dotazovány musí být zapsány první" -#: CustWhereAlloc.php:87 CustomerTransInquiry.php:90 Z_CheckAllocs.php:51 +#: CustWhereAlloc.php:87 CustomerTransInquiry.php:90 Z_CheckAllocs.php:56 msgid "" "The customer transactions for the selected criteria could not be retrieved " "because" @@ -6797,23 +6807,23 @@ msgstr "Celkem transakce" #: CustWhereAlloc.php:108 CustomerTransInquiry.php:106 -#: SupplierTransInquiry.php:107 Z_CheckAllocs.php:60 +#: SupplierTransInquiry.php:107 Z_CheckAllocs.php:65 msgid "Ex Rate" msgstr "Ex Hodnotit" -#: CustWhereAlloc.php:110 Z_CheckAllocs.php:62 +#: CustWhereAlloc.php:110 Z_CheckAllocs.php:67 msgid "Alloc" msgstr "Alloc" #: CustWhereAlloc.php:128 EmailCustTrans.php:12 SalesInquiry.php:1080 -#: SupplierCredit.php:1113 Z_CheckAllocs.php:80 +#: SupplierCredit.php:1113 Z_CheckAllocs.php:85 msgid "Credit Note" msgstr "Dobropis" #: CustWhereAlloc.php:130 PcAssignCashToTab.php:225 PcAssignCashToTab.php:361 #: PcAuthorizeExpenses.php:93 PcClaimExpensesFromTab.php:215 #: PcClaimExpensesFromTab.php:379 PcReportTab.php:174 PcReportTab.php:328 -#: Z_CheckAllocs.php:82 Z_SalesIntegrityCheck.php:90 +#: Z_CheckAllocs.php:87 Z_SalesIntegrityCheck.php:90 #: Z_SalesIntegrityCheck.php:105 msgid "Receipt" msgstr "Obdržení" @@ -6879,7 +6889,7 @@ msgid "Allocate Receipt" msgstr "Příjem přidělit" -#: CustomerAllocations.php:322 CustomerReceipt.php:529 +#: CustomerAllocations.php:322 CustomerReceipt.php:543 msgid "Allocate Receipts" msgstr "Příjmy přidělit" @@ -6922,7 +6932,7 @@ msgstr "Přesto se" #: CustomerAllocations.php:365 CustomerAllocations.php:491 -#: CustomerAllocations.php:532 CustomerReceipt.php:231 CustomerReceipt.php:529 +#: CustomerAllocations.php:532 CustomerReceipt.php:240 CustomerReceipt.php:543 #: SupplierAllocations.php:458 SupplierAllocations.php:594 #: SupplierAllocations.php:670 #, php-format @@ -6974,7 +6984,7 @@ msgid "Process Allocations" msgstr "Proces Přidělené" -#: CustomerAllocations.php:434 CustomerReceipt.php:1015 Labels.php:265 +#: CustomerAllocations.php:434 CustomerReceipt.php:1086 Labels.php:265 #: Payments.php:1026 PcAssignCashToTab.php:177 PcAssignCashToTab.php:373 #: PcAuthorizeExpenses.php:323 PcClaimExpensesFromTab.php:167 #: PcClaimExpensesFromTab.php:385 PcExpenses.php:344 PcExpensesTypeTab.php:140 @@ -7313,8 +7323,8 @@ msgid "Define Sales People" msgstr "Definice prodejců" -#: CustomerBranches.php:683 DailySalesInquiry.php:40 SalesPeople.php:170 -#: WWW_Users.php:275 +#: CustomerBranches.php:683 DailySalesInquiry.php:41 SalesPeople.php:170 +#: WWW_Users.php:278 msgid "Salesperson" msgstr "Prodejce" @@ -7369,7 +7379,7 @@ msgid "Phone Number" msgstr "Telefonní číslo" -#: CustomerBranches.php:763 Factors.php:262 +#: CustomerBranches.php:763 Factors.php:291 msgid "Fax Number" msgstr "Faxové číslo" @@ -7459,48 +7469,48 @@ msgid "The config value NumberOfMonthMustBeShown cannot be retrieved" msgstr "Config hodnota NumberOfMonthMustBeShown nelze načíst" -#: CustomerInquiry.php:127 CustomerReceipt.php:897 SelectOrderItems.php:711 +#: CustomerInquiry.php:127 CustomerReceipt.php:948 SelectOrderItems.php:711 #: SupplierCredit.php:264 SupplierInquiry.php:120 SupplierInvoice.php:236 msgid "Terms" msgstr "Podmínky" -#: CustomerInquiry.php:127 CustomerReceipt.php:897 Customers.php:512 +#: CustomerInquiry.php:127 CustomerReceipt.php:948 Customers.php:512 #: Customers.php:806 Customers.php:836 msgid "Credit Limit" msgstr "Úvěrový limit" -#: CustomerInquiry.php:128 CustomerReceipt.php:897 Customers.php:533 +#: CustomerInquiry.php:128 CustomerReceipt.php:948 Customers.php:533 #: Customers.php:873 Customers.php:879 Customers.php:897 Customers.php:919 #: Customers.php:924 index.php:1080 msgid "Credit Status" msgstr "Stav úvěru" -#: CustomerInquiry.php:131 CustomerReceipt.php:900 +#: CustomerInquiry.php:131 CustomerReceipt.php:952 msgid "ACCOUNT ON HOLD" msgstr "ÚČET NA HOLD" -#: CustomerInquiry.php:136 CustomerReceipt.php:905 PrintCustStatements.php:362 +#: CustomerInquiry.php:136 CustomerReceipt.php:958 PrintCustStatements.php:362 #: SupplierInquiry.php:142 msgid "Total Balance" msgstr "Celkem Zůstatek" -#: CustomerInquiry.php:137 CustomerReceipt.php:906 PrintCustStatements.php:358 +#: CustomerInquiry.php:137 CustomerReceipt.php:959 PrintCustStatements.php:358 #: SalesPeople.php:206 Shipments.php:396 Stocks.php:977 Stocks.php:979 #: SupplierInquiry.php:143 includes/PDFAgedDebtorsPageHeader.inc:50 #: includes/PDFAgedSuppliersPageHeader.inc:36 msgid "Current" msgstr "Proud" -#: CustomerInquiry.php:138 CustomerReceipt.php:907 SupplierInquiry.php:144 +#: CustomerInquiry.php:138 CustomerReceipt.php:960 SupplierInquiry.php:144 msgid "Now Due" msgstr "Nyní Díky" -#: CustomerInquiry.php:139 CustomerInquiry.php:140 CustomerReceipt.php:908 -#: CustomerReceipt.php:909 SupplierInquiry.php:145 SupplierInquiry.php:146 +#: CustomerInquiry.php:139 CustomerInquiry.php:140 CustomerReceipt.php:961 +#: CustomerReceipt.php:962 SupplierInquiry.php:145 SupplierInquiry.php:146 msgid "Days Overdue" msgstr "Dnů po splatnosti" -#: CustomerInquiry.php:140 CustomerReceipt.php:909 PrintCustStatements.php:361 +#: CustomerInquiry.php:140 CustomerReceipt.php:962 PrintCustStatements.php:361 #: SupplierInquiry.php:146 msgid "Over" msgstr "Přes" @@ -7522,7 +7532,7 @@ msgstr "Neexistují žádné transakce, k zobrazení, protože" #: CustomerInquiry.php:202 SupplierInquiry.php:211 -#: Z_CheckAllocationsFrom.php:29 Z_CheckAllocationsFrom.php:52 +#: Z_CheckAllocationsFrom.php:35 Z_CheckAllocationsFrom.php:60 #: includes/PDFStatementPageHeader.inc:172 msgid "Allocated" msgstr "Přidělených" @@ -7596,31 +7606,31 @@ msgid "Receipt Entry" msgstr "Příjem Vstup" -#: CustomerReceipt.php:32 +#: CustomerReceipt.php:35 msgid "A bank account must be selected for this receipt" msgstr "Bankovní účet, musí být vybrán pro tento příjem" -#: CustomerReceipt.php:47 Payments.php:699 +#: CustomerReceipt.php:54 Payments.php:699 msgid "The bank account name cannot be retrieved because" msgstr "Na bankovní účet, jméno nemůže získat, protože" -#: CustomerReceipt.php:56 Payments.php:709 +#: CustomerReceipt.php:63 Payments.php:709 msgid "The bank account number" msgstr "Číslo bankovního účtu" -#: CustomerReceipt.php:56 +#: CustomerReceipt.php:63 msgid "is not set up as a bank account" msgstr "není nastavena jako bankovní účet" -#: CustomerReceipt.php:69 +#: CustomerReceipt.php:76 msgid "The exchange rate entered should be numeric" msgstr "Směnného kurzu by měla být součástí číselné" -#: CustomerReceipt.php:76 +#: CustomerReceipt.php:83 msgid "The functional exchange rate entered should be numeric" msgstr "Funkční směnný kurz by měl být součástí číselné" -#: CustomerReceipt.php:92 +#: CustomerReceipt.php:99 msgid "" "Changing the currency of the receipt means that existing entries need to be " "re-done - only customers trading in the selected currency can be selected" @@ -7628,71 +7638,71 @@ "Změna měny přijetí znamená, že stávající položky je třeba re-udělat - jen " "zákazníci obchodování ve vybrané měně je možné zvolit" -#: CustomerReceipt.php:160 Payments.php:650 +#: CustomerReceipt.php:167 Payments.php:650 msgid "No General Ledger code has been chosen" msgstr "Č. General Ledger kód byl vybrán" -#: CustomerReceipt.php:160 GLJournal.php:171 Payments.php:633 Payments.php:650 +#: CustomerReceipt.php:167 GLJournal.php:171 Payments.php:633 Payments.php:650 msgid "so this GL analysis item could not be added" msgstr "takže tato analýza GL položky by neměly být přidávány" -#: CustomerReceipt.php:206 +#: CustomerReceipt.php:213 msgid "The company has not yet been set up properly" msgstr "Společnost dosud nebyl správně nastaven" -#: CustomerReceipt.php:206 +#: CustomerReceipt.php:213 msgid "this information is needed to process the batch" msgstr "tato informace je nutná ke zpracování dávky" -#: CustomerReceipt.php:206 +#: CustomerReceipt.php:213 msgid "Processing has been cancelled" msgstr "Zpracování byla zrušena" -#: CustomerReceipt.php:231 +#: CustomerReceipt.php:240 msgid "Summary of Receipt Batch" msgstr "Shrnutí Příjem dávky" -#: CustomerReceipt.php:233 +#: CustomerReceipt.php:246 msgid "Batch Number" msgstr "Číslo šarže" -#: CustomerReceipt.php:234 CustomerReceipt.php:753 +#: CustomerReceipt.php:247 CustomerReceipt.php:779 msgid "Date Banked" msgstr "Datum Uložené" -#: CustomerReceipt.php:236 CustomerReceipt.php:847 +#: CustomerReceipt.php:249 CustomerReceipt.php:895 msgid "GL Code" msgstr "GL kód" -#: CustomerReceipt.php:237 CustomerReceipt.php:996 +#: CustomerReceipt.php:250 CustomerReceipt.php:1061 msgid "Amount of Receipt" msgstr "Výše Příjem" -#: CustomerReceipt.php:260 +#: CustomerReceipt.php:274 msgid "Print a Customer Receipt" msgstr "Tisk účtenek zákazníka" -#: CustomerReceipt.php:284 +#: CustomerReceipt.php:298 msgid "Cannot insert a GL entry for the receipt because" msgstr "Nelze vložit záznam GL pro přijetí, protože" -#: CustomerReceipt.php:285 +#: CustomerReceipt.php:299 msgid "The SQL that failed to insert the receipt GL entry was" msgstr "SQL, které se nepodařilo vložit převzetí GL vstup" -#: CustomerReceipt.php:354 +#: CustomerReceipt.php:368 msgid "Act Transfer" msgstr "Zákon Transfer" -#: CustomerReceipt.php:363 +#: CustomerReceipt.php:377 msgid "The SQL that failed to insert the bank transaction was" msgstr "SQL, které se nepodařilo vložit bankovní transakce" -#: CustomerReceipt.php:364 Payments.php:553 Payments.php:579 +#: CustomerReceipt.php:378 Payments.php:553 Payments.php:579 msgid "Cannot insert a bank transaction using the SQL" msgstr "Nelze vložit bankovní transakce pomocí SQL" -#: CustomerReceipt.php:441 +#: CustomerReceipt.php:455 msgid "" "The SQL that failed to insert the GL transaction fro the bank account debit " "was" @@ -7700,38 +7710,38 @@ "SQL, které se nepodařilo vložit GL transakci spatřují na bankovní účet, " "debetní byl" -#: CustomerReceipt.php:515 +#: CustomerReceipt.php:529 msgid "" "The SQL that failed to insert the GL transaction for the payment discount " "debit was" msgstr "" "SQL, které se nepodařilo vložit GL transakci debetní platební sleva byla" -#: CustomerReceipt.php:516 +#: CustomerReceipt.php:530 msgid "Cannot in... [truncated message content] |
From: <dai...@us...> - 2011-11-06 03:12:40
|
Revision: 4740 http://web-erp.svn.sourceforge.net/web-erp/?rev=4740&view=rev Author: daintree Date: 2011-11-06 03:12:31 +0000 (Sun, 06 Nov 2011) Log Message: ----------- number_formats Modified Paths: -------------- trunk/CustLoginSetup.php trunk/CustWhereAlloc.php trunk/CustomerTransInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/SuppLoginSetup.php trunk/Z_BottomUpCosts.php trunk/Z_ChangeBranchCode.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_CheckAllocationsFrom.php trunk/Z_CheckAllocs.php trunk/Z_CheckDebtorsControl.php trunk/Z_CheckGLTransBalance.php trunk/Z_CopyBOM.php trunk/Z_CreateCompany.php trunk/Z_CurrencyDebtorsBalances.php trunk/Z_CurrencySuppliersBalances.php trunk/Z_DeleteSalesTransActions.php Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/CustLoginSetup.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -8,6 +8,16 @@ include('includes/SQL_CommonFunctions.inc'); include ('includes/LanguagesArray.php'); + +if (!isset($_SESSION['CustomerID'])){ + echo '<br /> + <br />'; + prnMsg(_('A customer must first be selected before logins can be defined for it') . '<br /><br /><a href="' . $rootpath . '/SelectCustomer.php">' . _('Select A Customer') . '</a>','info'); + include('includes/footer.inc'); + exit; +} + + echo '<a href="' . $rootpath . '/SelectCustomer.php">' . _('Back to Customers') . '</a><br />'; $sql="SELECT name @@ -20,7 +30,8 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName. _(' has been selected') . - '</p><br />'; + '</p> + <br />'; if (isset($_POST['submit'])) { @@ -246,11 +257,11 @@ foreach ($LanguagesArray as $LanguageEntry => $LanguageName){ if (isset($_POST['UserLanguage']) and $_POST['UserLanguage'] == $LanguageEntry){ - echo '<option selected value="' . $LanguageEntry . '">' . $LanguageName .'</option>'; - } elseif (!isset($_POST['UserLanguage']) and $LanguageEntry == $DefaultLanguage) { - echo '<option selected value="' . $LanguageEntry . '">' . $LanguageName .'</option>'; + echo '<option selected value="' . $LanguageEntry . '">' . $LanguageName['LanguageName'] .'</option>'; + } elseif (!isset($_POST['UserLanguage']) AND $LanguageEntry == $DefaultLanguage) { + echo '<option selected value="' . $LanguageEntry . '">' . $LanguageName['LanguageName'] .'</option>'; } else { - echo '<option value="' . $LanguageEntry . '">' . $LanguageName .'</option>'; + echo '<option value="' . $LanguageEntry . '">' . $LanguageName['LanguageName'] .'</option>'; } } echo '</select></td> Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/CustWhereAlloc.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -6,7 +6,7 @@ $title = _('Customer How Paid Inquiry'); include('includes/header.inc'); -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method=post>'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"> @@ -96,7 +96,7 @@ echo '<tr> <th colspan="6"> <div class="centre"> - <font size=3 color=blue><b>'._('Allocations made against invoice number') . ' ' . $_POST['TransNo'] . '<br />'._('Transaction Total').': '. locale_number_format($myrow['totamt'],$CurrDecimalPlaces) . ' ' . $CurrCode . '</font></b> + <font size=3 color="blue"><b>'._('Allocations made against invoice number') . ' ' . $_POST['TransNo'] . '<br />'._('Transaction Total').': '. locale_number_format($myrow['totamt'],$CurrDecimalPlaces) . ' ' . $CurrCode . '</font></b> </div> </th> </tr>'; Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/CustomerTransInquiry.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -51,15 +51,15 @@ echo '<td>' . _('From') . ':</td> <td><input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="FromDate" maxlength="10" size="11" value="' . $_POST['FromDate'] . '" /></td> <td>' . _('To') . ':</td> - <td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '" /></td>'; + <td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Transactions') . '" /> + </div> + </form>'; -echo '</tr></table> - <br /> - <div class="centre"> - <input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Transactions') . '"> - </div> - </form>'; - if (isset($_POST['ShowResults']) && $_POST['TransType'] != ''){ $SQL_FromDate = FormatDateForSQL($_POST['FromDate']); $SQL_ToDate = FormatDateForSQL($_POST['ToDate']); Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/DebtorsAtPeriodEnd.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -133,13 +133,16 @@ <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('From Customer Code') .':</font></td> + echo '<tr> + <td>' . _('From Customer Code') .':</font></td> <td><input tabindex="1" type="text" maxlength="6" size="7" name="FromCriteria" value="1" /></td> - </tr>'; - echo '<tr><td>' . _('To Customer Code') . ':</td> - <td><input tabindex="2" type="text" maxlength="6" size="7" name="ToCriteria" value="zzzzzz" /></td></tr>'; - - echo '<tr><td>' . _('Balances As At') . ':</td> + </tr> + <tr> + <td>' . _('To Customer Code') . ':</td> + <td><input tabindex="2" type="text" maxlength="6" size="7" name="ToCriteria" value="zzzzzz" /></td> + </tr> + <tr> + <td>' . _('Balances As At') . ':</td> <td><select tabindex="3" name="PeriodEnd">'; $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC"; @@ -152,9 +155,14 @@ } } - echo '</select></td></tr>'; - echo '</table> - <br /><div class="centre"><input tabindex=5 type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; + echo '</select></td> + </tr> + </table> + <br /> + <div class="centre"> + <input tabindex="5" type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> + </div> + </form>'; include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/DiscountMatrix.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -20,26 +20,26 @@ //initialise no input errors assumed initially before we test $InputError = 0; - if (!is_numeric($_POST['QuantityBreak'])){ + if (!is_numeric(filter_number_format($_POST['QuantityBreak']))){ prnMsg( _('The quantity break must be entered as a positive number'),'error'); $InputError =1; $Errors[$i] = 'QuantityBreak'; $i++; } - if ($_POST['QuantityBreak']<=0){ + if (filter_number_format($_POST['QuantityBreak'])<=0){ prnMsg( _('The quantity of all items on an order in the discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('at which the discount will apply is 0 or less than 0') . '. ' . _('Positive numbers are expected for this entry'),'warn'); $InputError =1; $Errors[$i] = 'QuantityBreak'; $i++; } - if (!is_numeric($_POST['DiscountRate'])){ + if (!is_numeric(filter_number_format($_POST['DiscountRate']))){ prnMsg( _('The discount rate must be entered as a positive number'),'warn'); $InputError =1; $Errors[$i] = 'DiscountRate'; $i++; } - if ($_POST['DiscountRate']<=0 OR $_POST['DiscountRate']>=70){ + if (filter_number_format($_POST['DiscountRate'])<=0 OR filter_number_format($_POST['DiscountRate'])>=70){ prnMsg( _('The discount rate applicable for this record is either less than 0% or greater than 70%') . '. ' . _('Numbers between 1 and 69 are expected'),'warn'); $InputError =1; $Errors[$i] = 'DiscountRate'; @@ -57,8 +57,8 @@ discountrate) VALUES('" . $_POST['SalesType'] . "', '" . $_POST['DiscountCategory'] . "', - '" . $_POST['QuantityBreak'] . "', - '" . ($_POST['DiscountRate']/100) . "')"; + '" . filter_number_format($_POST['QuantityBreak']) . "', + '" . (filter_number_format($_POST['DiscountRate'])/100) . "')"; $result = DB_query($sql,$db); prnMsg( _('The discount matrix record has been added'),'success'); @@ -111,8 +111,9 @@ $sql = "SELECT DISTINCT discountcategory FROM stockmaster WHERE discountcategory <>''"; $result = DB_query($sql, $db); if (DB_num_rows($result) > 0) { - echo '<tr><td>'. _('Discount Category Code') .': </td>'; - echo '<td><select name="DiscountCategory">'; + echo '<tr> + <td>'. _('Discount Category Code') .': </td> + <td><select name="DiscountCategory">'; while ($myrow = DB_fetch_array($result)){ if ($myrow['discountcategory']==$_POST['DiscCat']){ @@ -123,18 +124,24 @@ } echo '</select></td>'; } else { - echo '<input type="hidden" name="DiscountCategory" value="">'; + echo '<input type="hidden" name="DiscountCategory" value="" />'; } -echo '<tr><td>' . _('Quantity Break') . '</td> - <td><input class="number" tabindex=3 ' . (in_array('QuantityBreak',$Errors) ? 'class="inputerror"' : '') .' type="text" name="QuantityBreak" size=10 maxlength=10></td></tr>'; +echo '<tr> + <td>' . _('Quantity Break') . '</td> + <td><input class="number" tabindex=3 ' . (in_array('QuantityBreak',$Errors) ? 'class="inputerror"' : '') .' type="text" name="QuantityBreak" size="10" maxlength="10" /></td> + </tr> + <tr> + <td>' . _('Discount Rate') . ' (%):</td> + <td><input class="number" tabindex=4 ' . (in_array('DiscountRate',$Errors) ? 'class="inputerror"' : '') . 'type="text" name="DiscountRate" size="5" maxlength="5" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"> + </div> + <br />'; -echo '<tr><td>' . _('Discount Rate') . ' (%):</td> - <td><input class="number" tabindex=4 ' . (in_array('DiscountRate',$Errors) ? 'class="inputerror"' : '') . 'type="text" name="DiscountRate" size=11 maxlength=14></td></tr>'; -echo '</table><br />'; - -echo '<div class="centre"><input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"></div><br />'; - $sql = "SELECT sales_type, salestype, discountcategory, @@ -169,22 +176,21 @@ $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=yes&SalesType=' . $myrow['salestype'] . '&DiscountCategory=' . $myrow['discountcategory'] . '&QuantityBreak=' . $myrow['quantitybreak']; printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount matrix record?') . '\');">' . _('Delete') . '</td> - </tr>', - $myrow['sales_type'], - $myrow['discountcategory'], - $myrow['quantitybreak'], - $myrow['discountrate']*100 , - $DeleteURL); + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount matrix record?') . '\');">' . _('Delete') . '</td> + </tr>', + $myrow['sales_type'], + $myrow['discountcategory'], + $myrow['quantitybreak'], + $myrow['discountrate']*100 , + $DeleteURL); } -echo '</table>'; +echo '</table> + </form>'; -echo '</form>'; - include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/EDIMessageFormat.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -45,7 +45,7 @@ } $InputError = 0; -if ($InputError !=1 and isset($_POST['update'])) { +if ($InputError !=1 AND isset($_POST['update'])) { /*SelectedMessageLine could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ if (!isset($SelectedMessageLine)) { @@ -62,7 +62,7 @@ $msg = _('Message line updated'); unset ($SelectedMessageLine); -} elseif ($InputError !=1 and isset($_POST['submit'])) { +} elseif ($InputError !=1 AND isset($_POST['submit'])) { /*Selected group is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new message line form */ @@ -123,8 +123,8 @@ $result = DB_query($sql,$db); - echo '<table class=selection>'; - echo '<tr><th colspan=5><font size=3>' . _('Definition of') . ' ' . $MessageType . ' ' . _('for') . ' ' . $PartnerCode.'</font></th></tr>'; + echo '<table class="selection">'; + echo '<tr><th colspan="5"><font size=3>' . _('Definition of') . ' ' . $MessageType . ' ' . _('for') . ' ' . $PartnerCode.'</font></th></tr>'; $TableHeader = '<tr> <th>' . _('Section') . '</th> <th>' . _('Sequence') . '</th> @@ -161,8 +161,10 @@ } //END WHILE LIST LOOP echo '</table><p>'; if (DB_num_rows($result)==0){ - echo '<div class="centre"><input tabindex=1 type=submit name="NewEDIInvMsg" value="' . - _('Create New EDI Invoice Message From Default Template') . '"></div><br />'; + echo '<div class="centre"> + <input tabindex=1 type=submit name="NewEDIInvMsg" value="' . _('Create New EDI Invoice Message From Default Template') . '" /> + </div> + <br />'; } } //end of ifs SelectedLine is not set @@ -183,19 +185,18 @@ $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); - $_POST['Section'] = $myrow['section']; $_POST['SequenceNo'] = $myrow['sequenceno']; $_POST['LineText'] = $myrow['linetext']; echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?MessageType=INVOIC&PartnerCode=' . $myrow['partnercode'] . '">' . _('Review Message Lines') . '</a></div>'; - echo '<input type=hidden name="SelectedMessageLine" VALUE="' . $SelectedMessageLine . '">'; - echo '<input type=hidden name="MessageType" VALUE="' . $myrow['messagetype'] . '">'; - echo '<input type=hidden name="PartnerCode" VALUE="' . $myrow['partnercode'] . '">'; + echo '<input type="hidden" name="SelectedMessageLine" value="' . $SelectedMessageLine . '" />'; + echo '<input type="hidden" name="MessageType" value="' . $myrow['messagetype'] . '" />'; + echo '<input type="hidden" name="PartnerCode" value="' . $myrow['partnercode'] . '" />'; } else { //end of if $SelectedMessageLine only do the else when a new record is being entered - echo '<input type=hidden name="MessageType" VALUE="' . $MessageType . '">'; - echo '<input type=hidden name="PartnerCode" VALUE="' . $PartnerCode . '">'; + echo '<input type="hidden" name="MessageType" value="' . $MessageType . '" />'; + echo '<input type="hidden" name="PartnerCode" value="' . $PartnerCode . '" />'; } echo '<table class=selection>'; @@ -209,18 +210,18 @@ echo '<select tabindex=2 name="Section">'; if ($_POST['Section']=='Heading') { - echo '<option selected VALUE="Heading">' . _('Heading') . '</option>'; + echo '<option selected value="Heading">' . _('Heading') . '</option>'; } else { echo '<option value="Heading">' . _('Heading') . '</option>'; } -if (isset($_POST['Section']) and $_POST['Section']=='Detail') { - echo '<option selected VALUE="Detail">' . _('Detail') . '</option>'; +if (isset($_POST['Section']) AND $_POST['Section']=='Detail') { + echo '<option selected value="Detail">' . _('Detail') . '</option>'; } else { echo '<option value="Detail">' . _('Detail') . '</option>'; } -if (isset($_POST['Section']) and $_POST['Section']=='Summary') { - echo '<option selected VALUE="Summary">' . _('Summary') . '</option>'; +if (isset($_POST['Section']) AND $_POST['Section']=='Summary') { + echo '<option selected value="Summary">' . _('Summary') . '</option>'; } else { echo '<option value="Summary">' . _('Summary') . '</option>'; } @@ -234,17 +235,17 @@ echo '</td></tr>'; echo '<tr><td>Sequence Number:</td>'; -echo '<td><input tabindex=3 type="text" name=SequenceNo size=3 maxlength=3 value='.$_POST['SequenceNo'].'>'; +echo '<td><input tabindex=3 type="text" name=SequenceNo size=3 maxlength=3 value='.$_POST['SequenceNo'].' />'; echo '</td></tr>'; echo '<tr><td>' . _('Line Text') . ':' .'</td>'; echo '<td>'; -echo '<input tabindex=4 type="Text" name="LineText" size=50 maxlength=50 VALUE='.$_POST['LineText'] .'>'; +echo '<input tabindex=4 type="text" name="LineText" size=50 maxlength=50 value='.$_POST['LineText'] .' />'; echo '</td></tr>'; echo '</table><br />'; if (isset($_GET['SelectedMessageLine'])) { - echo '<div class="centre"><input tabindex=5 type="submit" name="update" value="'. _('Update Information'). '"></div>'; + echo '<div class="centre"><input tabindex=5 type="submit" name="update" value="'. _('Update Information'). '" /></div>'; } else { - echo '<div class="centre"><input tabindex=5 type="submit" name="submit" value="'. _('Enter Information'). '"></div>'; + echo '<div class="centre"><input tabindex=5 type="submit" name="submit" value="'. _('Enter Information'). '" /></div>'; } echo '</form>'; Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/Factors.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -33,7 +33,7 @@ if (isset($_POST['Submit']) OR isset($_POST['Update'])) { - if (mb_strlen($_POST['FactorName']) > 40 or mb_strlen($_POST['FactorName']) == 0 or $_POST['FactorName'] == '') { + if (mb_strlen($_POST['FactorName']) > 40 OR mb_strlen($_POST['FactorName']) == 0 OR $_POST['FactorName'] == '') { $InputError = 1; prnMsg(_('The factoring company name must be entered and be forty characters or less long'),'error'); } @@ -49,7 +49,7 @@ } /* If no input errors have been recieved */ - if ($InputError == 0 and isset($_POST['Submit'])){ + if ($InputError == 0 AND isset($_POST['Submit'])){ //And if its not a new part then update existing one $sql = "INSERT INTO factorcompanies (id, @@ -65,7 +65,7 @@ fax, email) VALUES (null, - '" .$_POST['FactorName'] . "', + '" . $_POST['FactorName'] . "', '" . $_POST['Address1'] . "', '" . $_POST['Address2'] . "', '" . $_POST['Address3'] . "', @@ -199,45 +199,74 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<input type="hidden" name="FactorID" value="' . $FactorID .'">'; - echo '<table class=selection>'; - echo '<input type="hidden" name="New" value="Yes">'; - echo '<tr><td>' . _('Factor company Name') . ':</td> - <td><input tabindex=1 type="text" name="FactorName" size=42 maxlength=40 value="' .$_POST['FactorName'].'"></td></tr>'; - echo '<tr><td>' . _('Address Line 1') . ':</td> - <td><input tabindex=2 type="text" name="Address1" size=42 maxlength=40 value="' . $_POST['Address1'] .'"></td></tr>'; - echo '<tr><td>' . _('Address Line 2') . ':</td> - <td><input tabindex=3 type="text" name="Address2" size=42 maxlength=40 value="' . $_POST['Address2'] .'"></td></tr>'; - echo '<tr><td>' . _('Address Line 3') . ':</td> - <td><input tabindex=4 type="text" name="Address3" size=42 maxlength=40 value="' .$_POST['Address3'] .'"></td></tr>'; - echo '<tr><td>' . _('Address Line 4') . ':</td> - <td><input tabindex=5 type="text" name="Address4" size=42 maxlength=40 value="' . $_POST['Address4'].'"></td></tr>'; - echo '<tr><td>' . _('Address Line 5') . ':</td> - <td><input tabindex=6 type="text" name="Address5" size=42 maxlength=40 value="' . $_POST['Address5'] .'"></td></tr>'; - echo '<tr><td>' . _('Address Line 6') . ':</td> - <td><input tabindex=7 type="text" name="Address6" size=42 maxlength=40 value="' .$_POST['Address6'] . '"></td></tr>'; - echo '<tr><td>' . _('Contact Name') . ':</td> - <td><input tabindex=8 type="text" name="ContactName" size=13 maxlength=25 value="' . $_POST['ContactName'] .'"></td></tr>'; - echo '<tr><td>' . _('Telephone') . ':</td> - <td><input tabindex=9 type="text" name="Telephone" size=13 maxlength=25 value="' .$_POST['Telephone'].'"></td></tr>'; - echo '<tr><td>' . _('Fax') . ':</td> - <td><input tabindex=10 type="text" name="Fax" value=0 size=13 maxlength=25 value="' . $_POST['Fax'] .'"></td></tr>'; - echo '<tr><td>' . _('Email') . ':</td> - <td><input tabindex=11 type="text" name="Email" size=55 maxlength=55 value="' . $_POST['Email'] . '"></td></tr>'; - echo '</form>'; + echo '<input type="hidden" name="FactorID" value="' . $FactorID .'" /> + <table class=selection> + <input type="hidden" name="New" value="Yes" /> + <tr> + <td>' . _('Factor company Name') . ':</td> + <td><input tabindex="1" type="text" name="FactorName" size="42" maxlength="40" value="' .$_POST['FactorName'].'" /></td> + </tr> + <tr> + <td>' . _('Address Line 1') . ':</td> + <td><input tabindex=2 type="text" name="Address1" size="42" maxlength="40" value="' . $_POST['Address1'] .'" /></td> + </tr> + <tr><td>' . _('Address Line 2') . ':</td> + <td><input tabindex=3 type="text" name="Address2" size="42" maxlength="40" value="' . $_POST['Address2'] .'" /></td> + </tr> + <tr> + <td>' . _('Address Line 3') . ':</td> + <td><input tabindex=4 type="text" name="Address3" size="42" maxlength="40" value="' .$_POST['Address3'] .'" /></td> + </tr> + <tr> + <td>' . _('Address Line 4') . ':</td> + <td><input tabindex=5 type="text" name="Address4" size="42" maxlength="40" value="' . $_POST['Address4'].'" /></td> + </tr> + <tr> + <td>' . _('Address Line 5') . ':</td> + <td><input tabindex="6" type="text" name="Address5" size="42" maxlength="40" value="' . $_POST['Address5'] .'" /></td> + </tr> + <tr> + <td>' . _('Address Line 6') . ':</td> + <td><input tabindex="7" type="text" name="Address6" size="42" maxlength="40" value="' .$_POST['Address6'] . '" /></td> + </tr> + <tr> + <td>' . _('Contact Name') . ':</td> + <td><input tabindex="8" type="text" name="ContactName" size="20" maxlength="25" value="' . $_POST['ContactName'] .'" /></td> + </tr> + <tr> + <td>' . _('Telephone') . ':</td> + <td><input tabindex="9" type="text" name="Telephone" size="20" maxlength="25" value="' .$_POST['Telephone'].'" /></td> + </tr> + <tr> + <td>' . _('Fax') . ':</td> + <td><input tabindex="10" type="text" name="Fax" value=0 size="20" maxlength="25" value="' . $_POST['Fax'] .'" /></td> + </tr> + <tr> + <td>' . _('Email') . ':</td> + <td><input tabindex="11" type="text" name="Email" size="55" maxlength=55 value="' . $_POST['Email'] . '" /></td> + </tr> + </table>'; } if (isset($_POST['Create'])) { - echo '</table><p><div class="centre"><input tabindex=12 type="submit" name="Submit" value="' . _('Insert New Factor') . '"></div>'; + echo '<p> + <div class="centre"> + <input tabindex="12" type="submit" name="Submit" value="' . _('Insert New Factor') . '" /> + </div> + </form>'; } else if (isset($_POST['Amend'])) { - echo '</table> - <p><div class="centre"><input tabindex=13 type="submit" name="Update" value="' . _('Update Factor') . '"><p>'; - prnMsg ( _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no suppliers are using this factor before the deletion is processed'), 'warn'); - echo '<p><input tabindex=14 type="submit" name="Delete" value="' . _('Delete Factor') . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this factoring company?') . '\');"></form></div>'; + echo '<p> + <div class="centre"> + <input tabindex="13" type="submit" name="Update" value="' . _('Update Factor') . '" /> + <p>'; + prnMsg ( _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no suppliers are using this factor before the deletion is processed'), 'warn'); + echo '<p> + <input tabindex="14" type="submit" name="Delete" value="' . _('Delete Factor') . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this factoring company?') . '\');" /> + </div> + </form>'; } - /* If it didn't come with a $FactorID it must be a completely fresh start, so choose a new $factorID or give the option to create a new one*/ @@ -247,7 +276,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="New" value="No">'; - echo '<table class=selection> + echo '<table class="selection"> <tr> <th>' . _('ID') . '</th> <th>' . _('Company Name').'</th> @@ -299,13 +328,14 @@ <td>' . $myrow['email'].'</td> <td><a href="'.$rootpath . '/Factors.php?FactorID='.$myrow['id'].'">'._('Edit').'</a></td> </tr>'; - } - echo '</table><p><div class="centre">'; - echo '<br /><input tabindex=3 type="submit" name="Create" value="' . _('Create New Factor') . '">'; - echo '</div></form>'; - include('includes/footer.inc'); - exit; - + } //end while loop + echo '</table> + <p> + <div class="centre"> + <br /> + <input tabindex="3" type="submit" name="Create" value="' . _('Create New Factor') . '" /> + </div> + </form>'; } include('includes/footer.inc'); Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/FixedAssetCategories.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -8,8 +8,10 @@ include('includes/header.inc'); -echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . - _('Fixed Asset Categories') . '" alt="" />' . ' ' . $title . '</p>'; +echo '<div class="centre"> + <p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Fixed Asset Categories') . '" alt="" />' . ' ' . $title . ' + </p>'; if (isset($_GET['SelectedCategory'])){ $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); @@ -41,11 +43,12 @@ } if ($_POST['CostAct'] == $_SESSION['CompanyRecord']['debtorsact'] - OR $_POST['CostAct'] == $_SESSION['CompanyRecord']['creditorsact'] - OR $_POST['AccumDepnAct'] == $_SESSION['CompanyRecord']['debtorsact'] - OR $_POST['AccumDepnAct'] == $_SESSION['CompanyRecord']['creditorsact'] - OR $_POST['CostAct'] == $_SESSION['CompanyRecord']['grnact'] - OR $_POST['AccumDepnAct'] == $_SESSION['CompanyRecord']['grnact']){ + OR $_POST['CostAct'] == $_SESSION['CompanyRecord']['creditorsact'] + OR $_POST['AccumDepnAct'] == $_SESSION['CompanyRecord']['debtorsact'] + OR $_POST['AccumDepnAct'] == $_SESSION['CompanyRecord']['creditorsact'] + OR $_POST['CostAct'] == $_SESSION['CompanyRecord']['grnact'] + OR $_POST['AccumDepnAct'] == $_SESSION['CompanyRecord']['grnact']){ + prnMsg(_('The accounts selected to post cost or accumulated depreciation to cannot be either of the debtors control account, creditors control account or GRN suspense accounts'),'error'); $InputError =1; } @@ -62,12 +65,12 @@ $i++; } if (in_array($_POST['CostAct'], $BankAccounts)) { - prnMsg( _('The asset cost account selected is a bank account - bank accounts are protected from having any other postings made to them. Select another balance sheet account for the asset cost'),'error'); - $InputError =1; + prnMsg(_('The asset cost account selected is a bank account - bank accounts are protected from having any other postings made to them. Select another balance sheet account for the asset cost'),'error'); + $InputError=1; } if (in_array($_POST['AccumDepnAct'], $BankAccounts)) { prnMsg( _('The accumulated depreciation account selected is a bank account - bank accounts are protected from having any other postings made to them. Select another balance sheet account for the asset accumulated depreciation'),'error'); - $InputError =1; + $InputError=1; } if (isset($SelectedCategory) AND $InputError !=1) { @@ -76,13 +79,14 @@ would not run in this case cos submit is false of course see the delete code below*/ - $sql = "UPDATE fixedassetcategories SET - categorydescription = '" . $_POST['CategoryDescription'] . "', - costact = '" . $_POST['CostAct'] . "', - depnact = '" . $_POST['DepnAct'] . "', - disposalact = '" . $_POST['DisposalAct'] . "', - accumdepnact = '" . $_POST['AccumDepnAct'] . "' - WHERE categoryid = '".$SelectedCategory . "'"; + $sql = "UPDATE fixedassetcategories + SET categorydescription = '" . $_POST['CategoryDescription'] . "', + costact = '" . $_POST['CostAct'] . "', + depnact = '" . $_POST['DepnAct'] . "', + disposalact = '" . $_POST['DisposalAct'] . "', + accumdepnact = '" . $_POST['AccumDepnAct'] . "' + WHERE categoryid = '".$SelectedCategory . "'"; + $ErrMsg = _('Could not update the fixed asset category') . $_POST['CategoryDescription'] . _('because'); $result = DB_query($sql,$db,$ErrMsg); @@ -91,11 +95,11 @@ } elseif ($InputError !=1) { $sql = "INSERT INTO fixedassetcategories (categoryid, - categorydescription, - costact, - depnact, - disposalact, - accumdepnact) + categorydescription, + costact, + depnact, + disposalact, + accumdepnact) VALUES ('" . $_POST['CategoryID'] . "', '" . $_POST['CategoryDescription'] . "', '" . $_POST['CostAct'] . "', @@ -227,16 +231,23 @@ $_POST['DisposalAct'] = $myrow['disposalact']; $_POST['AccumDepnAct'] = $myrow['accumdepnact']; - echo '<input type=hidden name="SelectedCategory" value="' . $SelectedCategory . '">'; - echo '<input type=hidden name="CategoryID" value="' . $_POST['CategoryID'] . '">'; - echo '<table class=selection><tr><td>' . _('Category Code') . ':</td><td>' . $_POST['CategoryID'] . '</td></tr>'; + echo '<input type="hidden" name="SelectedCategory" value="' . $SelectedCategory . '" />'; + echo '<input type="hidden" name="CategoryID" value="' . $_POST['CategoryID'] . '" />'; + echo '<table class="selection"> + <tr> + <td>' . _('Category Code') . ':</td> + <td>' . $_POST['CategoryID'] . '</td> + </tr>'; } else { //end of if $SelectedCategory only do the else when a new record is being entered if (!isset($_POST['CategoryID'])) { $_POST['CategoryID'] = ''; } - echo '<table class=selection><tr><td>' . _('Category Code') . ':</td> - <td><input type="Text" name="CategoryID" size=7 maxlength=6 value="' . $_POST['CategoryID'] . '"></td></tr>'; + echo '<table class="selection"> + <tr> + <td>' . _('Category Code') . ':</td> + <td><input type="text" name="CategoryID" size="7" maxlength="6" value="' . $_POST['CategoryID'] . '" /></td> + </tr>'; } //SQL to poulate account selection boxes @@ -262,13 +273,14 @@ $_POST['CategoryDescription'] = ''; } -echo '<tr><td>' . _('Category Description') . ':</td> - <td><input type="Text" name="CategoryDescription" size=22 maxlength=20 value="' . $_POST['CategoryDescription'] . '"></td></tr>'; +echo '<tr> + <td>' . _('Category Description') . ':</td> + <td><input type="text" name="CategoryDescription" size="22" maxlength="20" value="' . $_POST['CategoryDescription'] . '" /></td> + </tr> + <tr> + <td>' . _('Fixed Asset Cost GL Code') . ':</td> + <td><select name="CostAct">'; -echo '<tr><td>' . _('Fixed Asset Cost GL Code'); - -echo ':</td><td><select name="CostAct">'; - while ($myrow = DB_fetch_array($BSAccountsResult)){ if (isset($_POST['CostAct']) and $myrow['accountcode']==$_POST['CostAct']) { @@ -277,9 +289,10 @@ echo '<option value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } } //end while loop -echo '</select></td></tr>'; - -echo '<tr><td>' . _('Profit and Loss Depreciation GL Code') . ':</td> +echo '</select></td> + </tr> + <tr> + <td>' . _('Profit and Loss Depreciation GL Code') . ':</td> <td><select name="DepnAct">'; while ($myrow = DB_fetch_array($PnLAccountsResult)) { @@ -289,10 +302,13 @@ echo '<option value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } } //end while loop -echo '</select></td></tr>'; +echo '</select></td> + </tr>'; DB_data_seek($PnLAccountsResult,0); -echo '<tr><td>' . _('Profit or Loss on Disposal GL Code:') . '</td><td><select name="DisposalAct">'; +echo '<tr> + <td>' . _('Profit or Loss on Disposal GL Code:') . '</td> + <td><select name="DisposalAct">'; while ($myrow = DB_fetch_array($PnLAccountsResult)) { if (isset($_POST['DisposalAct']) and $myrow['accountcode']==$_POST['DisposalAct']) { echo '<option selected value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; @@ -300,11 +316,13 @@ echo '<option value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } } //end while loop -echo '</select></td></tr>'; +echo '</select></td> + </tr>'; - DB_data_seek($BSAccountsResult,0); -echo '<tr><td>' . _('Balance Sheet Accumulated Depreciation GL Code') . ':</td><td><select name="AccumDepnAct">'; +echo '<tr> + <td>' . _('Balance Sheet Accumulated Depreciation GL Code') . ':</td> + <td><select name="AccumDepnAct">'; while ($myrow = DB_fetch_array($BSAccountsResult)) { @@ -317,11 +335,15 @@ } //end while loop -echo '</select></td></tr></table><br />'; +echo '</select></td> + </tr> + </table> + <br />'; -echo '<div class="centre"><input type="Submit" name="submit" value="' . _('Enter Information') . '"></div>'; +echo '<div class="centre"> + <input type="Submit" name="submit" value="' . _('Enter Information') . '" /> + </div> + </form>'; -echo '</form>'; - include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/FixedAssetDepreciation.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -66,6 +66,7 @@ fixedassetcategories.depnact, fixedassetcategories.categorydescription ORDER BY assetcategoryid, assetid"; + $AssetsResult=DB_query($sql, $db); $InputError = false; //always hope for the best @@ -80,7 +81,8 @@ } echo '<p></p><table>'; -$Heading = '<tr><th>' . _('Asset ID') . '</th> +$Heading = '<tr> + <th>' . _('Asset ID') . '</th> <th>' . _('Description') . '</th> <th>' . _('Date Purchased') . '</th> <th>' . _('Cost') . '</th> @@ -97,6 +99,10 @@ $TotalCost =0; $TotalAccumDepn=0; $TotalDepn = 0; +$TotalCategoryCost = 0; +$TotalCategoryAccumDepn =0; +$TotalCategoryDepn = 0; + $RowCounter = 0; $k=0; @@ -111,7 +117,9 @@ <th class="number">' . locale_number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; } - echo '<tr><th colspan=9 align="left">' . $AssetRow['categorydescription'] . '</th></tr>'; + echo '<tr> + <th colspan="9" align="left">' . $AssetRow['categorydescription'] . '</th> + </tr>'; $AssetCategoryDescription = $AssetRow['categorydescription']; $TotalCategoryCost = 0; $TotalCategoryAccumDepn =0; @@ -161,7 +169,9 @@ $TotalAccumDepn +=$AssetRow['depnbfwd']; $TotalDepn +=$NewDepreciation; - if (isset($_POST['CommitDepreciation']) AND $NewDepreciation !=0 AND $InputError==false){ + if (isset($_POST['CommitDepreciation']) + AND $NewDepreciation !=0 + AND $InputError==false){ //debit depreciation expense $SQL = "INSERT INTO gltrans (type, @@ -178,9 +188,11 @@ '" . $AssetRow['depnact'] . "', '" . $AssetRow['assetid'] . "', '" . $NewDepreciation ."')"; + $ErrMsg = _('Cannot insert a depreciation GL entry for the depreciation because'); $DbgMsg = _('The SQL that failed to insert the GL Trans record was'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -226,22 +238,26 @@ $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); } //end if Committing the depreciation to DB } //end loop around the assets to calculate depreciation for -echo '<tr><th colspan=3 align="right">' . _('Total for') . ' ' . $AssetCategoryDescription . ' </th> - <th class="number">' . locale_number_format($TotalCategoryCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - <th class="number">' . locale_number_format($TotalCategoryAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - <th class="number">' . locale_number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - <th colspan=2></th> - <th class="number">' . locale_number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - </tr>'; -echo '<tr><th colspan=3 align="right">' . _('GRAND Total') . ' </th> - <th class="number">' . locale_number_format($TotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - <th class="number">' . locale_number_format($TotalAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - <th class="number">' . locale_number_format(($TotalCost-$TotalAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - <th colspan=2></th> - <th class="number">' . locale_number_format($TotalDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - </tr>'; +echo '<tr> + <th colspan="3" align="right">' . _('Total for') . ' ' . $AssetCategoryDescription . ' </th> + <th class="number">' . locale_number_format($TotalCategoryCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . locale_number_format($TotalCategoryAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . locale_number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th colspan="2"></th> + <th class="number">' . locale_number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + </tr> + <tr> + <th colspan="3" align="right">' . _('GRAND Total') . ' </th> + <th class="number">' . locale_number_format($TotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . locale_number_format($TotalAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . locale_number_format(($TotalCost-$TotalAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th colspan="2"></th> + <th class="number">' . locale_number_format($TotalDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + </tr>'; -echo '</table><hr><p></p>'; +echo '</table> + <hr /> + <p />'; if (isset($_POST['CommitDepreciation']) AND $InputError==false){ $result = DB_Txn_Commit($db); @@ -251,20 +267,24 @@ /*And post the journal too */ include ('includes/GLPostings.inc'); } else { - echo '<form action=' . htmlspecialchars($_SERVER['PHP_SELF']) . ' method=post name="form">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post" name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p></p>'; - echo '<table class=selection width=30%><tr></tr><tr>'; + echo '<p /> + <table class="selection" width="30%"> + <tr></tr> + <tr>'; if ($AllowUserEnteredProcessDate){ echo '<td>'._('Date to Process Depreciation'). ':</td> - <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" name="ProcessDate" maxlength=10 size=11 value="' . $_POST['ProcessDate'] . '"></td>'; + <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" name="ProcessDate" maxlength="10" size="11" value="' . $_POST['ProcessDate'] . '" /></td>'; } else { echo '<td>'._('Date to Process Depreciation'). ':</td> - <td>' . $_POST['ProcessDate'] .'</td>'; + <td>' . $_POST['ProcessDate'] .'</td>'; } - echo '<td><div class="centre"><input type="submit" name="CommitDepreciation" value="'._('Commit Depreciation').'"></div>'; - echo '</tr></table><br />'; - echo '</form>'; + echo '<td><div class="centre"><input type="submit" name="CommitDepreciation" value="'._('Commit Depreciation').'" /></div></td> + </tr> + </table> + <br /> + </form>'; } include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/FixedAssetItems.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -104,13 +104,16 @@ $Errors[$i] = 'AssetLocation'; $i++; } - if (!is_numeric($_POST['DepnRate']) OR $_POST['DepnRate']>100 OR $_POST['DepnRate']<0){ + if (!is_numeric(filter_number_format($_POST['DepnRate'])) + OR filter_number_format($_POST['DepnRate'])>100 + OR filter_number_format($_POST['DepnRate'])<0){ + $InputError = 1; prnMsg(_('The depreciation rate is expected to be a number between 0 and 100'),'error'); $Errors[$i] = 'DepnRate'; $i++; } - if ($_POST['DepnRate']>0 AND $_POST['DepnRate']<1){ + if (filter_number_format($_POST['DepnRate'])>0 AND filter_number_format($_POST['DepnRate'])<1){ prnMsg(_('Numbers less than 1 are interpreted as less than 1%. The depreciation rate should be entered as a number between 0 and 100'),'warn'); } @@ -226,15 +229,15 @@ } /*end if there was accumulated depreciation for the asset */ } /* end if there is a change in asset category */ $sql = "UPDATE fixedassets - SET longdescription='" . $_POST['LongDescription'] . "', - description='" . $_POST['Description'] . "', - assetcategoryid='" . $_POST['AssetCategoryID'] . "', - assetlocation='" . $_POST['AssetLocation'] . "', - depntype='" . $_POST['DepnType'] . "', - depnrate='" . $_POST['DepnRate'] . "', - barcode='" . $_POST['BarCode'] . "', - serialno='" . $_POST['SerialNo'] . "' - WHERE assetid='" . $AssetID . "'"; + SET longdescription='" . $_POST['LongDescription'] . "', + description='" . $_POST['Description'] . "', + assetcategoryid='" . $_POST['AssetCategoryID'] . "', + assetlocation='" . $_POST['AssetLocation'] . "', + depntype='" . $_POST['DepnType'] . "', + depnrate='" . filter_number_format($_POST['DepnRate']) . "', + barcode='" . $_POST['BarCode'] . "', + serialno='" . $_POST['SerialNo'] . "' + WHERE assetid='" . $AssetID . "'"; $ErrMsg = _('The asset could not be updated because'); $DbgMsg = _('The SQL that was used to update the asset and failed was'); @@ -257,7 +260,7 @@ '" . $_POST['AssetCategoryID'] . "', '" . $_POST['AssetLocation'] . "', '" . $_POST['DepnType'] . "', - '" . $_POST['DepnRate']. "', + '" . filter_number_format($_POST['DepnRate']). "', '" . $_POST['BarCode'] . "', '" . $_POST['SerialNo'] . "' )"; $ErrMsg = _('The asset could not be added because'); @@ -382,7 +385,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -if (!isset($AssetID) or $AssetID=='') { +if (!isset($AssetID) OR $AssetID=='') { /*If the page was called without $AssetID passed to page then assume a new asset is to be entered other wise the form showing the fields with the existing entries against the asset will show for editing with a hidden AssetID field. New is set to flag that the page may have called itself and still be entering a new asset, in which case the page needs to know not to go looking up details for an existing asset*/ @@ -425,13 +428,19 @@ $_POST['AssetLocation'] = $AssetRow['assetlocation']; $_POST['DepnType'] = $AssetRow['depntype']; $_POST['BarCode'] = $AssetRow['barcode']; - $_POST['DepnRate'] = $AssetRow['depnrate']; + $_POST['DepnRate'] = locale_number_format($AssetRow['depnrate'],2); - echo '<tr><td>' . _('Asset Code') . ':</td><td>'.$AssetID.'</td></tr>'. "\n"; - echo '<input type="Hidden" name="AssetID" value="'.$AssetID.'"/>'. "\n"; + echo '<tr> + <td>' . _('Asset Code') . ':</td> + <td>' . $AssetID . '</td> + </tr>'; + echo '<input type="Hidden" name="AssetID" value="'.$AssetID.'"/>'; } else { // some changes were made to the data so don't re-set form variables to DB ie the code above - echo '<tr><td>' . _('Asset Code') . ':</td><td>' . $AssetID . '</td></tr>'; + echo '<tr> + <td>' . _('Asset Code') . ':</td> + <td>' . $AssetID . '</td> + </tr>'; echo '<input type="Hidden" name="AssetID" value="' . $AssetID . '"/>'; } @@ -440,19 +449,27 @@ } else { $Description =''; } -echo '<tr><td>' . _('Asset Description') . ' (' . _('short') . '):</td> - <td><input ' . (in_array('Description',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Description" size=52 maxlength=50 value="' . $Description . '"></td></tr>'."\n"; +echo '<tr> + <td>' . _('Asset Description') . ' (' . _('short') . '):</td> + <td><input ' . (in_array('Description',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Description" size="52" maxlength="50" value="' . $Description . '"></td> + </tr>'; + if (isset($_POST['LongDescription'])) { $LongDescription = AddCarriageReturns($_POST['LongDescription']); } else { $LongDescription =''; } -echo '<tr><td>' . _('Asset Description') . ' (' . _('long') . '):</td><td><textarea ' . (in_array('LongDescription',$Errors) ? 'class="texterror"' : '' ) .' name="LongDescription" cols=40 rows=4>' . stripslashes($LongDescription) . '</textarea></td></tr>'; +echo '<tr> + <td>' . _('Asset Description') . ' (' . _('long') . '):</td> + <td><textarea ' . (in_array('LongDescription',$Errors) ? 'class="texterror"' : '' ) .' name="LongDescription" cols="40" rows="4">' . stripslashes($LongDescription) . '</textarea></td> + </tr>'; if (!isset($New) ) { //ie not new at all! - echo '<tr><td>'. _('Image File (.jpg)') . ':</td><td><input type="file" id="ItemPicture" name="ItemPicture"></td>'; + echo '<tr> + <td>'. _('Image File (.jpg)') . ':</td> + <td><input type="file" id="ItemPicture" name="ItemPicture"></td>'; if (function_exists('imagecreatefromjpg')){ $AssetImgLink = '<img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC'. @@ -478,7 +495,9 @@ // EOR Add Image upload for New Item - by Ori } //only show the add image if the asset already exists - otherwise AssetID will not be set - and the image needs the AssetID to save -echo '<tr><td>' . _('Asset Category') . ':</td><td><select name="AssetCategoryID">'; +echo '<tr> + <td>' . _('Asset Category') . ':</td> + <td><select name="AssetCategoryID">'; $sql = "SELECT categoryid, categorydescription FROM fixedassetcategories"; $ErrMsg = _('The asset categories could not be retrieved because'); @@ -499,7 +518,10 @@ } if (isset($AssetRow) AND ($AssetRow['datepurchased']!='0000-00-00' AND $AssetRow['datepurchased']!='')){ - echo '<tr><td>' . _('Date Purchased') . ':</td><td>' . ConvertSQLDate($AssetRow['datepurchased']) . '</td></tr>'; + echo '<tr> + <td>' . _('Date Purchased') . ':</td> + <td>' . ConvertSQLDate($AssetRow['datepurchased']) . '</td> + </tr>'; } $sql = "SELECT locationid, locationdescription FROM fixedassetlocations"; @@ -507,7 +529,10 @@ $DbgMsg = _('The SQL used to retrieve asset locations and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); -echo '<tr><td>' . _('Asset Location') . ':</td><td><select name="AssetLocation">'; +echo '<tr> + <td>' . _('Asset Location') . ':</td> + <td><select name="AssetLocation">'; + while ($myrow=DB_fetch_array($result)){ if ($_POST['AssetLocation']==$myrow['locationid']){ echo '<option selected value="' . $myrow['locationid'] .'">' . $myrow['locationdescription'] . '</option>'; @@ -515,15 +540,21 @@ echo '<option value="' . $myrow['locationid'] .'">' . $myrow['locationdescription'] . '</option>'; } } -echo '</select><a target="_blank" href="'. $rootpath . '/FixedAssetLocations.php">'.' ' . _('Add Asset Location') . '</a></td></tr>'; +echo '</select> + <a target="_blank" href="'. $rootpath . '/FixedAssetLocations.php">'.' ' . _('Add Asset Location') . '</a></td> + </tr> + <tr> + <td>' . _('Bar Code') . ':</td> + <td><input ' . (in_array('BarCode',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="BarCode" size="22" maxlength="20" value="' . $_POST['BarCode'] . '" /></td> + </tr> + <tr> + <td>' . _('Serial Number') . ':</td> + <td><input ' . (in_array('SerialNo',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="SerialNo" size="32" maxlength="30" value="' . $_POST['SerialNo'] . '" /></td> + </tr> + <tr> + <td>' . _('Depreciation Type') . ':</td> + <td><select name="DepnType">'; -echo '<tr><td>' . _('Bar Code') . ':</td><td><input ' . (in_array('BarCode',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="BarCode" size=22 maxlength=20 value="' . $_POST['BarCode'] . '"></td></tr>'; - -echo '<tr><td>' . _('Serial Number') . ':</td><td><input ' . (in_array('SerialNo',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="SerialNo" size=32 maxlength=30 value="' . $_POST['SerialNo'] . '"></td></tr>'; - - -echo '<tr><td>' . _('Depreciation Type') . ':</td><td><select name="DepnType">'; - if (!isset($_POST['DepnType'])){ $_POST['DepnType'] = 0; //0 = Straight line - 1 = Diminishing Value } @@ -535,19 +566,35 @@ echo '<option selected value="1">' . _('Diminishing Value') . '</option>'; } -echo '</select></td></tr>'; +echo '</select></td> + </tr> + <tr> + <td>' . _('Depreciation Rate') . ':</td> + <td><input ' . (in_array('DepnRate',$Errors) ? 'class="inputerror"' : 'class="number"' ) .' type="text" name="DepnRate" size="4" maxlength="4" value="' . $_POST['DepnRate'] . '" />%</td> + </tr> + </table>'; -echo '<tr><td>' . _('Depreciation Rate') . ':</td><td><input ' . (in_array('DepnRate',$Errors) ? 'class="inputerror"' : 'class="number"' ) .' type="Text" name="DepnRate" size=4 maxlength=4 value="' . $_POST['DepnRate'] . '">%</td></tr>'; -echo '</table>'; +if (isset($AssetRow)){ + + echo '<table> + <tr> + <th colspan="2">' . _('Asset Financial Summary') . '</th> + </tr> + <tr> + <td>' . _('Accumulated Costs') . ':</td> + <td class="number">' . locale_number_format($AssetRow['cost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + </tr> + <tr> + <td>' . _('Accumulated Depreciation') . ':</td> + <td class="number">' . locale_number_format($AssetRow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + </tr> + <tr> + <td>' . _('Net Book Value') . ':</td> + <td class="number">' . locale_number_format($AssetRow['cost']-$AssetRow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + </tr>'; -/*Get the last period depreciation (depn is transtype =44) was posted for */ -echo '<table><tr><th colspan=2>' . _('Asset Financial Summary') . '</th></tr>'; - -echo '<tr><td>' . _('Accumulated Costs') . ':</td><td class="number">' . locale_number_format($AssetRow['cost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; -echo '<tr><td>' . _('Accumulated Depreciation') . ':</td><td class="number">' . locale_number_format($AssetRow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; -echo '<tr><td>' . _('Net Book Value') . ':</td><td class="number">' . locale_number_format($AssetRow['cost']-$AssetRow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; - -$result = DB_query("SELECT periods.lastdate_in_period, + /*Get the last period depreciation (depn is transtype =44) was posted for */ + $result = DB_query("SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno @@ -555,26 +602,35 @@ GROUP BY periods.lastdate_in_period ORDER BY periods.lastdate_in_period DESC",$db); -$LastDepnRun = DB_fetch_row($result); -if(DB_num_rows($result)==0){ - $LastRunDate = _('Not Yet Run'); -} else { - $LastRunDate = ConvertSQLDate($LastDepnRun[0]); + $LastDepnRun = DB_fetch_row($result); + if(DB_num_rows($result)==0){ + $LastRunDate = _('Not Yet Run'); + } else { + $LastRunDate = ConvertSQLDate($LastDepnRun[0]); + } + echo '<tr> + <td>' . _('Depreciation last run') . ':</td> + <td>' . $LastRunDate . '</td> + </tr> + </table>'; } -echo '<tr><td>' . _('Depreciation last run') . ':</td><td>' . $LastRunDate . '</td></tr> - </table>'; - if (isset($New)) { - echo '<div class="centre"><br /><input type="submit" name="submit" value="' . _('Insert New Fixed Asset') . '">'; - + echo '<div class="centre"> + <br /> + <input type="submit" name="submit" value="' . _('Insert New Fixed Asset') . '" />'; } else { - - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Update') . '"></div>'; - prnMsg( _('Only click the Delete button if you are sure you wish to delete the asset. Only assets with a zero book value can be deleted'), 'warn', _('WARNING')); - echo '<br /><div class="centre"><input type="submit" name="delete" value="' . _('Delete This Asset') . '" onclick="return confirm(\'' . _('Are You Sure? Only assets with a zero book value can be deleted.') . '\');"></div>'; + echo '<br /> + <div class="centre"> + <input type="submit" name="submit" value="' . _('Update') . '" /> + </div>'; + prnMsg( _('Only click the Delete button if you are sure you wish to delete the asset. Only assets with a zero book value can be deleted'), 'warn', _('WARNING')); + echo '<br /> + <div class="centre"> + <input type="submit" name="delete" value="' . _('Delete This Asset') . '" onclick="return confirm(\'' . _('Are You Sure? Only assets with a zero book value can be deleted.') . '\');" />'; } -echo '</form></div>'; +echo '</div> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/FixedAssetLocations.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -1,34 +1,35 @@ <?php -//$PageSecurity = 11; +/* $Id$ */ include('includes/session.inc'); $title = _('Fixed Asset Locations'); include('includes/header.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . - _('Search') . '" alt="" />' . ' ' . $title.'</p>'; +echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.' + </p>'; -if (isset($_POST['submit']) and !isset($_POST['delete'])) { +if (isset($_POST['submit']) AND !isset($_POST['delete'])) { $InputError=0; - if (!isset($_POST['LocationID']) or mb_strlen($_POST['LocationID'])<1) { + if (!isset($_POST['LocationID']) OR mb_strlen($_POST['LocationID'])<1) { prnMsg(_('You must enter at least one character in the location ID'),'error'); $InputError=1; } - if (!isset($_POST['LocationDescription']) or mb_strlen($_POST['LocationDescription'])<1) { + if (!isset($_POST['LocationDescription']) OR mb_strlen($_POST['LocationDescription'])<1) { prnMsg(_('You must enter at least one character in the location description'),'error'); $InputError=1; } if ($InputError==0) { $sql="INSERT INTO fixedassetlocations - VALUES ( - '".$_POST['LocationID']."', - '".$_POST['LocationDescription']."', - '".$_POST['ParentLocationID']."')"; + VALUES ('".$_POST['LocationID']."', + '".$_POST['LocationDescription']."', + '".$_POST['ParentLocationID']."')"; $result=DB_query($sql, $db); } } if (isset($_GET['SelectedLocation'])) { - $sql="SELECT * FROM fixedassetlocations WHERE locationid='".$_GET['SelectedLocation']."'"; + $sql="SELECT * FROM fixedassetlocations + WHERE locationid='".$_GET['SelectedLocation']."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); $LocationID = $myrow['locationid']; @@ -45,14 +46,15 @@ if (isset($_POST['update']) and !isset($_POST['delete'])) { $InputError=0; if (!isset($_POST['LocationDescription']) or mb_strlen($_POST['LocationDescription'])<1) { - prnMsg(_('You must enter at least one character in the location description'),'error'); - $InputError=1; + prnMsg(_('You must enter at least one character in the location description'),'error'); + $InputError=1; } if ($InputError==0) { - $sql="UPDATE fixedassetlocations SET - locationdescription='".$_POST['LocationDescription']."', - parentlocationid='".$_POST['ParentLocationID']."' - WHERE locationid ='".$_POST['LocationID']."'"; + $sql="UPDATE fixedassetlocations + SET locationdescription='" . $_POST['LocationDescription'] . "', + parentlocationid='" . $_POST['ParentLocationID'] . "' + WHERE locationid ='" . $_POST['LocationID'] . "'"; + $result=DB_query($sql,$db); echo '<meta http-equiv="Refresh" content="0; url="'.htmlspecialchars($_SERVER['PHP_SELF']).'">'; } @@ -87,68 +89,74 @@ $result=DB_query($sql, $db); if (DB_num_rows($result) > 0) { - echo '<table class=selection><tr>'; - echo '<th>'._('Location ID').'</th> - <th>'._('Location Description').'</th> - <th>'._('Parent Location').'</th></tr>'; + echo '<table class="selection"> + <tr> + <th>'._('Location ID').'</th> + <th>'._('Location Description').'</th> + <th>'._('Parent Location').'</th> + </tr>'; } while ($myrow=DB_fetch_array($result)) { - echo '<tr><td>'.$myrow['locationid'].'</td> - <td>'.$myrow['locationdescription'].'</td>'; - $parentsql="SELECT locationdescription FROM fixedassetlocations WHERE locationid='".$myrow['parentlocationid']."'"; - $parentresult=DB_query($parentsql, $db); - $parentrow=DB_fetch_array($parentresult); - echo '<td>'.$parentrow['locationdescription'].'</td>'; - echo '<td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID.'SelectedLocation='.$myrow['locationid'].'">' . _('Edit') . '</td>'; + echo '<tr> + <td>' . $myrow['locationid'] . '</td> + <td>' . $myrow['locationdescription'] . '</td>'; + $ParentSql="SELECT locationdescription FROM fixedassetlocations WHERE locationid='".$myrow['parentlocationid']."'"; + $ParentResult=DB_query($ParentSql, $db); + $ParentRow=DB_fetch_array($ParentResult); + echo '<td>' . $ParentRow['locationdescription'] . '</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?SelectedLocation='.$myrow['locationid'].'">' . _('Edit') . '</td>'; } -echo '</table><br />'; -echo '<form name="LocationForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID . '"><table class=selection>'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<tr><th style="text-align:left">'._('Location ID').'</th>'; +echo '</table> + <br />'; +echo '<form name="LocationForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '"> + <table class="selection"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <tr> + <th style="text-align:left">'._('Location ID').'</th>'; if (isset($_GET['SelectedLocation'])) { - echo '<input type=hidden name=LocationID value="'.$LocationID.'">'; + echo '<input type="hidden" n... [truncated message content] |
From: <dai...@us...> - 2011-11-06 03:12:40
|
Revision: 4740 http://web-erp.svn.sourceforge.net/web-erp/?rev=4740&view=rev Author: daintree Date: 2011-11-06 03:12:31 +0000 (Sun, 06 Nov 2011) Log Message: ----------- number_formats Modified Paths: -------------- trunk/CustLoginSetup.php trunk/CustWhereAlloc.php trunk/CustomerTransInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/SuppLoginSetup.php trunk/Z_BottomUpCosts.php trunk/Z_ChangeBranchCode.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_CheckAllocationsFrom.php trunk/Z_CheckAllocs.php trunk/Z_CheckDebtorsControl.php trunk/Z_CheckGLTransBalance.php trunk/Z_CopyBOM.php trunk/Z_CreateCompany.php trunk/Z_CurrencyDebtorsBalances.php trunk/Z_CurrencySuppliersBalances.php trunk/Z_DeleteSalesTransActions.php Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/CustLoginSetup.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -8,6 +8,16 @@ include('includes/SQL_CommonFunctions.inc'); include ('includes/LanguagesArray.php'); + +if (!isset($_SESSION['CustomerID'])){ + echo '<br /> + <br />'; + prnMsg(_('A customer must first be selected before logins can be defined for it') . '<br /><br /><a href="' . $rootpath . '/SelectCustomer.php">' . _('Select A Customer') . '</a>','info'); + include('includes/footer.inc'); + exit; +} + + echo '<a href="' . $rootpath . '/SelectCustomer.php">' . _('Back to Customers') . '</a><br />'; $sql="SELECT name @@ -20,7 +30,8 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName. _(' has been selected') . - '</p><br />'; + '</p> + <br />'; if (isset($_POST['submit'])) { @@ -246,11 +257,11 @@ foreach ($LanguagesArray as $LanguageEntry => $LanguageName){ if (isset($_POST['UserLanguage']) and $_POST['UserLanguage'] == $LanguageEntry){ - echo '<option selected value="' . $LanguageEntry . '">' . $LanguageName .'</option>'; - } elseif (!isset($_POST['UserLanguage']) and $LanguageEntry == $DefaultLanguage) { - echo '<option selected value="' . $LanguageEntry . '">' . $LanguageName .'</option>'; + echo '<option selected value="' . $LanguageEntry . '">' . $LanguageName['LanguageName'] .'</option>'; + } elseif (!isset($_POST['UserLanguage']) AND $LanguageEntry == $DefaultLanguage) { + echo '<option selected value="' . $LanguageEntry . '">' . $LanguageName['LanguageName'] .'</option>'; } else { - echo '<option value="' . $LanguageEntry . '">' . $LanguageName .'</option>'; + echo '<option value="' . $LanguageEntry . '">' . $LanguageName['LanguageName'] .'</option>'; } } echo '</select></td> Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/CustWhereAlloc.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -6,7 +6,7 @@ $title = _('Customer How Paid Inquiry'); include('includes/header.inc'); -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method=post>'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"> @@ -96,7 +96,7 @@ echo '<tr> <th colspan="6"> <div class="centre"> - <font size=3 color=blue><b>'._('Allocations made against invoice number') . ' ' . $_POST['TransNo'] . '<br />'._('Transaction Total').': '. locale_number_format($myrow['totamt'],$CurrDecimalPlaces) . ' ' . $CurrCode . '</font></b> + <font size=3 color="blue"><b>'._('Allocations made against invoice number') . ' ' . $_POST['TransNo'] . '<br />'._('Transaction Total').': '. locale_number_format($myrow['totamt'],$CurrDecimalPlaces) . ' ' . $CurrCode . '</font></b> </div> </th> </tr>'; Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/CustomerTransInquiry.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -51,15 +51,15 @@ echo '<td>' . _('From') . ':</td> <td><input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="FromDate" maxlength="10" size="11" value="' . $_POST['FromDate'] . '" /></td> <td>' . _('To') . ':</td> - <td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '" /></td>'; + <td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Transactions') . '" /> + </div> + </form>'; -echo '</tr></table> - <br /> - <div class="centre"> - <input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Transactions') . '"> - </div> - </form>'; - if (isset($_POST['ShowResults']) && $_POST['TransType'] != ''){ $SQL_FromDate = FormatDateForSQL($_POST['FromDate']); $SQL_ToDate = FormatDateForSQL($_POST['ToDate']); Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/DebtorsAtPeriodEnd.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -133,13 +133,16 @@ <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<tr><td>' . _('From Customer Code') .':</font></td> + echo '<tr> + <td>' . _('From Customer Code') .':</font></td> <td><input tabindex="1" type="text" maxlength="6" size="7" name="FromCriteria" value="1" /></td> - </tr>'; - echo '<tr><td>' . _('To Customer Code') . ':</td> - <td><input tabindex="2" type="text" maxlength="6" size="7" name="ToCriteria" value="zzzzzz" /></td></tr>'; - - echo '<tr><td>' . _('Balances As At') . ':</td> + </tr> + <tr> + <td>' . _('To Customer Code') . ':</td> + <td><input tabindex="2" type="text" maxlength="6" size="7" name="ToCriteria" value="zzzzzz" /></td> + </tr> + <tr> + <td>' . _('Balances As At') . ':</td> <td><select tabindex="3" name="PeriodEnd">'; $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC"; @@ -152,9 +155,14 @@ } } - echo '</select></td></tr>'; - echo '</table> - <br /><div class="centre"><input tabindex=5 type=submit name="PrintPDF" value="' . _('Print PDF') . '"></div>'; + echo '</select></td> + </tr> + </table> + <br /> + <div class="centre"> + <input tabindex="5" type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> + </div> + </form>'; include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/DiscountMatrix.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -20,26 +20,26 @@ //initialise no input errors assumed initially before we test $InputError = 0; - if (!is_numeric($_POST['QuantityBreak'])){ + if (!is_numeric(filter_number_format($_POST['QuantityBreak']))){ prnMsg( _('The quantity break must be entered as a positive number'),'error'); $InputError =1; $Errors[$i] = 'QuantityBreak'; $i++; } - if ($_POST['QuantityBreak']<=0){ + if (filter_number_format($_POST['QuantityBreak'])<=0){ prnMsg( _('The quantity of all items on an order in the discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('at which the discount will apply is 0 or less than 0') . '. ' . _('Positive numbers are expected for this entry'),'warn'); $InputError =1; $Errors[$i] = 'QuantityBreak'; $i++; } - if (!is_numeric($_POST['DiscountRate'])){ + if (!is_numeric(filter_number_format($_POST['DiscountRate']))){ prnMsg( _('The discount rate must be entered as a positive number'),'warn'); $InputError =1; $Errors[$i] = 'DiscountRate'; $i++; } - if ($_POST['DiscountRate']<=0 OR $_POST['DiscountRate']>=70){ + if (filter_number_format($_POST['DiscountRate'])<=0 OR filter_number_format($_POST['DiscountRate'])>=70){ prnMsg( _('The discount rate applicable for this record is either less than 0% or greater than 70%') . '. ' . _('Numbers between 1 and 69 are expected'),'warn'); $InputError =1; $Errors[$i] = 'DiscountRate'; @@ -57,8 +57,8 @@ discountrate) VALUES('" . $_POST['SalesType'] . "', '" . $_POST['DiscountCategory'] . "', - '" . $_POST['QuantityBreak'] . "', - '" . ($_POST['DiscountRate']/100) . "')"; + '" . filter_number_format($_POST['QuantityBreak']) . "', + '" . (filter_number_format($_POST['DiscountRate'])/100) . "')"; $result = DB_query($sql,$db); prnMsg( _('The discount matrix record has been added'),'success'); @@ -111,8 +111,9 @@ $sql = "SELECT DISTINCT discountcategory FROM stockmaster WHERE discountcategory <>''"; $result = DB_query($sql, $db); if (DB_num_rows($result) > 0) { - echo '<tr><td>'. _('Discount Category Code') .': </td>'; - echo '<td><select name="DiscountCategory">'; + echo '<tr> + <td>'. _('Discount Category Code') .': </td> + <td><select name="DiscountCategory">'; while ($myrow = DB_fetch_array($result)){ if ($myrow['discountcategory']==$_POST['DiscCat']){ @@ -123,18 +124,24 @@ } echo '</select></td>'; } else { - echo '<input type="hidden" name="DiscountCategory" value="">'; + echo '<input type="hidden" name="DiscountCategory" value="" />'; } -echo '<tr><td>' . _('Quantity Break') . '</td> - <td><input class="number" tabindex=3 ' . (in_array('QuantityBreak',$Errors) ? 'class="inputerror"' : '') .' type="text" name="QuantityBreak" size=10 maxlength=10></td></tr>'; +echo '<tr> + <td>' . _('Quantity Break') . '</td> + <td><input class="number" tabindex=3 ' . (in_array('QuantityBreak',$Errors) ? 'class="inputerror"' : '') .' type="text" name="QuantityBreak" size="10" maxlength="10" /></td> + </tr> + <tr> + <td>' . _('Discount Rate') . ' (%):</td> + <td><input class="number" tabindex=4 ' . (in_array('DiscountRate',$Errors) ? 'class="inputerror"' : '') . 'type="text" name="DiscountRate" size="5" maxlength="5" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"> + </div> + <br />'; -echo '<tr><td>' . _('Discount Rate') . ' (%):</td> - <td><input class="number" tabindex=4 ' . (in_array('DiscountRate',$Errors) ? 'class="inputerror"' : '') . 'type="text" name="DiscountRate" size=11 maxlength=14></td></tr>'; -echo '</table><br />'; - -echo '<div class="centre"><input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"></div><br />'; - $sql = "SELECT sales_type, salestype, discountcategory, @@ -169,22 +176,21 @@ $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=yes&SalesType=' . $myrow['salestype'] . '&DiscountCategory=' . $myrow['discountcategory'] . '&QuantityBreak=' . $myrow['quantitybreak']; printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount matrix record?') . '\');">' . _('Delete') . '</td> - </tr>', - $myrow['sales_type'], - $myrow['discountcategory'], - $myrow['quantitybreak'], - $myrow['discountrate']*100 , - $DeleteURL); + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount matrix record?') . '\');">' . _('Delete') . '</td> + </tr>', + $myrow['sales_type'], + $myrow['discountcategory'], + $myrow['quantitybreak'], + $myrow['discountrate']*100 , + $DeleteURL); } -echo '</table>'; +echo '</table> + </form>'; -echo '</form>'; - include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/EDIMessageFormat.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -45,7 +45,7 @@ } $InputError = 0; -if ($InputError !=1 and isset($_POST['update'])) { +if ($InputError !=1 AND isset($_POST['update'])) { /*SelectedMessageLine could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ if (!isset($SelectedMessageLine)) { @@ -62,7 +62,7 @@ $msg = _('Message line updated'); unset ($SelectedMessageLine); -} elseif ($InputError !=1 and isset($_POST['submit'])) { +} elseif ($InputError !=1 AND isset($_POST['submit'])) { /*Selected group is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new message line form */ @@ -123,8 +123,8 @@ $result = DB_query($sql,$db); - echo '<table class=selection>'; - echo '<tr><th colspan=5><font size=3>' . _('Definition of') . ' ' . $MessageType . ' ' . _('for') . ' ' . $PartnerCode.'</font></th></tr>'; + echo '<table class="selection">'; + echo '<tr><th colspan="5"><font size=3>' . _('Definition of') . ' ' . $MessageType . ' ' . _('for') . ' ' . $PartnerCode.'</font></th></tr>'; $TableHeader = '<tr> <th>' . _('Section') . '</th> <th>' . _('Sequence') . '</th> @@ -161,8 +161,10 @@ } //END WHILE LIST LOOP echo '</table><p>'; if (DB_num_rows($result)==0){ - echo '<div class="centre"><input tabindex=1 type=submit name="NewEDIInvMsg" value="' . - _('Create New EDI Invoice Message From Default Template') . '"></div><br />'; + echo '<div class="centre"> + <input tabindex=1 type=submit name="NewEDIInvMsg" value="' . _('Create New EDI Invoice Message From Default Template') . '" /> + </div> + <br />'; } } //end of ifs SelectedLine is not set @@ -183,19 +185,18 @@ $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); - $_POST['Section'] = $myrow['section']; $_POST['SequenceNo'] = $myrow['sequenceno']; $_POST['LineText'] = $myrow['linetext']; echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?MessageType=INVOIC&PartnerCode=' . $myrow['partnercode'] . '">' . _('Review Message Lines') . '</a></div>'; - echo '<input type=hidden name="SelectedMessageLine" VALUE="' . $SelectedMessageLine . '">'; - echo '<input type=hidden name="MessageType" VALUE="' . $myrow['messagetype'] . '">'; - echo '<input type=hidden name="PartnerCode" VALUE="' . $myrow['partnercode'] . '">'; + echo '<input type="hidden" name="SelectedMessageLine" value="' . $SelectedMessageLine . '" />'; + echo '<input type="hidden" name="MessageType" value="' . $myrow['messagetype'] . '" />'; + echo '<input type="hidden" name="PartnerCode" value="' . $myrow['partnercode'] . '" />'; } else { //end of if $SelectedMessageLine only do the else when a new record is being entered - echo '<input type=hidden name="MessageType" VALUE="' . $MessageType . '">'; - echo '<input type=hidden name="PartnerCode" VALUE="' . $PartnerCode . '">'; + echo '<input type="hidden" name="MessageType" value="' . $MessageType . '" />'; + echo '<input type="hidden" name="PartnerCode" value="' . $PartnerCode . '" />'; } echo '<table class=selection>'; @@ -209,18 +210,18 @@ echo '<select tabindex=2 name="Section">'; if ($_POST['Section']=='Heading') { - echo '<option selected VALUE="Heading">' . _('Heading') . '</option>'; + echo '<option selected value="Heading">' . _('Heading') . '</option>'; } else { echo '<option value="Heading">' . _('Heading') . '</option>'; } -if (isset($_POST['Section']) and $_POST['Section']=='Detail') { - echo '<option selected VALUE="Detail">' . _('Detail') . '</option>'; +if (isset($_POST['Section']) AND $_POST['Section']=='Detail') { + echo '<option selected value="Detail">' . _('Detail') . '</option>'; } else { echo '<option value="Detail">' . _('Detail') . '</option>'; } -if (isset($_POST['Section']) and $_POST['Section']=='Summary') { - echo '<option selected VALUE="Summary">' . _('Summary') . '</option>'; +if (isset($_POST['Section']) AND $_POST['Section']=='Summary') { + echo '<option selected value="Summary">' . _('Summary') . '</option>'; } else { echo '<option value="Summary">' . _('Summary') . '</option>'; } @@ -234,17 +235,17 @@ echo '</td></tr>'; echo '<tr><td>Sequence Number:</td>'; -echo '<td><input tabindex=3 type="text" name=SequenceNo size=3 maxlength=3 value='.$_POST['SequenceNo'].'>'; +echo '<td><input tabindex=3 type="text" name=SequenceNo size=3 maxlength=3 value='.$_POST['SequenceNo'].' />'; echo '</td></tr>'; echo '<tr><td>' . _('Line Text') . ':' .'</td>'; echo '<td>'; -echo '<input tabindex=4 type="Text" name="LineText" size=50 maxlength=50 VALUE='.$_POST['LineText'] .'>'; +echo '<input tabindex=4 type="text" name="LineText" size=50 maxlength=50 value='.$_POST['LineText'] .' />'; echo '</td></tr>'; echo '</table><br />'; if (isset($_GET['SelectedMessageLine'])) { - echo '<div class="centre"><input tabindex=5 type="submit" name="update" value="'. _('Update Information'). '"></div>'; + echo '<div class="centre"><input tabindex=5 type="submit" name="update" value="'. _('Update Information'). '" /></div>'; } else { - echo '<div class="centre"><input tabindex=5 type="submit" name="submit" value="'. _('Enter Information'). '"></div>'; + echo '<div class="centre"><input tabindex=5 type="submit" name="submit" value="'. _('Enter Information'). '" /></div>'; } echo '</form>'; Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/Factors.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -33,7 +33,7 @@ if (isset($_POST['Submit']) OR isset($_POST['Update'])) { - if (mb_strlen($_POST['FactorName']) > 40 or mb_strlen($_POST['FactorName']) == 0 or $_POST['FactorName'] == '') { + if (mb_strlen($_POST['FactorName']) > 40 OR mb_strlen($_POST['FactorName']) == 0 OR $_POST['FactorName'] == '') { $InputError = 1; prnMsg(_('The factoring company name must be entered and be forty characters or less long'),'error'); } @@ -49,7 +49,7 @@ } /* If no input errors have been recieved */ - if ($InputError == 0 and isset($_POST['Submit'])){ + if ($InputError == 0 AND isset($_POST['Submit'])){ //And if its not a new part then update existing one $sql = "INSERT INTO factorcompanies (id, @@ -65,7 +65,7 @@ fax, email) VALUES (null, - '" .$_POST['FactorName'] . "', + '" . $_POST['FactorName'] . "', '" . $_POST['Address1'] . "', '" . $_POST['Address2'] . "', '" . $_POST['Address3'] . "', @@ -199,45 +199,74 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<input type="hidden" name="FactorID" value="' . $FactorID .'">'; - echo '<table class=selection>'; - echo '<input type="hidden" name="New" value="Yes">'; - echo '<tr><td>' . _('Factor company Name') . ':</td> - <td><input tabindex=1 type="text" name="FactorName" size=42 maxlength=40 value="' .$_POST['FactorName'].'"></td></tr>'; - echo '<tr><td>' . _('Address Line 1') . ':</td> - <td><input tabindex=2 type="text" name="Address1" size=42 maxlength=40 value="' . $_POST['Address1'] .'"></td></tr>'; - echo '<tr><td>' . _('Address Line 2') . ':</td> - <td><input tabindex=3 type="text" name="Address2" size=42 maxlength=40 value="' . $_POST['Address2'] .'"></td></tr>'; - echo '<tr><td>' . _('Address Line 3') . ':</td> - <td><input tabindex=4 type="text" name="Address3" size=42 maxlength=40 value="' .$_POST['Address3'] .'"></td></tr>'; - echo '<tr><td>' . _('Address Line 4') . ':</td> - <td><input tabindex=5 type="text" name="Address4" size=42 maxlength=40 value="' . $_POST['Address4'].'"></td></tr>'; - echo '<tr><td>' . _('Address Line 5') . ':</td> - <td><input tabindex=6 type="text" name="Address5" size=42 maxlength=40 value="' . $_POST['Address5'] .'"></td></tr>'; - echo '<tr><td>' . _('Address Line 6') . ':</td> - <td><input tabindex=7 type="text" name="Address6" size=42 maxlength=40 value="' .$_POST['Address6'] . '"></td></tr>'; - echo '<tr><td>' . _('Contact Name') . ':</td> - <td><input tabindex=8 type="text" name="ContactName" size=13 maxlength=25 value="' . $_POST['ContactName'] .'"></td></tr>'; - echo '<tr><td>' . _('Telephone') . ':</td> - <td><input tabindex=9 type="text" name="Telephone" size=13 maxlength=25 value="' .$_POST['Telephone'].'"></td></tr>'; - echo '<tr><td>' . _('Fax') . ':</td> - <td><input tabindex=10 type="text" name="Fax" value=0 size=13 maxlength=25 value="' . $_POST['Fax'] .'"></td></tr>'; - echo '<tr><td>' . _('Email') . ':</td> - <td><input tabindex=11 type="text" name="Email" size=55 maxlength=55 value="' . $_POST['Email'] . '"></td></tr>'; - echo '</form>'; + echo '<input type="hidden" name="FactorID" value="' . $FactorID .'" /> + <table class=selection> + <input type="hidden" name="New" value="Yes" /> + <tr> + <td>' . _('Factor company Name') . ':</td> + <td><input tabindex="1" type="text" name="FactorName" size="42" maxlength="40" value="' .$_POST['FactorName'].'" /></td> + </tr> + <tr> + <td>' . _('Address Line 1') . ':</td> + <td><input tabindex=2 type="text" name="Address1" size="42" maxlength="40" value="' . $_POST['Address1'] .'" /></td> + </tr> + <tr><td>' . _('Address Line 2') . ':</td> + <td><input tabindex=3 type="text" name="Address2" size="42" maxlength="40" value="' . $_POST['Address2'] .'" /></td> + </tr> + <tr> + <td>' . _('Address Line 3') . ':</td> + <td><input tabindex=4 type="text" name="Address3" size="42" maxlength="40" value="' .$_POST['Address3'] .'" /></td> + </tr> + <tr> + <td>' . _('Address Line 4') . ':</td> + <td><input tabindex=5 type="text" name="Address4" size="42" maxlength="40" value="' . $_POST['Address4'].'" /></td> + </tr> + <tr> + <td>' . _('Address Line 5') . ':</td> + <td><input tabindex="6" type="text" name="Address5" size="42" maxlength="40" value="' . $_POST['Address5'] .'" /></td> + </tr> + <tr> + <td>' . _('Address Line 6') . ':</td> + <td><input tabindex="7" type="text" name="Address6" size="42" maxlength="40" value="' .$_POST['Address6'] . '" /></td> + </tr> + <tr> + <td>' . _('Contact Name') . ':</td> + <td><input tabindex="8" type="text" name="ContactName" size="20" maxlength="25" value="' . $_POST['ContactName'] .'" /></td> + </tr> + <tr> + <td>' . _('Telephone') . ':</td> + <td><input tabindex="9" type="text" name="Telephone" size="20" maxlength="25" value="' .$_POST['Telephone'].'" /></td> + </tr> + <tr> + <td>' . _('Fax') . ':</td> + <td><input tabindex="10" type="text" name="Fax" value=0 size="20" maxlength="25" value="' . $_POST['Fax'] .'" /></td> + </tr> + <tr> + <td>' . _('Email') . ':</td> + <td><input tabindex="11" type="text" name="Email" size="55" maxlength=55 value="' . $_POST['Email'] . '" /></td> + </tr> + </table>'; } if (isset($_POST['Create'])) { - echo '</table><p><div class="centre"><input tabindex=12 type="submit" name="Submit" value="' . _('Insert New Factor') . '"></div>'; + echo '<p> + <div class="centre"> + <input tabindex="12" type="submit" name="Submit" value="' . _('Insert New Factor') . '" /> + </div> + </form>'; } else if (isset($_POST['Amend'])) { - echo '</table> - <p><div class="centre"><input tabindex=13 type="submit" name="Update" value="' . _('Update Factor') . '"><p>'; - prnMsg ( _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no suppliers are using this factor before the deletion is processed'), 'warn'); - echo '<p><input tabindex=14 type="submit" name="Delete" value="' . _('Delete Factor') . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this factoring company?') . '\');"></form></div>'; + echo '<p> + <div class="centre"> + <input tabindex="13" type="submit" name="Update" value="' . _('Update Factor') . '" /> + <p>'; + prnMsg ( _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no suppliers are using this factor before the deletion is processed'), 'warn'); + echo '<p> + <input tabindex="14" type="submit" name="Delete" value="' . _('Delete Factor') . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this factoring company?') . '\');" /> + </div> + </form>'; } - /* If it didn't come with a $FactorID it must be a completely fresh start, so choose a new $factorID or give the option to create a new one*/ @@ -247,7 +276,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="New" value="No">'; - echo '<table class=selection> + echo '<table class="selection"> <tr> <th>' . _('ID') . '</th> <th>' . _('Company Name').'</th> @@ -299,13 +328,14 @@ <td>' . $myrow['email'].'</td> <td><a href="'.$rootpath . '/Factors.php?FactorID='.$myrow['id'].'">'._('Edit').'</a></td> </tr>'; - } - echo '</table><p><div class="centre">'; - echo '<br /><input tabindex=3 type="submit" name="Create" value="' . _('Create New Factor') . '">'; - echo '</div></form>'; - include('includes/footer.inc'); - exit; - + } //end while loop + echo '</table> + <p> + <div class="centre"> + <br /> + <input tabindex="3" type="submit" name="Create" value="' . _('Create New Factor') . '" /> + </div> + </form>'; } include('includes/footer.inc'); Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/FixedAssetCategories.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -8,8 +8,10 @@ include('includes/header.inc'); -echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . - _('Fixed Asset Categories') . '" alt="" />' . ' ' . $title . '</p>'; +echo '<div class="centre"> + <p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Fixed Asset Categories') . '" alt="" />' . ' ' . $title . ' + </p>'; if (isset($_GET['SelectedCategory'])){ $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); @@ -41,11 +43,12 @@ } if ($_POST['CostAct'] == $_SESSION['CompanyRecord']['debtorsact'] - OR $_POST['CostAct'] == $_SESSION['CompanyRecord']['creditorsact'] - OR $_POST['AccumDepnAct'] == $_SESSION['CompanyRecord']['debtorsact'] - OR $_POST['AccumDepnAct'] == $_SESSION['CompanyRecord']['creditorsact'] - OR $_POST['CostAct'] == $_SESSION['CompanyRecord']['grnact'] - OR $_POST['AccumDepnAct'] == $_SESSION['CompanyRecord']['grnact']){ + OR $_POST['CostAct'] == $_SESSION['CompanyRecord']['creditorsact'] + OR $_POST['AccumDepnAct'] == $_SESSION['CompanyRecord']['debtorsact'] + OR $_POST['AccumDepnAct'] == $_SESSION['CompanyRecord']['creditorsact'] + OR $_POST['CostAct'] == $_SESSION['CompanyRecord']['grnact'] + OR $_POST['AccumDepnAct'] == $_SESSION['CompanyRecord']['grnact']){ + prnMsg(_('The accounts selected to post cost or accumulated depreciation to cannot be either of the debtors control account, creditors control account or GRN suspense accounts'),'error'); $InputError =1; } @@ -62,12 +65,12 @@ $i++; } if (in_array($_POST['CostAct'], $BankAccounts)) { - prnMsg( _('The asset cost account selected is a bank account - bank accounts are protected from having any other postings made to them. Select another balance sheet account for the asset cost'),'error'); - $InputError =1; + prnMsg(_('The asset cost account selected is a bank account - bank accounts are protected from having any other postings made to them. Select another balance sheet account for the asset cost'),'error'); + $InputError=1; } if (in_array($_POST['AccumDepnAct'], $BankAccounts)) { prnMsg( _('The accumulated depreciation account selected is a bank account - bank accounts are protected from having any other postings made to them. Select another balance sheet account for the asset accumulated depreciation'),'error'); - $InputError =1; + $InputError=1; } if (isset($SelectedCategory) AND $InputError !=1) { @@ -76,13 +79,14 @@ would not run in this case cos submit is false of course see the delete code below*/ - $sql = "UPDATE fixedassetcategories SET - categorydescription = '" . $_POST['CategoryDescription'] . "', - costact = '" . $_POST['CostAct'] . "', - depnact = '" . $_POST['DepnAct'] . "', - disposalact = '" . $_POST['DisposalAct'] . "', - accumdepnact = '" . $_POST['AccumDepnAct'] . "' - WHERE categoryid = '".$SelectedCategory . "'"; + $sql = "UPDATE fixedassetcategories + SET categorydescription = '" . $_POST['CategoryDescription'] . "', + costact = '" . $_POST['CostAct'] . "', + depnact = '" . $_POST['DepnAct'] . "', + disposalact = '" . $_POST['DisposalAct'] . "', + accumdepnact = '" . $_POST['AccumDepnAct'] . "' + WHERE categoryid = '".$SelectedCategory . "'"; + $ErrMsg = _('Could not update the fixed asset category') . $_POST['CategoryDescription'] . _('because'); $result = DB_query($sql,$db,$ErrMsg); @@ -91,11 +95,11 @@ } elseif ($InputError !=1) { $sql = "INSERT INTO fixedassetcategories (categoryid, - categorydescription, - costact, - depnact, - disposalact, - accumdepnact) + categorydescription, + costact, + depnact, + disposalact, + accumdepnact) VALUES ('" . $_POST['CategoryID'] . "', '" . $_POST['CategoryDescription'] . "', '" . $_POST['CostAct'] . "', @@ -227,16 +231,23 @@ $_POST['DisposalAct'] = $myrow['disposalact']; $_POST['AccumDepnAct'] = $myrow['accumdepnact']; - echo '<input type=hidden name="SelectedCategory" value="' . $SelectedCategory . '">'; - echo '<input type=hidden name="CategoryID" value="' . $_POST['CategoryID'] . '">'; - echo '<table class=selection><tr><td>' . _('Category Code') . ':</td><td>' . $_POST['CategoryID'] . '</td></tr>'; + echo '<input type="hidden" name="SelectedCategory" value="' . $SelectedCategory . '" />'; + echo '<input type="hidden" name="CategoryID" value="' . $_POST['CategoryID'] . '" />'; + echo '<table class="selection"> + <tr> + <td>' . _('Category Code') . ':</td> + <td>' . $_POST['CategoryID'] . '</td> + </tr>'; } else { //end of if $SelectedCategory only do the else when a new record is being entered if (!isset($_POST['CategoryID'])) { $_POST['CategoryID'] = ''; } - echo '<table class=selection><tr><td>' . _('Category Code') . ':</td> - <td><input type="Text" name="CategoryID" size=7 maxlength=6 value="' . $_POST['CategoryID'] . '"></td></tr>'; + echo '<table class="selection"> + <tr> + <td>' . _('Category Code') . ':</td> + <td><input type="text" name="CategoryID" size="7" maxlength="6" value="' . $_POST['CategoryID'] . '" /></td> + </tr>'; } //SQL to poulate account selection boxes @@ -262,13 +273,14 @@ $_POST['CategoryDescription'] = ''; } -echo '<tr><td>' . _('Category Description') . ':</td> - <td><input type="Text" name="CategoryDescription" size=22 maxlength=20 value="' . $_POST['CategoryDescription'] . '"></td></tr>'; +echo '<tr> + <td>' . _('Category Description') . ':</td> + <td><input type="text" name="CategoryDescription" size="22" maxlength="20" value="' . $_POST['CategoryDescription'] . '" /></td> + </tr> + <tr> + <td>' . _('Fixed Asset Cost GL Code') . ':</td> + <td><select name="CostAct">'; -echo '<tr><td>' . _('Fixed Asset Cost GL Code'); - -echo ':</td><td><select name="CostAct">'; - while ($myrow = DB_fetch_array($BSAccountsResult)){ if (isset($_POST['CostAct']) and $myrow['accountcode']==$_POST['CostAct']) { @@ -277,9 +289,10 @@ echo '<option value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } } //end while loop -echo '</select></td></tr>'; - -echo '<tr><td>' . _('Profit and Loss Depreciation GL Code') . ':</td> +echo '</select></td> + </tr> + <tr> + <td>' . _('Profit and Loss Depreciation GL Code') . ':</td> <td><select name="DepnAct">'; while ($myrow = DB_fetch_array($PnLAccountsResult)) { @@ -289,10 +302,13 @@ echo '<option value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } } //end while loop -echo '</select></td></tr>'; +echo '</select></td> + </tr>'; DB_data_seek($PnLAccountsResult,0); -echo '<tr><td>' . _('Profit or Loss on Disposal GL Code:') . '</td><td><select name="DisposalAct">'; +echo '<tr> + <td>' . _('Profit or Loss on Disposal GL Code:') . '</td> + <td><select name="DisposalAct">'; while ($myrow = DB_fetch_array($PnLAccountsResult)) { if (isset($_POST['DisposalAct']) and $myrow['accountcode']==$_POST['DisposalAct']) { echo '<option selected value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; @@ -300,11 +316,13 @@ echo '<option value='.$myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')' . '</option>'; } } //end while loop -echo '</select></td></tr>'; +echo '</select></td> + </tr>'; - DB_data_seek($BSAccountsResult,0); -echo '<tr><td>' . _('Balance Sheet Accumulated Depreciation GL Code') . ':</td><td><select name="AccumDepnAct">'; +echo '<tr> + <td>' . _('Balance Sheet Accumulated Depreciation GL Code') . ':</td> + <td><select name="AccumDepnAct">'; while ($myrow = DB_fetch_array($BSAccountsResult)) { @@ -317,11 +335,15 @@ } //end while loop -echo '</select></td></tr></table><br />'; +echo '</select></td> + </tr> + </table> + <br />'; -echo '<div class="centre"><input type="Submit" name="submit" value="' . _('Enter Information') . '"></div>'; +echo '<div class="centre"> + <input type="Submit" name="submit" value="' . _('Enter Information') . '" /> + </div> + </form>'; -echo '</form>'; - include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/FixedAssetDepreciation.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -66,6 +66,7 @@ fixedassetcategories.depnact, fixedassetcategories.categorydescription ORDER BY assetcategoryid, assetid"; + $AssetsResult=DB_query($sql, $db); $InputError = false; //always hope for the best @@ -80,7 +81,8 @@ } echo '<p></p><table>'; -$Heading = '<tr><th>' . _('Asset ID') . '</th> +$Heading = '<tr> + <th>' . _('Asset ID') . '</th> <th>' . _('Description') . '</th> <th>' . _('Date Purchased') . '</th> <th>' . _('Cost') . '</th> @@ -97,6 +99,10 @@ $TotalCost =0; $TotalAccumDepn=0; $TotalDepn = 0; +$TotalCategoryCost = 0; +$TotalCategoryAccumDepn =0; +$TotalCategoryDepn = 0; + $RowCounter = 0; $k=0; @@ -111,7 +117,9 @@ <th class="number">' . locale_number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; } - echo '<tr><th colspan=9 align="left">' . $AssetRow['categorydescription'] . '</th></tr>'; + echo '<tr> + <th colspan="9" align="left">' . $AssetRow['categorydescription'] . '</th> + </tr>'; $AssetCategoryDescription = $AssetRow['categorydescription']; $TotalCategoryCost = 0; $TotalCategoryAccumDepn =0; @@ -161,7 +169,9 @@ $TotalAccumDepn +=$AssetRow['depnbfwd']; $TotalDepn +=$NewDepreciation; - if (isset($_POST['CommitDepreciation']) AND $NewDepreciation !=0 AND $InputError==false){ + if (isset($_POST['CommitDepreciation']) + AND $NewDepreciation !=0 + AND $InputError==false){ //debit depreciation expense $SQL = "INSERT INTO gltrans (type, @@ -178,9 +188,11 @@ '" . $AssetRow['depnact'] . "', '" . $AssetRow['assetid'] . "', '" . $NewDepreciation ."')"; + $ErrMsg = _('Cannot insert a depreciation GL entry for the depreciation because'); $DbgMsg = _('The SQL that failed to insert the GL Trans record was'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -226,22 +238,26 @@ $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); } //end if Committing the depreciation to DB } //end loop around the assets to calculate depreciation for -echo '<tr><th colspan=3 align="right">' . _('Total for') . ' ' . $AssetCategoryDescription . ' </th> - <th class="number">' . locale_number_format($TotalCategoryCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - <th class="number">' . locale_number_format($TotalCategoryAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - <th class="number">' . locale_number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - <th colspan=2></th> - <th class="number">' . locale_number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - </tr>'; -echo '<tr><th colspan=3 align="right">' . _('GRAND Total') . ' </th> - <th class="number">' . locale_number_format($TotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - <th class="number">' . locale_number_format($TotalAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - <th class="number">' . locale_number_format(($TotalCost-$TotalAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - <th colspan=2></th> - <th class="number">' . locale_number_format($TotalDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> - </tr>'; +echo '<tr> + <th colspan="3" align="right">' . _('Total for') . ' ' . $AssetCategoryDescription . ' </th> + <th class="number">' . locale_number_format($TotalCategoryCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . locale_number_format($TotalCategoryAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . locale_number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th colspan="2"></th> + <th class="number">' . locale_number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + </tr> + <tr> + <th colspan="3" align="right">' . _('GRAND Total') . ' </th> + <th class="number">' . locale_number_format($TotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . locale_number_format($TotalAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . locale_number_format(($TotalCost-$TotalAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th colspan="2"></th> + <th class="number">' . locale_number_format($TotalDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + </tr>'; -echo '</table><hr><p></p>'; +echo '</table> + <hr /> + <p />'; if (isset($_POST['CommitDepreciation']) AND $InputError==false){ $result = DB_Txn_Commit($db); @@ -251,20 +267,24 @@ /*And post the journal too */ include ('includes/GLPostings.inc'); } else { - echo '<form action=' . htmlspecialchars($_SERVER['PHP_SELF']) . ' method=post name="form">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post" name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<p></p>'; - echo '<table class=selection width=30%><tr></tr><tr>'; + echo '<p /> + <table class="selection" width="30%"> + <tr></tr> + <tr>'; if ($AllowUserEnteredProcessDate){ echo '<td>'._('Date to Process Depreciation'). ':</td> - <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" name="ProcessDate" maxlength=10 size=11 value="' . $_POST['ProcessDate'] . '"></td>'; + <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" name="ProcessDate" maxlength="10" size="11" value="' . $_POST['ProcessDate'] . '" /></td>'; } else { echo '<td>'._('Date to Process Depreciation'). ':</td> - <td>' . $_POST['ProcessDate'] .'</td>'; + <td>' . $_POST['ProcessDate'] .'</td>'; } - echo '<td><div class="centre"><input type="submit" name="CommitDepreciation" value="'._('Commit Depreciation').'"></div>'; - echo '</tr></table><br />'; - echo '</form>'; + echo '<td><div class="centre"><input type="submit" name="CommitDepreciation" value="'._('Commit Depreciation').'" /></div></td> + </tr> + </table> + <br /> + </form>'; } include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/FixedAssetItems.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -104,13 +104,16 @@ $Errors[$i] = 'AssetLocation'; $i++; } - if (!is_numeric($_POST['DepnRate']) OR $_POST['DepnRate']>100 OR $_POST['DepnRate']<0){ + if (!is_numeric(filter_number_format($_POST['DepnRate'])) + OR filter_number_format($_POST['DepnRate'])>100 + OR filter_number_format($_POST['DepnRate'])<0){ + $InputError = 1; prnMsg(_('The depreciation rate is expected to be a number between 0 and 100'),'error'); $Errors[$i] = 'DepnRate'; $i++; } - if ($_POST['DepnRate']>0 AND $_POST['DepnRate']<1){ + if (filter_number_format($_POST['DepnRate'])>0 AND filter_number_format($_POST['DepnRate'])<1){ prnMsg(_('Numbers less than 1 are interpreted as less than 1%. The depreciation rate should be entered as a number between 0 and 100'),'warn'); } @@ -226,15 +229,15 @@ } /*end if there was accumulated depreciation for the asset */ } /* end if there is a change in asset category */ $sql = "UPDATE fixedassets - SET longdescription='" . $_POST['LongDescription'] . "', - description='" . $_POST['Description'] . "', - assetcategoryid='" . $_POST['AssetCategoryID'] . "', - assetlocation='" . $_POST['AssetLocation'] . "', - depntype='" . $_POST['DepnType'] . "', - depnrate='" . $_POST['DepnRate'] . "', - barcode='" . $_POST['BarCode'] . "', - serialno='" . $_POST['SerialNo'] . "' - WHERE assetid='" . $AssetID . "'"; + SET longdescription='" . $_POST['LongDescription'] . "', + description='" . $_POST['Description'] . "', + assetcategoryid='" . $_POST['AssetCategoryID'] . "', + assetlocation='" . $_POST['AssetLocation'] . "', + depntype='" . $_POST['DepnType'] . "', + depnrate='" . filter_number_format($_POST['DepnRate']) . "', + barcode='" . $_POST['BarCode'] . "', + serialno='" . $_POST['SerialNo'] . "' + WHERE assetid='" . $AssetID . "'"; $ErrMsg = _('The asset could not be updated because'); $DbgMsg = _('The SQL that was used to update the asset and failed was'); @@ -257,7 +260,7 @@ '" . $_POST['AssetCategoryID'] . "', '" . $_POST['AssetLocation'] . "', '" . $_POST['DepnType'] . "', - '" . $_POST['DepnRate']. "', + '" . filter_number_format($_POST['DepnRate']). "', '" . $_POST['BarCode'] . "', '" . $_POST['SerialNo'] . "' )"; $ErrMsg = _('The asset could not be added because'); @@ -382,7 +385,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -if (!isset($AssetID) or $AssetID=='') { +if (!isset($AssetID) OR $AssetID=='') { /*If the page was called without $AssetID passed to page then assume a new asset is to be entered other wise the form showing the fields with the existing entries against the asset will show for editing with a hidden AssetID field. New is set to flag that the page may have called itself and still be entering a new asset, in which case the page needs to know not to go looking up details for an existing asset*/ @@ -425,13 +428,19 @@ $_POST['AssetLocation'] = $AssetRow['assetlocation']; $_POST['DepnType'] = $AssetRow['depntype']; $_POST['BarCode'] = $AssetRow['barcode']; - $_POST['DepnRate'] = $AssetRow['depnrate']; + $_POST['DepnRate'] = locale_number_format($AssetRow['depnrate'],2); - echo '<tr><td>' . _('Asset Code') . ':</td><td>'.$AssetID.'</td></tr>'. "\n"; - echo '<input type="Hidden" name="AssetID" value="'.$AssetID.'"/>'. "\n"; + echo '<tr> + <td>' . _('Asset Code') . ':</td> + <td>' . $AssetID . '</td> + </tr>'; + echo '<input type="Hidden" name="AssetID" value="'.$AssetID.'"/>'; } else { // some changes were made to the data so don't re-set form variables to DB ie the code above - echo '<tr><td>' . _('Asset Code') . ':</td><td>' . $AssetID . '</td></tr>'; + echo '<tr> + <td>' . _('Asset Code') . ':</td> + <td>' . $AssetID . '</td> + </tr>'; echo '<input type="Hidden" name="AssetID" value="' . $AssetID . '"/>'; } @@ -440,19 +449,27 @@ } else { $Description =''; } -echo '<tr><td>' . _('Asset Description') . ' (' . _('short') . '):</td> - <td><input ' . (in_array('Description',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Description" size=52 maxlength=50 value="' . $Description . '"></td></tr>'."\n"; +echo '<tr> + <td>' . _('Asset Description') . ' (' . _('short') . '):</td> + <td><input ' . (in_array('Description',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Description" size="52" maxlength="50" value="' . $Description . '"></td> + </tr>'; + if (isset($_POST['LongDescription'])) { $LongDescription = AddCarriageReturns($_POST['LongDescription']); } else { $LongDescription =''; } -echo '<tr><td>' . _('Asset Description') . ' (' . _('long') . '):</td><td><textarea ' . (in_array('LongDescription',$Errors) ? 'class="texterror"' : '' ) .' name="LongDescription" cols=40 rows=4>' . stripslashes($LongDescription) . '</textarea></td></tr>'; +echo '<tr> + <td>' . _('Asset Description') . ' (' . _('long') . '):</td> + <td><textarea ' . (in_array('LongDescription',$Errors) ? 'class="texterror"' : '' ) .' name="LongDescription" cols="40" rows="4">' . stripslashes($LongDescription) . '</textarea></td> + </tr>'; if (!isset($New) ) { //ie not new at all! - echo '<tr><td>'. _('Image File (.jpg)') . ':</td><td><input type="file" id="ItemPicture" name="ItemPicture"></td>'; + echo '<tr> + <td>'. _('Image File (.jpg)') . ':</td> + <td><input type="file" id="ItemPicture" name="ItemPicture"></td>'; if (function_exists('imagecreatefromjpg')){ $AssetImgLink = '<img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC'. @@ -478,7 +495,9 @@ // EOR Add Image upload for New Item - by Ori } //only show the add image if the asset already exists - otherwise AssetID will not be set - and the image needs the AssetID to save -echo '<tr><td>' . _('Asset Category') . ':</td><td><select name="AssetCategoryID">'; +echo '<tr> + <td>' . _('Asset Category') . ':</td> + <td><select name="AssetCategoryID">'; $sql = "SELECT categoryid, categorydescription FROM fixedassetcategories"; $ErrMsg = _('The asset categories could not be retrieved because'); @@ -499,7 +518,10 @@ } if (isset($AssetRow) AND ($AssetRow['datepurchased']!='0000-00-00' AND $AssetRow['datepurchased']!='')){ - echo '<tr><td>' . _('Date Purchased') . ':</td><td>' . ConvertSQLDate($AssetRow['datepurchased']) . '</td></tr>'; + echo '<tr> + <td>' . _('Date Purchased') . ':</td> + <td>' . ConvertSQLDate($AssetRow['datepurchased']) . '</td> + </tr>'; } $sql = "SELECT locationid, locationdescription FROM fixedassetlocations"; @@ -507,7 +529,10 @@ $DbgMsg = _('The SQL used to retrieve asset locations and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); -echo '<tr><td>' . _('Asset Location') . ':</td><td><select name="AssetLocation">'; +echo '<tr> + <td>' . _('Asset Location') . ':</td> + <td><select name="AssetLocation">'; + while ($myrow=DB_fetch_array($result)){ if ($_POST['AssetLocation']==$myrow['locationid']){ echo '<option selected value="' . $myrow['locationid'] .'">' . $myrow['locationdescription'] . '</option>'; @@ -515,15 +540,21 @@ echo '<option value="' . $myrow['locationid'] .'">' . $myrow['locationdescription'] . '</option>'; } } -echo '</select><a target="_blank" href="'. $rootpath . '/FixedAssetLocations.php">'.' ' . _('Add Asset Location') . '</a></td></tr>'; +echo '</select> + <a target="_blank" href="'. $rootpath . '/FixedAssetLocations.php">'.' ' . _('Add Asset Location') . '</a></td> + </tr> + <tr> + <td>' . _('Bar Code') . ':</td> + <td><input ' . (in_array('BarCode',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="BarCode" size="22" maxlength="20" value="' . $_POST['BarCode'] . '" /></td> + </tr> + <tr> + <td>' . _('Serial Number') . ':</td> + <td><input ' . (in_array('SerialNo',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="SerialNo" size="32" maxlength="30" value="' . $_POST['SerialNo'] . '" /></td> + </tr> + <tr> + <td>' . _('Depreciation Type') . ':</td> + <td><select name="DepnType">'; -echo '<tr><td>' . _('Bar Code') . ':</td><td><input ' . (in_array('BarCode',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="BarCode" size=22 maxlength=20 value="' . $_POST['BarCode'] . '"></td></tr>'; - -echo '<tr><td>' . _('Serial Number') . ':</td><td><input ' . (in_array('SerialNo',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="SerialNo" size=32 maxlength=30 value="' . $_POST['SerialNo'] . '"></td></tr>'; - - -echo '<tr><td>' . _('Depreciation Type') . ':</td><td><select name="DepnType">'; - if (!isset($_POST['DepnType'])){ $_POST['DepnType'] = 0; //0 = Straight line - 1 = Diminishing Value } @@ -535,19 +566,35 @@ echo '<option selected value="1">' . _('Diminishing Value') . '</option>'; } -echo '</select></td></tr>'; +echo '</select></td> + </tr> + <tr> + <td>' . _('Depreciation Rate') . ':</td> + <td><input ' . (in_array('DepnRate',$Errors) ? 'class="inputerror"' : 'class="number"' ) .' type="text" name="DepnRate" size="4" maxlength="4" value="' . $_POST['DepnRate'] . '" />%</td> + </tr> + </table>'; -echo '<tr><td>' . _('Depreciation Rate') . ':</td><td><input ' . (in_array('DepnRate',$Errors) ? 'class="inputerror"' : 'class="number"' ) .' type="Text" name="DepnRate" size=4 maxlength=4 value="' . $_POST['DepnRate'] . '">%</td></tr>'; -echo '</table>'; +if (isset($AssetRow)){ + + echo '<table> + <tr> + <th colspan="2">' . _('Asset Financial Summary') . '</th> + </tr> + <tr> + <td>' . _('Accumulated Costs') . ':</td> + <td class="number">' . locale_number_format($AssetRow['cost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + </tr> + <tr> + <td>' . _('Accumulated Depreciation') . ':</td> + <td class="number">' . locale_number_format($AssetRow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + </tr> + <tr> + <td>' . _('Net Book Value') . ':</td> + <td class="number">' . locale_number_format($AssetRow['cost']-$AssetRow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + </tr>'; -/*Get the last period depreciation (depn is transtype =44) was posted for */ -echo '<table><tr><th colspan=2>' . _('Asset Financial Summary') . '</th></tr>'; - -echo '<tr><td>' . _('Accumulated Costs') . ':</td><td class="number">' . locale_number_format($AssetRow['cost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; -echo '<tr><td>' . _('Accumulated Depreciation') . ':</td><td class="number">' . locale_number_format($AssetRow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; -echo '<tr><td>' . _('Net Book Value') . ':</td><td class="number">' . locale_number_format($AssetRow['cost']-$AssetRow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; - -$result = DB_query("SELECT periods.lastdate_in_period, + /*Get the last period depreciation (depn is transtype =44) was posted for */ + $result = DB_query("SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno @@ -555,26 +602,35 @@ GROUP BY periods.lastdate_in_period ORDER BY periods.lastdate_in_period DESC",$db); -$LastDepnRun = DB_fetch_row($result); -if(DB_num_rows($result)==0){ - $LastRunDate = _('Not Yet Run'); -} else { - $LastRunDate = ConvertSQLDate($LastDepnRun[0]); + $LastDepnRun = DB_fetch_row($result); + if(DB_num_rows($result)==0){ + $LastRunDate = _('Not Yet Run'); + } else { + $LastRunDate = ConvertSQLDate($LastDepnRun[0]); + } + echo '<tr> + <td>' . _('Depreciation last run') . ':</td> + <td>' . $LastRunDate . '</td> + </tr> + </table>'; } -echo '<tr><td>' . _('Depreciation last run') . ':</td><td>' . $LastRunDate . '</td></tr> - </table>'; - if (isset($New)) { - echo '<div class="centre"><br /><input type="submit" name="submit" value="' . _('Insert New Fixed Asset') . '">'; - + echo '<div class="centre"> + <br /> + <input type="submit" name="submit" value="' . _('Insert New Fixed Asset') . '" />'; } else { - - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Update') . '"></div>'; - prnMsg( _('Only click the Delete button if you are sure you wish to delete the asset. Only assets with a zero book value can be deleted'), 'warn', _('WARNING')); - echo '<br /><div class="centre"><input type="submit" name="delete" value="' . _('Delete This Asset') . '" onclick="return confirm(\'' . _('Are You Sure? Only assets with a zero book value can be deleted.') . '\');"></div>'; + echo '<br /> + <div class="centre"> + <input type="submit" name="submit" value="' . _('Update') . '" /> + </div>'; + prnMsg( _('Only click the Delete button if you are sure you wish to delete the asset. Only assets with a zero book value can be deleted'), 'warn', _('WARNING')); + echo '<br /> + <div class="centre"> + <input type="submit" name="delete" value="' . _('Delete This Asset') . '" onclick="return confirm(\'' . _('Are You Sure? Only assets with a zero book value can be deleted.') . '\');" />'; } -echo '</form></div>'; +echo '</div> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2011-11-04 04:56:22 UTC (rev 4739) +++ trunk/FixedAssetLocations.php 2011-11-06 03:12:31 UTC (rev 4740) @@ -1,34 +1,35 @@ <?php -//$PageSecurity = 11; +/* $Id$ */ include('includes/session.inc'); $title = _('Fixed Asset Locations'); include('includes/header.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . - _('Search') . '" alt="" />' . ' ' . $title.'</p>'; +echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.' + </p>'; -if (isset($_POST['submit']) and !isset($_POST['delete'])) { +if (isset($_POST['submit']) AND !isset($_POST['delete'])) { $InputError=0; - if (!isset($_POST['LocationID']) or mb_strlen($_POST['LocationID'])<1) { + if (!isset($_POST['LocationID']) OR mb_strlen($_POST['LocationID'])<1) { prnMsg(_('You must enter at least one character in the location ID'),'error'); $InputError=1; } - if (!isset($_POST['LocationDescription']) or mb_strlen($_POST['LocationDescription'])<1) { + if (!isset($_POST['LocationDescription']) OR mb_strlen($_POST['LocationDescription'])<1) { prnMsg(_('You must enter at least one character in the location description'),'error'); $InputError=1; } if ($InputError==0) { $sql="INSERT INTO fixedassetlocations - VALUES ( - '".$_POST['LocationID']."', - '".$_POST['LocationDescription']."', - '".$_POST['ParentLocationID']."')"; + VALUES ('".$_POST['LocationID']."', + '".$_POST['LocationDescription']."', + '".$_POST['ParentLocationID']."')"; $result=DB_query($sql, $db); } } if (isset($_GET['SelectedLocation'])) { - $sql="SELECT * FROM fixedassetlocations WHERE locationid='".$_GET['SelectedLocation']."'"; + $sql="SELECT * FROM fixedassetlocations + WHERE locationid='".$_GET['SelectedLocation']."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); $LocationID = $myrow['locationid']; @@ -45,14 +46,15 @@ if (isset($_POST['update']) and !isset($_POST['delete'])) { $InputError=0; if (!isset($_POST['LocationDescription']) or mb_strlen($_POST['LocationDescription'])<1) { - prnMsg(_('You must enter at least one character in the location description'),'error'); - $InputError=1; + prnMsg(_('You must enter at least one character in the location description'),'error'); + $InputError=1; } if ($InputError==0) { - $sql="UPDATE fixedassetlocations SET - locationdescription='".$_POST['LocationDescription']."', - parentlocationid='".$_POST['ParentLocationID']."' - WHERE locationid ='".$_POST['LocationID']."'"; + $sql="UPDATE fixedassetlocations + SET locationdescription='" . $_POST['LocationDescription'] . "', + parentlocationid='" . $_POST['ParentLocationID'] . "' + WHERE locationid ='" . $_POST['LocationID'] . "'"; + $result=DB_query($sql,$db); echo '<meta http-equiv="Refresh" content="0; url="'.htmlspecialchars($_SERVER['PHP_SELF']).'">'; } @@ -87,68 +89,74 @@ $result=DB_query($sql, $db); if (DB_num_rows($result) > 0) { - echo '<table class=selection><tr>'; - echo '<th>'._('Location ID').'</th> - <th>'._('Location Description').'</th> - <th>'._('Parent Location').'</th></tr>'; + echo '<table class="selection"> + <tr> + <th>'._('Location ID').'</th> + <th>'._('Location Description').'</th> + <th>'._('Parent Location').'</th> + </tr>'; } while ($myrow=DB_fetch_array($result)) { - echo '<tr><td>'.$myrow['locationid'].'</td> - <td>'.$myrow['locationdescription'].'</td>'; - $parentsql="SELECT locationdescription FROM fixedassetlocations WHERE locationid='".$myrow['parentlocationid']."'"; - $parentresult=DB_query($parentsql, $db); - $parentrow=DB_fetch_array($parentresult); - echo '<td>'.$parentrow['locationdescription'].'</td>'; - echo '<td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID.'SelectedLocation='.$myrow['locationid'].'">' . _('Edit') . '</td>'; + echo '<tr> + <td>' . $myrow['locationid'] . '</td> + <td>' . $myrow['locationdescription'] . '</td>'; + $ParentSql="SELECT locationdescription FROM fixedassetlocations WHERE locationid='".$myrow['parentlocationid']."'"; + $ParentResult=DB_query($ParentSql, $db); + $ParentRow=DB_fetch_array($ParentResult); + echo '<td>' . $ParentRow['locationdescription'] . '</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?SelectedLocation='.$myrow['locationid'].'">' . _('Edit') . '</td>'; } -echo '</table><br />'; -echo '<form name="LocationForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID . '"><table class=selection>'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<tr><th style="text-align:left">'._('Location ID').'</th>'; +echo '</table> + <br />'; +echo '<form name="LocationForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '"> + <table class="selection"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <tr> + <th style="text-align:left">'._('Location ID').'</th>'; if (isset($_GET['SelectedLocation'])) { - echo '<input type=hidden name=LocationID value="'.$LocationID.'">'; + echo '<input type="hidden" n... [truncated message content] |
From: <dai...@us...> - 2011-11-04 04:56:35
|
Revision: 4739 http://web-erp.svn.sourceforge.net/web-erp/?rev=4739&view=rev Author: daintree Date: 2011-11-04 04:56:22 +0000 (Fri, 04 Nov 2011) Log Message: ----------- number_formatting Modified Paths: -------------- trunk/CustomerReceipt.php trunk/DailySalesInquiry.php trunk/PDFReceipt.php trunk/WWW_Users.php trunk/doc/Change.log trunk/includes/DefineReceiptClass.php trunk/install/save.php trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/CustomerReceipt.php 2011-11-04 04:56:22 UTC (rev 4739) @@ -16,7 +16,6 @@ unset($_SESSION['ReceiptBatch']->Items); unset($_SESSION['ReceiptBatch']); unset($_SESSION['CustomerRecord']); - } if (isset($_POST['Cancel'])) { @@ -27,7 +26,11 @@ $_POST['GLEntry']=1; } -if ((isset($_POST['BatchInput']) and $_POST['BankAccount']=='') or (isset($_POST['Process']) and $_POST['BankAccount']=='')) { +if ((isset($_POST['BatchInput']) + AND $_POST['BankAccount']=='') + OR (isset($_POST['Process']) + AND $_POST['BankAccount']=='')) { + echo '<br />'; prnMsg(_('A bank account must be selected for this receipt'), 'warn'); $BankAccountEmpty=TRUE; @@ -37,13 +40,17 @@ $BankAccountEmpty=FALSE; } -if (!isset($_GET['Delete']) AND isset($_SESSION['ReceiptBatch'])){ //always process a header update unless deleting an item +if (!isset($_GET['Delete']) AND isset($_SESSION['ReceiptBatch'])){ + //always process a header update unless deleting an item - $_SESSION['ReceiptBatch']->Account = $_POST['BankAccount']; /*Get the bank account currency and set that too */ - $SQL = "SELECT bankaccountname, currcode FROM bankaccounts WHERE accountcode='" . $_POST['BankAccount']."'"; + $SQL = "SELECT bankaccountname, + currcode + FROM bankaccounts + WHERE accountcode='" . $_POST['BankAccount']."'"; + $ErrMsg =_('The bank account name cannot be retrieved because'); $result= DB_query($SQL,$db,$ErrMsg); @@ -69,7 +76,7 @@ prnMsg(_('The exchange rate entered should be numeric'),'warn'); } } - if (isset($_POST['FunctionalExRate']) and $_POST['FunctionalExRate']!=''){ + if (isset($_POST['FunctionalExRate']) AND $_POST['FunctionalExRate']!=''){ if (is_numeric(filter_number_format($_POST['FunctionalExRate']))){ $_SESSION['ReceiptBatch']->FunctionalExRate=filter_number_format($_POST['FunctionalExRate']); //ex rate between receipt currency and account currency } else { @@ -119,14 +126,14 @@ */ /*Get suggested FunctionalExRate */ - $result = DB_query("SELECT rate FROM currencies WHERE currabrev='" . $_SESSION['ReceiptBatch']->AccountCurrency . "'",$db); - $myrow = DB_fetch_row($result); - $SuggestedFunctionalExRate = $myrow[0]; - + $result = DB_query("SELECT rate, decimalplaces FROM currencies WHERE currabrev='" . $_SESSION['ReceiptBatch']->AccountCurrency . "'",$db); + $myrow = DB_fetch_array($result); + $SuggestedFunctionalExRate = $myrow['rate']; + $_SESSION['ReceiptBatch']->CurrDecimalPlaces = $myrow['decimalplaces']; /*Get the exchange rate between the functional currency and the receipt currency*/ $result = DB_query("SELECT rate FROM currencies WHERE currabrev='" . $_SESSION['ReceiptBatch']->Currency . "'",$db); - $myrow = DB_fetch_row($result); - $tableExRate = $myrow[0]; //this is the rate of exchange between the functional currency and the receipt currency + $myrow = DB_fetch_array($result); + $tableExRate = $myrow['rate']; //this is the rate of exchange between the functional currency and the receipt currency /*Calculate cross rate to suggest appropriate exchange rate between receipt currency and account currency */ $SuggestedExRate = $tableExRate/$SuggestedFunctionalExRate; } //end else account currency != functional currency @@ -156,17 +163,17 @@ $_POST['CustomerName']=''; } - if ($_POST['GLCode'] == '' and $_GET['Type']=='GL') { + if ($_POST['GLCode'] == '' AND $_GET['Type']=='GL') { prnMsg( _('No General Ledger code has been chosen') . ' - ' . _('so this GL analysis item could not be added'),'warn'); } else { - $_SESSION['ReceiptBatch']->add_to_batch($_POST['Amount'], - $_POST['CustomerID'], - $_POST['Discount'], - $_POST['Narrative'], - $_POST['GLCode'], - $_POST['PayeeBankDetail'], - $_POST['CustomerName'], - $_POST['tag']); + $_SESSION['ReceiptBatch']->add_to_batch(filter_number_format($_POST['Amount']), + $_POST['CustomerID'], + filter_number_format($_POST['Discount']), + $_POST['Narrative'], + $_POST['GLCode'], + $_POST['PayeeBankDetail'], + $_POST['CustomerName'], + $_POST['tag']); /*Make sure the same receipt is not double processed by a page refresh */ $Cancel = 1; @@ -228,13 +235,20 @@ $k=0; //Table row counter for row styles $CustomerReceiptCounter=1; //Count lines of customer receipts in this batch - echo '<br /><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Allocate') . '" alt="" />' . ' ' . _('Summary of Receipt Batch').'</p><br />'; + echo '<br /> + <p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Allocate') . '" alt="" />' . ' ' . _('Summary of Receipt Batch').' + </p> + <br />'; - echo '<table class=selection><tr><th>'._('Batch Number').'</th> + echo '<table class="selection"> + <tr> + <th>'._('Batch Number').'</th> <th>' . _('Date Banked') . '</th> <th>' . _('Customer Name') . '</th> <th>' . _('GL Code') . '</th> - <th>' . _('Amount of Receipt').'</th></tr>'; + <th>' . _('Amount of Receipt').'</th> + </tr>'; foreach ($_SESSION['ReceiptBatch']->Items as $ReceiptItem) { @@ -254,7 +268,7 @@ <td>'.$_SESSION['ReceiptBatch']->DateBanked.'</td> <td>'.$ReceiptItem->CustomerName.'</td> <td>'.$ReceiptItem->GLCode.' - '.$myrow['accountname'].'</td> - <td class=number>'.locale_number_format($ReceiptItem->Amount/$_SESSION['ReceiptBatch']->ExRate/$_SESSION['ReceiptBatch']->FunctionalExRate,2) .'</td>'; + <td class="number">'.locale_number_format($ReceiptItem->Amount/$_SESSION['ReceiptBatch']->ExRate/$_SESSION['ReceiptBatch']->FunctionalExRate,$_SESSION['ReceiptBatch']->CurrDecimalPlaces) .'</td>'; if ($ReceiptItem->GLCode ==''){ echo '<td><a target="_blank" href="' . $rootpath . '/PDFReceipt.php?BatchNumber=' . $_SESSION['ReceiptBatch']->BatchNo. '&ReceiptNumber='.$CustomerReceiptCounter.'">'._('Print a Customer Receipt').'</a></td></tr>'; @@ -527,7 +541,8 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . '<a href="' . $rootpath . '/PDFBankingSummary.php?BatchNo=' . $_SESSION['ReceiptBatch']->BatchNo . '">' . _('Print PDF Batch Summary') . '</a></p>'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/allocation.png" title="' . _('Allocate') . '" alt="">' . ' ' . '<a href="' . $rootpath . '/CustomerAllocations.php">' . _('Allocate Receipts') . '</a></p>'; - echo '<p class="page_title_text">• ' . $rootpath . '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer ' . _('Enter Receipts') . ' </p>'; + echo '<p class="page_title_text"><a href="' . $rootpath . '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer">' . _('Enter Receipts') . '</a> + </p>'; unset($_SESSION['ReceiptBatch']); include('includes/footer.inc'); @@ -541,7 +556,10 @@ if ($_POST['Keywords'] AND $_POST['CustCode']) { $msg=_('Customer name keywords have been used in preference to the customer code extract entered'); } - if ($_POST['Keywords']=="" AND $_POST['CustCode']=="" AND $_POST['CustInvNo']=="") { + if ($_POST['Keywords']=='' + AND $_POST['CustCode']=='' + AND $_POST['CustInvNo']=='') { + $msg=_('At least one Customer Name keyword OR an extract of a Customer Code must be entered for the search'); } else { if (mb_strlen($_POST['Keywords'])>0) { @@ -549,24 +567,24 @@ $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT debtorsmaster.debtorno, - debtorsmaster.name - FROM debtorsmaster - WHERE debtorsmaster.name " . LIKE . " '". $SearchString . "' - AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; + debtorsmaster.name + FROM debtorsmaster + WHERE debtorsmaster.name " . LIKE . " '". $SearchString . "' + AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; } elseif (mb_strlen($_POST['CustCode'])>0){ $SQL = "SELECT debtorsmaster.debtorno, - debtorsmaster.name - FROM debtorsmaster - WHERE debtorsmaster.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' - AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; + debtorsmaster.name + FROM debtorsmaster + WHERE debtorsmaster.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' + AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; } elseif (mb_strlen($_POST['CustInvNo'])>0){ $SQL = "SELECT debtortrans.debtorno, - debtorsmaster.name - FROM debtorsmaster LEFT JOIN debtortrans - ON debtorsmaster.debtorno=debtortrans.debtorno - WHERE debtortrans.transno " . LIKE . " '%" . $_POST['CustInvNo'] . "%' - AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; + debtorsmaster.name + FROM debtorsmaster LEFT JOIN debtortrans + ON debtorsmaster.debtorno=debtortrans.debtorno + WHERE debtortrans.transno " . LIKE . " '%" . $_POST['CustInvNo'] . "%' + AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; } $CustomerSearchResult = DB_query($SQL,$db,'','',false,false); @@ -609,6 +627,7 @@ debtorsmaster.currcode, currencies.currency, currencies.rate, + currencies.decimalplaces AS currdecimalplaces, paymentterms.terms, debtorsmaster.creditlimit, holdreasons.dissallowinvoices, @@ -629,21 +648,21 @@ ELSE CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1','MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) >= " . $_SESSION['PastDueDays2'] . ") THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END) AS overdue2 - FROM debtorsmaster, - paymentterms, - holdreasons, - currencies, - debtortrans - WHERE debtorsmaster.paymentterms = paymentterms.termsindicator - AND debtorsmaster.currcode = currencies.currabrev - AND debtorsmaster.holdreason = holdreasons.reasoncode - AND debtorsmaster.debtorno = '" . $_POST['CustomerID'] . "' - AND debtorsmaster.debtorno = debtortrans.debtorno + FROM debtorsmaster INNER JOIN paymentterms + ON debtorsmaster.paymentterms = paymentterms.termsindicator + INNER JOIN holdreasons + ON debtorsmaster.holdreason = holdreasons.reasoncode + INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + INNER JOIN debtortrans + ON debtorsmaster.debtorno = debtortrans.debtorno + WHERE debtorsmaster.debtorno = '" . $_POST['CustomerID'] . "' GROUP BY debtorsmaster.name, debtorsmaster.pymtdiscount, debtorsmaster.currcode, currencies.currency, currencies.rate, + currencies.decimalplaces, paymentterms.terms, debtorsmaster.creditlimit, paymentterms.daysbeforedue, @@ -667,19 +686,19 @@ debtorsmaster.pymtdiscount, currencies.currency, currencies.rate, + currencies.decimalplaces AS currdecimalplaces, paymentterms.terms, debtorsmaster.creditlimit, debtorsmaster.currcode, holdreasons.dissallowinvoices, holdreasons.reasondescription - FROM debtorsmaster, - paymentterms, - holdreasons, - currencies - WHERE debtorsmaster.paymentterms = paymentterms.termsindicator - AND debtorsmaster.currcode = currencies.currabrev - AND debtorsmaster.holdreason = holdreasons.reasoncode - AND debtorsmaster.debtorno = '" . $_POST['CustomerID'] . "'"; + FROM debtorsmaster INNER JOIN paymentterms + ON debtorsmaster.paymentterms = paymentterms.termsindicator + INNER JOIN holdreasons + ON debtorsmaster.holdreason = holdreasons.reasoncode + INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + WHERE debtorsmaster.debtorno = '" . $_POST['CustomerID'] . "'"; $ErrMsg = _('The customer details could not be retrieved because'); $DbgMsg = _('The SQL that failed was'); @@ -708,11 +727,10 @@ /*show the batch header details and the entries in the batch so far */ $SQL = "SELECT bankaccountname, - bankaccounts.accountcode, - bankaccounts.currcode - FROM bankaccounts, - chartmaster - WHERE bankaccounts.accountcode=chartmaster.accountcode"; + bankaccounts.accountcode, + bankaccounts.currcode + FROM bankaccounts INNER JOIN chartmaster + ON bankaccounts.accountcode=chartmaster.accountcode"; $ErrMsg = _('The bank accounts could not be retrieved because'); @@ -725,11 +743,17 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Enter Receipt') . '" alt="">' . ' ' . _('Enter Customer Receipt') . '</p>'; echo '<div class="page_help_text">' . _('To enter a payment TO a customer (ie. to pay out a credit note), enter a negative payment amount.') . '</div>'; } -echo '<br /><table class=selection><tr><td>' . _('Bank Account') . ':</td> - <td><select tabindex=1 name="BankAccount" onChange="ReloadForm(form1.BatchInput)">'; +echo '<br /> + <table class="selection"> + <tr> + <td>' . _('Bank Account') . ':</td> + <td><select tabindex="1" name="BankAccount" onChange="ReloadForm(form1.BatchInput)">'; if (DB_num_rows($AccountsResults)==0){ - echo '</select></td></tr></table><p>'; + echo '</select></td> + </tr> + </table> + <p />'; prnMsg(_('Bank Accounts have not yet been defined') . '. ' . _('You must first') . ' ' . '<a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a>' . _('and general ledger accounts to be affected'),'info'); include('includes/footer.inc'); exit; @@ -743,23 +767,27 @@ echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname']. ' - ' . $myrow['currcode'] . '</option>'; } } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } if (!Is_Date($_SESSION['ReceiptBatch']->DateBanked)){ $_SESSION['ReceiptBatch']->DateBanked = Date($_SESSION['DefaultDateFormat']); } -echo '<tr><td>' . _('Date Banked') . ':</td> - <td><input tabindex=2 type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="DateBanked" maxlength=10 size=10 onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_SESSION['ReceiptBatch']->DateBanked . '"></td></tr>'; -echo '<tr><td>' . _('Currency') . ':</td> - <td><select tabindex=3 name="Currency" onChange="ReloadForm(form1.BatchInput)">'; +echo '<tr> + <td>' . _('Date Banked') . ':</td> + <td><input tabindex="2" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="DateBanked" maxlength="10" size="10" onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_SESSION['ReceiptBatch']->DateBanked . '"></td> + </tr> + <tr> + <td>' . _('Currency') . ':</td> + <td><select tabindex="3" name="Currency" onChange="ReloadForm(form1.BatchInput)">'; if (!isset($_SESSION['ReceiptBatch']->Currency)){ $_SESSION['ReceiptBatch']->Currency=$_SESSION['CompanyRecord']['currencydefault']; } -$SQL = 'SELECT currency, currabrev, rate FROM currencies'; +$SQL = "SELECT currency, currabrev, rate FROM currencies"; $result=DB_query($SQL,$db); if (DB_num_rows($result)==0){ echo '</select></td></tr>'; @@ -773,7 +801,8 @@ echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } @@ -793,26 +822,33 @@ if ($_SESSION['ReceiptBatch']->ExRate==1 AND isset($SuggestedExRate)){ $_SESSION['ReceiptBatch']->ExRate = $SuggestedExRate; } - echo '<tr><td>' . _('Receipt Exchange Rate') . ':</td> - <td><input tabindex=4 type="text" name="ExRate" maxlength=10 size=12 class=number value="' . $_SESSION['ReceiptBatch']->ExRate . '"></td> - <td>' . $SuggestedExRateText . ' <i>' . _('The exchange rate between the currency of the bank account currency and the currency of the receipt') . '. 1 ' . $_SESSION['ReceiptBatch']->AccountCurrency . ' = ? ' . $_SESSION['ReceiptBatch']->Currency . '</i></td></tr>'; + echo '<tr> + <td>' . _('Receipt Exchange Rate') . ':</td> + <td><input tabindex="4" type="text" name="ExRate" maxlength="10" size="12" class="number" value="' . locale_number_format($_SESSION['ReceiptBatch']->ExRate,6) . '" /></td> + <td>' . locale_number_format($SuggestedExRateText,6) . ' <i>' . _('The exchange rate between the currency of the bank account currency and the currency of the receipt') . '. 1 ' . $_SESSION['ReceiptBatch']->AccountCurrency . ' = ? ' . $_SESSION['ReceiptBatch']->Currency . '</i></td> + </tr>'; } if ($_SESSION['ReceiptBatch']->AccountCurrency!=$_SESSION['CompanyRecord']['currencydefault'] - AND isset($_SESSION['ReceiptBatch']->AccountCurrency)){ + AND isset($_SESSION['ReceiptBatch']->AccountCurrency)){ if (isset($SuggestedFunctionalExRate)){ - $SuggestedFunctionalExRateText = '<b>' . _('Suggested rate:') . ' ' . locale_number_format($SuggestedFunctionalExRate,4) . '</b>'; + $SuggestedFunctionalExRateText = '<b>' . _('Suggested rate:') . ' ' . locale_number_format($SuggestedFunctionalExRate,6) . '</b>'; } else { $SuggestedFunctionalExRateText =''; } if ($_SESSION['ReceiptBatch']->FunctionalExRate==1 AND isset($SuggestedFunctionalExRate)){ $_SESSION['ReceiptBatch']->FunctionalExRate = $SuggestedFunctionalExRate; } - echo '<tr><td>' . _('Functional Exchange Rate') . ':</td><td><input tabindex=5 type="text" name="FunctionalExRate" class=number maxlength=10 size=12 value="' . $_SESSION['ReceiptBatch']->FunctionalExRate . '"></td> - <td>' . ' ' . $SuggestedFunctionalExRateText . ' <i>' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '. 1 ' . $_SESSION['CompanyRecord']['currencydefault'] . ' = ? ' . $_SESSION['ReceiptBatch']->AccountCurrency . '</i></td></tr>'; + echo '<tr> + <td>' . _('Functional Exchange Rate') . ':</td> + <td><input tabindex="5" type="text" name="FunctionalExRate" class="number" maxlength="10" size="12" value="' . locale_number_format($_SESSION['ReceiptBatch']->FunctionalExRate,6) . '" /></td> + <td>' . ' ' . $SuggestedFunctionalExRateText . ' <i>' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '. 1 ' . $_SESSION['CompanyRecord']['currencydefault'] . ' = ? ' . $_SESSION['ReceiptBatch']->AccountCurrency . '</i></td> + </tr>'; } -echo '<tr><td>' . _('Receipt Type') . ':</td><td><select tabindex=6 name="ReceiptType">'; +echo '<tr> + <td>' . _('Receipt Type') . ':</td> + <td><select tabindex="6" name="ReceiptType">'; include('includes/GetPaymentMethods.php'); /* The array ReceiptTypes is defined from the setup tab of the main menu under payment methods - the array is populated from the include file GetPaymentMethods.php */ @@ -824,13 +860,24 @@ echo '<option value="' .$RcptType . '">' . $RcptType .'</option>'; } } -echo '</select></td></tr>'; +echo '</select></td> + </tr>'; if (!isset($_SESSION['ReceiptBatch']->Narrative)) { $_SESSION['ReceiptBatch']->Narrative=''; } -echo '<tr><td>' . _('Narrative') . ':</td><td><input tabindex=7 type="text" name="BatchNarrative" maxlength=50 size=52 value="' . $_SESSION['ReceiptBatch']->Narrative . '"></td></tr>'; -echo '<tr><td colspan=3><div class="centre"><input tabindex=8 type=submit name="BatchInput" Value="' . _('Accept') . '"></div></td></tr>'; -echo '</table><br />'; +echo '<tr> + <td>' . _('Narrative') . ':</td> + <td><input tabindex="7" type="text" name="BatchNarrative" maxlength="50" size="52" value="' . $_SESSION['ReceiptBatch']->Narrative . '" /></td> + </tr> + <tr> + <td colspan="3"> + <div class="centre"> + <input tabindex="8" type="submit" name="BatchInput" value="' . _('Accept') . '" /> + </div> + </td> + </tr> + </table> + <br />'; if (isset($_SESSION['ReceiptBatch'])){ /* Now show the entries made so far */ @@ -840,13 +887,14 @@ $_SESSION['ReceiptBatch']->BankAccountName . ' ' . _('on') . ' ' . $_SESSION['ReceiptBatch']->DateBanked . '</p>'; } - echo '<table width="90%" class=selection><tr> + echo '<table width="90%" class="selection"> + <tr> <th>' . _('Amount') . ' ' . _('Received') . '</th> <th>' . _('Discount') . '</th> <th>' . _('Customer') . '</th> <th>' . _('GL Code') . '</th> <th>' . _('Narrative') . '</th> - </tr>'; + </tr>'; $BatchTotal = 0; @@ -857,8 +905,8 @@ $myrow=DB_fetch_array($Result); echo '<tr> - <td class=number>' . locale_number_format($ReceiptItem->Amount,2) . '</td> - <td class=number>' . locale_number_format($ReceiptItem->Discount,2) . '</td> + <td class="number">' . locale_number_format($ReceiptItem->Amount,$_SESSION['ReceiptBatch']->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($ReceiptItem->Discount,$_SESSION['ReceiptBatch']->CurrDecimalPlaces) . '</td> <td>' . stripslashes($ReceiptItem->CustomerName) . '</td> <td>'.$ReceiptItem->GLCode.' - '.$myrow['accountname'].'</td> <td>'.$ReceiptItem->Narrative . '</td> @@ -867,7 +915,10 @@ $BatchTotal= $BatchTotal + $ReceiptItem->Amount; } - echo '<tr><td class=number><b>' . locale_number_format($BatchTotal,2) . '</b></td></tr></table>'; + echo '<tr> + <td class="number"><b>' . locale_number_format($BatchTotal,$_SESSION['ReceiptBatch']->CurrDecimalPlaces) . '</b></td> + </tr> + </table>'; } /*this next block of ifs deals with what information to display for input into the form @@ -897,43 +948,51 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . $_SESSION['CustomerRecord']['name'] . ' - (' . _('All amounts stated in') . ' ' . $_SESSION['CustomerRecord']['currency'] . ')' . _('Terms') . ': ' . $_SESSION['CustomerRecord']['terms'] . '<br/>' . _('Credit Limit') . ': ' . locale_number_format($_SESSION['CustomerRecord']['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $_SESSION['CustomerRecord']['reasondescription']; if ($_SESSION['CustomerRecord']['dissallowinvoices']!=0){ - echo '<br /><font color=red size=4><b>' . _('ACCOUNT ON HOLD') . '</font></b><br/>'; + echo '<br /> + <font color="red" size="4"><b>' . _('ACCOUNT ON HOLD') . '</font></b> + <br/>'; } - echo '<table width="90%" class=selection> + echo '<table width="90%" class="selection"> <tr> - <th width=20%>' . _('Total Balance') . '</th> - <th width=20%>' . _('Current') . '</th> - <th width=20%>' . _('Now Due') . '</th> - <th width=20%>' . $_SESSION['PastDueDays1'] . '-' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th> - <th width=20%>' . _('Over') . ' ' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th> + <th width="20%">' . _('Total Balance') . '</th> + <th width="20%">' . _('Current') . '</th> + <th width="20%">' . _('Now Due') . '</th> + <th width="20%">' . $_SESSION['PastDueDays1'] . '-' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th> + <th width="20%">' . _('Over') . ' ' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th> </tr>'; echo '<tr> - <td class=number>' . locale_number_format($_SESSION['CustomerRecord']['balance'],2) . '</td> - <td class=number>' . locale_number_format(($_SESSION['CustomerRecord']['balance'] - $_SESSION['CustomerRecord']['due']),2) . '</td> - <td class=number>' . locale_number_format(($_SESSION['CustomerRecord']['due']-$_SESSION['CustomerRecord']['overdue1']),2) . '</td> - <td class=number>' . locale_number_format(($_SESSION['CustomerRecord']['overdue1']-$_SESSION['CustomerRecord']['overdue2']) ,2) . '</td> - <td class=number>' . locale_number_format($_SESSION['CustomerRecord']['overdue2'],2) . '</td> + <td class="number">' . locale_number_format($_SESSION['CustomerRecord']['balance'],$_SESSION['CustomerRecord']['currdecimalplaces']) . '</td> + <td class="number">' . locale_number_format(($_SESSION['CustomerRecord']['balance'] - $_SESSION['CustomerRecord']['due']),$_SESSION['CustomerRecord']['currdecimalplaces']) . '</td> + <td class="number">' . locale_number_format(($_SESSION['CustomerRecord']['due']-$_SESSION['CustomerRecord']['overdue1']),$_SESSION['CustomerRecord']['currdecimalplaces']) . '</td> + <td class="number">' . locale_number_format(($_SESSION['CustomerRecord']['overdue1']-$_SESSION['CustomerRecord']['overdue2']) ,$_SESSION['CustomerRecord']['currdecimalplaces']) . '</td> + <td class="number">' . locale_number_format($_SESSION['CustomerRecord']['overdue2'],$_SESSION['CustomerRecord']['currdecimalplaces']) . '</td> </tr> - </table><br />'; + </table> + <br />'; echo '<table class="selection">'; $DisplayDiscountPercent = locale_number_format($_SESSION['CustomerRecord']['pymtdiscount']*100,2) . '%'; - echo '<input type="hidden" name="CustomerID" value="' . $_POST['CustomerID'] . '">'; - echo '<input type="hidden" name="CustomerName" value="' . $_SESSION['CustomerRecord']['name'] . '">'; + echo '<input type="hidden" name="CustomerID" value="' . $_POST['CustomerID'] . '" />'; + echo '<input type="hidden" name="CustomerName" value="' . $_SESSION['CustomerRecord']['name'] . '" />'; } if (isset($_POST['GLEntry']) AND isset($_SESSION['ReceiptBatch'])){ /* Set up a heading for the transaction entry for a GL Receipt */ - echo '<br /><table class=selection>'; - echo '<th colspan=2><font size=2 color=navy>' . _('General Ledger Receipt Entry') . '</font></th>'; + echo '<br /> + <table class="selection"> + <tr> + <th colspan="2"><font size="2" color="navy">' . _('General Ledger Receipt Entry') . '</font></th> + </tr>'; //Select the tag - echo '<tr><td>' . _('Select Tag') . ':</td><td><select name="tag">'; + echo '<tr> + <td>' . _('Select Tag') . ':</td> + <td><select name="tag">'; $SQL = "SELECT tagref, tagdescription @@ -949,15 +1008,20 @@ echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; // End select tag /*now set up a GLCode field to select from avaialble GL accounts */ - echo '<tr><td>' . _('GL Account') . ':</td><td><select tabindex=8 name="GLCode">'; - $SQL = 'SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode'; + echo '<tr> + <td>' . _('GL Account') . ':</td> + <td><select tabindex="8" name="GLCode">'; + + $SQL = "SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode"; $result=DB_query($SQL,$db); if (DB_num_rows($result)==0){ - echo '</select>' . _('No General ledger accounts have been set up yet') . ' - ' . _('receipts cannot be entered against GL accounts until the GL accounts are set up') . '</td></tr>'; + echo '</select>' . _('No General ledger accounts have been set up yet') . ' - ' . _('receipts cannot be entered against GL accounts until the GL accounts are set up') . '</td> + </tr>'; } else { echo '<option value=""></option>'; while ($myrow=DB_fetch_array($result)){ @@ -967,9 +1031,9 @@ echo '<option value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } - } /*if either a customer is selected or its a GL Entry then set out @@ -977,9 +1041,9 @@ if (((isset($_SESSION['CustomerRecord']) AND isset($_POST['CustomerID']) - AND $_POST['CustomerID']!="") + AND $_POST['CustomerID']!='') OR isset($_POST['GLEntry'])) - AND isset($_SESSION['ReceiptBatch'])){ + AND isset($_SESSION['ReceiptBatch'])){ if (!isset($_POST['Amount'])) { $_POST['Amount']=0; @@ -993,52 +1057,71 @@ if (!isset($_POST['Narrative'])) { $_POST['Narrative']=''; } - echo '<tr><td>' . _('Amount of Receipt') . ':</td> - <td><input tabindex=9 type="text" name="Amount" maxlength=12 size=13 class=number value="' . $_POST['Amount'] . '"></td> - </tr>'; + echo '<tr> + <td>' . _('Amount of Receipt') . ':</td> + <td><input tabindex="9" type="text" name="Amount" maxlength="12" size="13" class="number" value="' . $_POST['Amount'] . '" /></td> + </tr>'; if (!isset($_POST['GLEntry'])){ - echo '<tr><td>' . _('Amount of Discount') . ':</td> - <td><input tabindex=10 type="text" name="Discount" maxlength=12 size=13 class=number value="' . $_POST['Discount'] . '"> ' . _('agreed prompt payment discount is') . ' ' . $DisplayDiscountPercent . '</td></tr>'; + echo '<tr> + <td>' . _('Amount of Discount') . ':</td> + <td><input tabindex="10" type="text" name="Discount" maxlength="12" size="13" class="number" value="' . $_POST['Discount'] . '" /> ' . _('agreed prompt payment discount is') . ' ' . $DisplayDiscountPercent . '</td></tr>'; } else { - echo '<input tabindex=11 type="hidden" name="Discount" Value=0>'; + echo '<input tabindex=11 type="hidden" name="Discount" value="0" />'; } - echo '<tr><td>' . _('Payee Bank Details') . ':</td> - <td><input tabindex=12 type="text" name="PayeeBankDetail" maxlength=22 size=20 value="' . $_POST['PayeeBankDetail'] . '"></td></tr>'; + echo '<tr> + <td>' . _('Payee Bank Details') . ':</td> + <td><input tabindex="12" type="text" name="PayeeBankDetail" maxlength="22" size="20" value="' . $_POST['PayeeBankDetail'] . '" /></td> + </tr>'; // echo '<tr><td>' . _('Narrative') . ':</td> // <td><input tabindex=13 type="text" name="Narrative" maxlength=30 size=32 value="' . $_POST['Narrative'] . '"></td></tr>'; - echo '<td>' . _('Narrative') . ':</td>'; - echo '<td><textarea name="Narrative" cols=40 rows=1></textarea></td>'; - echo '</table>'; - echo '<br /><div class="centre"><input tabindex=14 type="submit" name="Process" value="' . _('Accept') . '">'; - echo '<input tabindex=14 type="submit" name="Cancel" value="' . _('Cancel') . '"></div>'; + echo '<td>' . _('Narrative') . ':</td> + <td><textarea name="Narrative" cols="40" rows="1"></textarea></td> + </tr> + </table> + <br /> + <div class="centre"> + <input tabindex="14" type="submit" name="Process" value="' . _('Accept') . '" /> + <input tabindex="15" type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div>'; -} elseif (isset($_SESSION['ReceiptBatch']) AND !isset($_POST['GLEntry'])){ +} elseif (isset($_SESSION['ReceiptBatch']) + AND !isset($_POST['GLEntry'])){ /*Show the form to select a customer */ echo '<br />'; - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Select a Customer') . '</b>'; - echo '<table cellpadding=3 colspan=4 class=selection>'; - echo '<tr><td>' . _('Text in the Customer') . ' ' . '<b>' . _('name') . '</b>:</td>'; - echo '<td><input tabindex=9 type="text" name="Keywords" size=15 maxlength=25></td>'; - echo '<td><font size=3><b>' . _('OR') . '</b></font></td>'; - echo '<td>' . _('Text extract in the Customer') . ' ' . '<b>' . _('code') . '</b>:</td>'; - echo '<td><input tabindex=10 type="text" name="CustCode" size=10 maxlength=18></td>'; - echo '<td><font size=3><b>' . _('OR') . '</b></font></td>'; - echo '<td>' . _('Customer invoice number') . ':</td>'; - echo '<td><input tabindex=11 type="text" name="CustInvNo" size=8 maxlength=8></td>'; - echo '</tr></table>'; - echo '<div class="centre"><br />'; - echo '<input tabindex=11 type=submit name="Search" value="' . _('Search Now') . '">'; - echo '<br/><br/><input tabindex=12 type=submit name="GLEntry" value="' . _('Enter A GL Receipt') . '"><br /></div>'; + echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Select a Customer') . '</b> + <table class="selection"> + <tr> + <td>' . _('Text in the Customer') . ' ' . '<b>' . _('name') . '</b>:</td> + <td><input tabindex="9" type="text" name="Keywords" size="15" maxlength="25" /></td> + <td><font size="3"><b>' . _('OR') . '</b></font></td> + <td>' . _('Text extract in the Customer') . ' ' . '<b>' . _('code') . '</b>:</td> + <td><input tabindex="10" type="text" name="CustCode" size="10" maxlength="18" /></td> + <td><font size="3"><b>' . _('OR') . '</b></font></td> + <td>' . _('Customer invoice number') . ':</td> + <td><input tabindex="11" type="text" name="CustInvNo" size="8" maxlength="8" /></td> + </tr> + </table> + <div class="centre"> + <br /> + <input tabindex="11" type="submit" name="Search" value="' . _('Search Now') . '" /> + <br/> + <br/> + <input tabindex="12" type="submit" name="GLEntry" value="' . _('Enter A GL Receipt') . '" /> + <br /> + </div>'; if (isset($CustomerSearchResult)) { - echo '<table cellpadding=2 colspan=7 class=selection>'; - $TableHeader = '<tr><th>' . _('Code') . '</th> - <th>' . _('Customer Name') . '</th></tr>'; + echo '<table class="selection">'; + $TableHeader = '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Customer Name') . '</th> + </tr>'; echo $TableHeader; $j = 1; $k = 0; //row counter to determine background colour @@ -1052,9 +1135,9 @@ echo '<tr class="EvenTableRows">'; $k=1; } - printf('<td><font size=1> - <input tabindex='.locale_number_format(12+$j).' type=submit name="Select" value="%s"></font></td> - <td>%s</td></tr>', + printf('<td><font size=1><input tabindex="'. strval(12+$j).'" type="submit" name="Select" value="%s" /></font></td> + <td>%s</td> + </tr>', $myrow['debtorno'], $myrow['name']); @@ -1074,8 +1157,11 @@ } if (isset($_SESSION['ReceiptBatch']->Items) and count($_SESSION['ReceiptBatch']->Items) > 0){ - echo '<div class="centre"><br/><input tabindex="13" type="submit" name="CommitBatch" value="' . _('Accept and Process Batch') . '"></div>'; + echo '<div class="centre"> + <br/> + <input tabindex="13" type="submit" name="CommitBatch" value="' . _('Accept and Process Batch') . '" /> + </div>'; } echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/DailySalesInquiry.php 2011-11-04 04:56:22 UTC (rev 4739) @@ -5,7 +5,6 @@ include('includes/session.inc'); $title = _('Daily Sales Inquiry'); include('includes/header.inc'); -include('includes/DefineCartClass.php'); echo '<p class="page_title_text"> <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Daily Sales') . '" alt="" />' . ' ' . _('Daily Sales') . ' @@ -21,16 +20,18 @@ <td>' . _('Month to Show') . ':</td> <td><select tabindex="1" name="MonthToShow">'; - if (!isset($_POST['MonthToShow'])){ $_POST['MonthToShow'] = GetPeriod(Date($_SESSION['DefaultDateFormat']),$db); + $Result = DB_query("SELECT lastdate_in_period FROM periods WHERE period='" . $_POST['MonthToShow'] . "'",$db); + $myrow = DB_fetch_array($Result); + $EndDateSQL = $myrow['lastdate_in_period']; } $PeriodsResult = DB_query("SELECT periodno, lastdate_in_period FROM periods",$db); while ($PeriodRow = DB_fetch_array($PeriodsResult)){ if ($_POST['MonthToShow']==$PeriodRow['periodno']) { - echo '<option selected Value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; + echo '<option selected value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; $EndDateSQL = $PeriodRow['lastdate_in_period']; } else { echo '<option value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; Modified: trunk/PDFReceipt.php =================================================================== --- trunk/PDFReceipt.php 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/PDFReceipt.php 2011-11-04 04:56:22 UTC (rev 4739) @@ -46,23 +46,23 @@ $PageNumber++; -$sql="SELECT MIN(id) as start FROM debtortrans WHERE type=12 AND transno='". filer_locale_number_format($_GET['BatchNumber']). "'"; +$sql="SELECT MIN(id) as start FROM debtortrans WHERE type=12 AND transno='". $_GET['BatchNumber']. "'"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $StartReceiptNumber=$myrow['start']; -$sql="SELECT debtorno, - ovamount, - invtext - FROM debtortrans - WHERE type=12 - AND transno='".$_GET['BatchNumber']."' - AND id='". $StartReceiptNumber-1+$_GET['ReceiptNumber'] ."'"; -$result=DB_query($sql, $db); -$myrow=DB_fetch_array($result); -$DebtorNo=$myrow['debtorno']; -$Amount=$myrow['ovamount']; -$Narrative=$myrow['invtext']; +$sql="SELECT debtorno, + ovamount, + invtext + FROM debtortrans + WHERE type=12 + AND transno='" . $_GET['BatchNumber'] . "' + AND id='". ($StartReceiptNumber-1+$_GET['ReceiptNumber']) ."'"; +$result = DB_query($sql, $db); +$myrow = DB_fetch_array($result); +$DebtorNo = $myrow['debtorno']; +$Amount = $myrow['ovamount']; +$Narrative = $myrow['invtext']; $sql="SELECT currency, decimalplaces @@ -76,13 +76,13 @@ $Currency=$myrow['currency']; $DecimalPlaces=$myrow['decimalplaces']; -$sql="SELECT name, - address1, - address2, - address3, - address4, - address5, - address6 +$sql="SELECT name, + address1, + address2, + address3, + address4, + address5, + address6 FROM debtorsmaster WHERE debtorno='".$DebtorNo."'"; Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/WWW_Users.php 2011-11-04 04:56:22 UTC (rev 4739) @@ -33,8 +33,10 @@ // Make an array of the security roles $sql = "SELECT secroleid, - secrolename - FROM securityroles ORDER BY secroleid"; + secrolename + FROM securityroles + ORDER BY secroleid"; + $Sec_Result = DB_query($sql, $db); $SecurityRoles = array(); // Now load it into an a ray using Key/Value pairs @@ -72,7 +74,8 @@ } elseif (mb_strstr($_POST['Password'],$_POST['UserID'])!= False){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); - } elseif ((mb_strlen($_POST['Cust'])>0) AND (mb_strlen($_POST['BranchCode'])==0)) { + } elseif ((mb_strlen($_POST['Cust'])>0) + AND (mb_strlen($_POST['BranchCode'])==0)) { $InputError = 1; prnMsg(_('If you enter a Customer Code you must also enter a Branch Code valid for this Customer'),'error'); } @@ -173,15 +176,15 @@ theme, language, pdflanguage) - VALUES ('" . DB_escape_string($_POST['UserID']) . "', - '" . DB_escape_string($_POST['RealName']) ."', - '" . DB_escape_string($_POST['Cust']) ."', - '" . DB_escape_string($_POST['BranchCode']) ."', - '" . DB_escape_string($_POST['SupplierID']) ."', + VALUES ('" . $_POST['UserID'] . "', + '" . $_POST['RealName'] ."', + '" . $_POST['Cust'] ."', + '" . $_POST['BranchCode'] ."', + '" . $_POST['SupplierID'] ."', '" . $_POST['Salesman'] . "', '" . CryptPass($_POST['Password']) ."', - '" . DB_escape_string($_POST['Phone']) . "', - '" . DB_escape_string($_POST['Email']) ."', + '" . $_POST['Phone'] . "', + '" . $_POST['Email'] ."', '" . $_POST['PageSize'] ."', '" . $_POST['Access'] . "', '" . $_POST['DefaultLocation'] ."', @@ -327,7 +330,7 @@ $SecurityRoles[($myrow['fullaccess'])], $myrow['pagesize'], $myrow['theme'], - $LanguagesArray[$myrow['language']], + $LanguagesArray[$myrow['language']]['LanguageName'], htmlspecialchars($_SERVER['PHP_SELF']) . '?', $myrow['userid'], htmlspecialchars($_SERVER['PHP_SELF']) . '?', Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/doc/Change.log 2011-11-04 04:56:22 UTC (rev 4739) @@ -5,6 +5,7 @@ 29/10/11 High-Tech Bridge SA Security Research Lab <adv...@ht...> - sanitising $_SERVER['PHP_SELF'] and unquoted sql in reportwriter/FormMaker.php and reportwriter/ReportMaker.php 15/10/11 Phil: Tried to get correct characters for each language's thousands separator and decimal point in includes/LanguagesArray.php 15/10/11 Phil: Updated PHPplot to 5.5.0 +15/10/11 Fred Schuettler aguapop - theme 8/10/11 Ricard: PcExpenses.php PcAuthorizeExpense.php now uses GL tags 8/10/11 Phil: SelectSalesOrder.php now allows for creation of purchase orders for the components of assembly items on sales orders. 29/9/11 Ricard: added new query critera to AuditTrail.php to look for text in query strings to enable searching for updates/inserts/deletes relating to a specified customer or item code etc Modified: trunk/includes/DefineReceiptClass.php =================================================================== --- trunk/includes/DefineReceiptClass.php 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/includes/DefineReceiptClass.php 2011-11-04 04:56:22 UTC (rev 4739) @@ -14,6 +14,7 @@ var $ExRate; /*Exchange rate conversion between currency received and bank account currency */ var $FunctionalExRate; /* Exchange Rate between Bank Account Currency and Functional(business reporting) currency */ var $Currency; /*Currency being banked - defaulted to company functional */ + var $CurrDecimalPlaces; var $Narrative; var $ReceiptType; /*Type of receipt ie credit card/cash/cheque etc - array of types defined in config.php*/ var $total; /*Total of the batch of receipts in the currency of the company*/ Modified: trunk/install/save.php =================================================================== --- trunk/install/save.php 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/install/save.php 2011-11-04 04:56:22 UTC (rev 4739) @@ -298,7 +298,7 @@ $msg .= "\$CryptFunction = 'sha1';\n"; $msg .= "\$DefaultClock = 12;\n"; -$msg .= "\$rootpath = dirname(\htmlspecialchars($_SERVER['PHP_SELF']));\n"; +$msg .= "\$rootpath = dirname(htmlspecialchars(\$_SERVER['PHP_SELF']));\n"; $msg .= "if (isset(\$DirectoryLevelsDeep)){\n"; $msg .= " for (\$i=0;\$i<\$DirectoryLevelsDeep;\$i++){\n"; $msg .= "\$rootpath = mb_substr(\$rootpath,0, strrpos(\$rootpath,'/'));\n"; Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-04 04:56:22 UTC (rev 4739) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-09-11 19:23+1200\n" +"POT-Creation-Date: 2011-11-01 22:26+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -21,7 +21,7 @@ "X-Poedit-Language: Czech\n" "X-Poedit-SourceCharset: utf-8\n" -#: AccountGroups.php:7 index.php:1296 +#: AccountGroups.php:7 index.php:1298 msgid "Account Groups" msgstr "Účetní skupiny" @@ -41,8 +41,8 @@ "SQL příkaz použitý při získávání účetních skupin rodičovské účetní skupiny " "byl" -#: AccountGroups.php:57 AccountGroups.php:94 AccountGroups.php:178 -#: AccountGroups.php:188 +#: AccountGroups.php:57 AccountGroups.php:102 AccountGroups.php:174 +#: AccountGroups.php:184 msgid "The SQL that was used to retrieve the information was" msgstr "SQL, který byl použit k získání informace" @@ -58,16 +58,22 @@ msgid "The account group name cannot contain the character" msgstr "Název účetní skupiny nemůže obsahovat znak" -#: AccountGroups.php:71 TaxCategories.php:31 TaxProvinces.php:30 -#: UnitsOfMeasure.php:30 +#: AccountGroups.php:71 TaxCategories.php:31 msgid "or the character" msgstr "nebo znak" #: AccountGroups.php:77 +#, fuzzy +msgid "" +"The sequence that the account group is listed in the trial balance is " +"expected to be numeric" +msgstr "Množství uvedené pro převody Očekává se, že číselné" + +#: AccountGroups.php:85 msgid "The account group name must be at least one character long" msgstr "Název účetní skupiny musí být dlouhý minimálně jeden znak" -#: AccountGroups.php:84 +#: AccountGroups.php:92 msgid "" "The parent account group selected appears to result in a recursive account " "structure - select an alternative parent account group or make this group a " @@ -77,11 +83,11 @@ "účtu - vyberte alternativní mateřské účet skupiny nebo tuto skupinu na " "nejvyšší úrovni účtové skupiny" -#: AccountGroups.php:95 +#: AccountGroups.php:103 msgid "Could not check whether the group is recursive because" msgstr "Nepodařilo se zjistit, zda skupina je rekurzivní, protože" -#: AccountGroups.php:103 +#: AccountGroups.php:111 msgid "" "Since this account group is a child group, the sequence in the trial " "balance, the section in the accounts and whether or not the account group " @@ -90,47 +96,39 @@ "will have no effect." msgstr "" -#: AccountGroups.php:108 +#: AccountGroups.php:116 msgid "The section in accounts must be an integer" msgstr "Sekce v účtech musí být celé kladné číslo" -#: AccountGroups.php:114 -msgid "The sequence in the trial balance must be an integer" -msgstr "Pořadí v předvaze musí být celé číslo" - -#: AccountGroups.php:120 -msgid "The sequence in the TB must be numeric and less than" -msgstr "Pořadí v TB musí být číslo a méně než" - -#: AccountGroups.php:137 +#: AccountGroups.php:133 msgid "An error occurred in updating the account group" msgstr "Došlo k chybě při aktualizaci účtové skupiny" -#: AccountGroups.php:138 +#: AccountGroups.php:134 msgid "The SQL that was used to update the account group was" msgstr "SQL, který byl použit k aktualizaci účtu skupina byla" -#: AccountGroups.php:140 AccountSections.php:104 PaymentMethods.php:82 +#: AccountGroups.php:136 AccountSections.php:104 PaymentMethods.php:82 msgid "Record Updated" msgstr "Záznam aktualizován" -#: AccountGroups.php:158 +#: AccountGroups.php:154 msgid "An error occurred in inserting the account group" msgstr "Došlo k chybě při vkládání účtové skupiny" -#: AccountGroups.php:159 +#: AccountGroups.php:155 msgid "The SQL that was used to insert the account group was" msgstr "SQL, který byl použit pro vložení na účet skupina byla" -#: AccountGroups.php:160 AccountSections.php:116 PaymentMethods.php:103 +#: AccountGroups.php:156 AccountSections.php:116 PaymentMethods.php:103 msgid "Record inserted" msgstr "Záznam vložen" -#: AccountGroups.php:177 +#: AccountGroups.php:173 msgid "An error occurred in retrieving the group information from chartmaster" msgstr "Došlo k chybě při získávání informací od skupiny chartmaster" -#: AccountGroups.php:182 +#: AccountGroups.php:178 msgid "" "Cannot delete this account group because general ledger accounts have been " "created using this group" @@ -138,37 +136,37 @@ "Nelze smazat tento účet skupiny, protože účtů hlavní knihy byly vytvořeny " "pomocí této skupině" -#: AccountGroups.php:183 AccountGroups.php:193 AccountSections.php:137 -#: Areas.php:116 Areas.php:125 BankAccounts.php:158 CreditStatus.php:123 -#: Currencies.php:164 Currencies.php:172 Currencies.php:180 +#: AccountGroups.php:179 AccountGroups.php:189 AccountSections.php:137 +#: Areas.php:116 Areas.php:125 BankAccounts.php:158 CreditStatus.php:125 +#: Currencies.php:166 Currencies.php:174 Currencies.php:182 #: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306 -#: CustomerBranches.php:316 Customers.php:312 Customers.php:321 -#: Customers.php:329 Customers.php:337 CustomerTypes.php:147 -#: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:129 -#: GLAccounts.php:80 GLAccounts.php:96 Locations.php:237 Locations.php:245 -#: Locations.php:256 Locations.php:265 Locations.php:274 Locations.php:283 -#: Locations.php:292 Locations.php:301 MRPDemandTypes.php:87 -#: PaymentMethods.php:138 PaymentTerms.php:144 PaymentTerms.php:151 -#: PcExpenses.php:152 SalesCategories.php:124 SalesCategories.php:131 -#: SalesPeople.php:149 SalesPeople.php:156 SalesTypes.php:150 -#: SalesTypes.php:160 Shippers.php:82 Shippers.php:94 StockCategories.php:179 -#: Stocks.php:604 Stocks.php:613 Stocks.php:621 Stocks.php:629 Stocks.php:637 -#: Stocks.php:645 Suppliers.php:609 Suppliers.php:618 Suppliers.php:626 -#: SupplierTypes.php:145 TaxCategories.php:131 TaxGroups.php:127 -#: TaxGroups.php:134 TaxProvinces.php:125 UnitsOfMeasure.php:138 -#: WorkCentres.php:89 WorkCentres.php:95 WWW_Access.php:83 +#: CustomerBranches.php:316 CustomerTypes.php:147 CustomerTypes.php:157 +#: Customers.php:289 Customers.php:298 Customers.php:306 Customers.php:314 +#: Factors.php:134 FixedAssetCategories.php:129 GLAccounts.php:80 +#: GLAccounts.php:96 Locations.php:237 Locations.php:245 Locations.php:256 +#: Locations.php:265 Locations.php:274 Locations.php:283 Locations.php:292 +#: Locations.php:301 MRPDemandTypes.php:87 PaymentMethods.php:138 +#: PaymentTerms.php:146 PaymentTerms.php:153 PcExpenses.php:158 +#: SalesCategories.php:124 SalesCategories.php:131 SalesPeople.php:150 +#: SalesPeople.php:157 SalesPeople.php:163 SalesTypes.php:140 +#: SalesTypes.php:150 Shippers.php:82 Shippers.php:94 StockCategories.php:181 +#: Stocks.php:615 Stocks.php:624 Stocks.php:632 Stocks.php:640 Stocks.php:648 +#: Stocks.php:656 SupplierTypes.php:145 Suppliers.php:612 Suppliers.php:621 +#: Suppliers.php:629 TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 +#: TaxProvinces.php:129 UnitsOfMeasure.php:135 WWW_Access.php:83 +#: WorkCentres.php:89 WorkCentres.php:95 msgid "There are" msgstr "Jsou zde" -#: AccountGroups.php:183 +#: AccountGroups.php:179 msgid "general ledger accounts that refer to this account group" msgstr "účtů hlavní knihy, které se vztahují k tomuto účtu skupině" -#: AccountGroups.php:187 +#: AccountGroups.php:183 msgid "An error occurred in retrieving the parent group information" msgstr "Došlo k chybě při načítání mateřské skupiny informací" -#: AccountGroups.php:192 +#: AccountGroups.php:188 msgid "" "Cannot delete this account group because it is a parent account group of " "other account group(s)" @@ -176,239 +174,237 @@ "Nelze smazat tento účet skupiny, protože se jedná o mateřskou účet skupinou " "dalších účtové skupiny (y)" -#: AccountGroups.php:193 +#: AccountGroups.php:189 msgid "account groups that have this group as its/there parent account group" msgstr "" "účet skupiny, které mají tuto skupinu jako jeho / je skupina rodičů účet" -#: AccountGroups.php:196 +#: AccountGroups.php:192 msgid "An error occurred in deleting the account group" msgstr "Došlo k chybě při mazání účtu skupiny" -#: AccountGroups.php:197 +#: AccountGroups.php:193 msgid "The SQL that was used to delete the account group was" msgstr "SQL, který byl použit smazat účet skupina byla" -#: AccountGroups.php:199 +#: AccountGroups.php:195 msgid "group has been deleted" msgstr "skupina byla smazána" -#: AccountGroups.php:224 +#: AccountGroups.php:220 msgid "The sql that was used to retrieve the account group information was " msgstr "Sql, který byl použit k načtení účtové skupiny informace " -#: AccountGroups.php:225 +#: AccountGroups.php:221 msgid "Could not get account groups because" msgstr "Nemohu získat účetní skupiny, protože" -#: AccountGroups.php:227 AccountSections.php:175 AddCustomerContacts.php:25 -#: AddCustomerContacts.php:28 AddCustomerNotes.php:101 -#: AddCustomerTypeNotes.php:95 AgedDebtors.php:454 AgedSuppliers.php:268 -#: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:13 -#: BOMExtendedQty.php:259 BOMIndented.php:246 BOMIndentedReverse.php:236 -#: BOMInquiry.php:171 BOMListing.php:109 BOMs.php:208 BOMs.php:798 -#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2002 -#: CounterSales.php:2123 Credit_Invoice.php:255 CreditStatus.php:20 -#: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:10 -#: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10 -#: DiscountCategories.php:131 DiscountMatrix.php:16 EDIMessageFormat.php:104 -#: FixedAssetLocations.php:9 FixedAssetRegister.php:13 -#: FixedAssetRegister.php:237 FixedAssetTransfer.php:31 FormDesigner.php:129 -#: GLBalanceSheet.php:351 GLBudgets.php:28 GLJournal.php:228 -#: InventoryPlanning.php:373 InventoryPlanningPrefSupplier.php:467 -#: Labels.php:115 Labels.php:270 MRPReport.php:515 OutstandingGRNs.php:160 -#: PcAssignCashToTab.php:56 PcAssignCashToTab.php:130 -#: PcAssignCashToTab.php:146 PcAssignCashToTab.php:183 PDFPickingList.php:28 -#: PDFPrintLabel.php:139 PDFStockLocTransfer.php:21 -#: PO_AuthorisationLevels.php:10 POReport.php:60 POReport.php:64 -#: POReport.php:68 PO_SelectOSPurchOrder.php:133 PricesBasedOnMarkUp.php:11 -#: Prices_Customer.php:39 Prices.php:30 PurchData.php:138 PurchData.php:249 -#: PurchData.php:268 RecurringSalesOrders.php:310 SalesAnalReptCols.php:51 +#: AccountGroups.php:223 AccountSections.php:175 AddCustomerContacts.php:25 +#: AddCustomerContacts.php:28 AddCustomerNotes.php:103 +#: AddCustomerTypeNotes.php:97 AgedDebtors.php:451 AgedSuppliers.php:278 +#: Areas.php:144 AuditTrail.php:11 BOMExtendedQty.php:261 BOMIndented.php:246 +#: BOMIndentedReverse.php:235 BOMInquiry.php:187 BOMListing.php:109 +#: BOMs.php:213 BOMs.php:832 BankReconciliation.php:13 COGSGLPostings.php:18 +#: CompanyPreferences.php:153 CounterSales.php:2010 CounterSales.php:2135 +#: CreditStatus.php:21 Credit_Invoice.php:255 Currencies.php:28 +#: CustEDISetup.php:17 DailyBankTransactions.php:11 DebtorsAtPeriodEnd.php:125 +#: DiscountCategories.php:10 DiscountCategories.php:131 DiscountMatrix.php:16 +#: EDIMessageFormat.php:104 FixedAssetLocations.php:9 +#: FixedAssetRegister.php:13 FixedAssetRegister.php:237 +#: FixedAssetTransfer.php:31 FormDesigner.php:129 GLBalanceSheet.php:362 +#: GLBudgets.php:29 GLJournal.php:246 InventoryPlanning.php:374 +#: InventoryPlanningPrefSupplier.php:467 Labels.php:115 Labels.php:270 +#: MRPReport.php:515 OutstandingGRNs.php:160 PDFPickingList.php:28 +#: PDFPrintLabel.php:140 PDFStockLocTransfer.php:17 POReport.php:60 +#: POReport.php:64 POReport.php:68 PO_AuthorisationLevels.php:10 +#: PO_SelectOSPurchOrder.php:135 PcAssignCashToTab.php:56 +#: PcAssignCashToTab.php:130 PcAssignCashToTab.php:146 +#: PcAssignCashToTab.php:187 Prices.php:30 PricesBasedOnMarkUp.php:8 +#: Prices_Customer.php:34 PurchData.php:137 PurchData.php:258 +#: PurchData.php:282 RecurringSalesOrders.php:309 SalesAnalReptCols.php:51 #: SalesAnalRepts.php:11 SalesCategories.php:11 SalesGLPostings.php:17 #: SalesGraph.php:34 SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:45 #: SelectCompletedOrder.php:11 SelectContract.php:78 SelectCreditItems.php:215 -#: SelectCreditItems.php:283 SelectCustomer.php:247 SelectGLAccount.php:19 -#: SelectGLAccount.php:79 SelectOrderItems.php:618 SelectOrderItems.php:1512 -#: SelectOrderItems.php:1636 SelectProduct.php:496 SelectSalesOrder.php:454 -#: SelectSupplier.php:9 SelectSupplier.php:192 SelectWorkOrder.php:9 -#: SelectWorkOrder.php:145 ShipmentCosting.php:11 Shipments.php:17 +#: SelectCreditItems.php:286 SelectCustomer.php:260 SelectGLAccount.php:17 +#: SelectGLAccount.php:77 SelectOrderItems.php:575 SelectOrderItems.php:1468 +#: SelectOrderItems.php:1592 SelectProduct.php:496 SelectSalesOrder.php:533 +#: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:9 +#: SelectWorkOrder.php:151 ShipmentCosting.php:11 Shipments.php:17 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:8 -#: StockLocMovements.php:13 StockLocStatus.php:26 Suppliers.php:302 -#: SupplierTenders.php:260 SupplierTenders.php:317 SupplierTransInquiry.php:11 -#: TaxGroups.php:15 TaxProvinces.php:10 TopItems.php:65 -#: WhereUsedInquiry.php:18 WorkCentres.php:110 WorkCentres.php:157 -#: WorkOrderCosting.php:12 WorkOrderEntry.php:10 WorkOrderIssue.php:20 -#: WorkOrderReceive.php:13 WorkOrderStatus.php:41 WWW_Access.php:11 -#: WWW_Users.php:32 Z_BottomUpCosts.php:51 +#: StockLocMovements.php:13 StockLocStatus.php:27 SupplierTenders.php:260 +#: SupplierTenders.php:317 SupplierTransInquiry.php:10 Suppliers.php:302 +#: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 WWW_Access.php:11 +#: WWW_Users.php:31 WhereUsedInquiry.php:18 WorkCentres.php:111 +#: WorkCentres.php:162 WorkOrderCosting.php:13 WorkOrderEntry.php:11 +#: WorkOrderIssue.php:22 WorkOrderReceive.php:15 WorkOrderStatus.php:42 +#: Z_BottomUpCosts.php:51 msgid "Search" msgstr "Vyhledávání" -#: AccountGroups.php:231 +#: AccountGroups.php:227 msgid "Group... [truncated message content] |
From: <dai...@us...> - 2011-11-04 04:56:34
|
Revision: 4739 http://web-erp.svn.sourceforge.net/web-erp/?rev=4739&view=rev Author: daintree Date: 2011-11-04 04:56:22 +0000 (Fri, 04 Nov 2011) Log Message: ----------- number_formatting Modified Paths: -------------- trunk/CustomerReceipt.php trunk/DailySalesInquiry.php trunk/PDFReceipt.php trunk/WWW_Users.php trunk/doc/Change.log trunk/includes/DefineReceiptClass.php trunk/install/save.php trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/CustomerReceipt.php 2011-11-04 04:56:22 UTC (rev 4739) @@ -16,7 +16,6 @@ unset($_SESSION['ReceiptBatch']->Items); unset($_SESSION['ReceiptBatch']); unset($_SESSION['CustomerRecord']); - } if (isset($_POST['Cancel'])) { @@ -27,7 +26,11 @@ $_POST['GLEntry']=1; } -if ((isset($_POST['BatchInput']) and $_POST['BankAccount']=='') or (isset($_POST['Process']) and $_POST['BankAccount']=='')) { +if ((isset($_POST['BatchInput']) + AND $_POST['BankAccount']=='') + OR (isset($_POST['Process']) + AND $_POST['BankAccount']=='')) { + echo '<br />'; prnMsg(_('A bank account must be selected for this receipt'), 'warn'); $BankAccountEmpty=TRUE; @@ -37,13 +40,17 @@ $BankAccountEmpty=FALSE; } -if (!isset($_GET['Delete']) AND isset($_SESSION['ReceiptBatch'])){ //always process a header update unless deleting an item +if (!isset($_GET['Delete']) AND isset($_SESSION['ReceiptBatch'])){ + //always process a header update unless deleting an item - $_SESSION['ReceiptBatch']->Account = $_POST['BankAccount']; /*Get the bank account currency and set that too */ - $SQL = "SELECT bankaccountname, currcode FROM bankaccounts WHERE accountcode='" . $_POST['BankAccount']."'"; + $SQL = "SELECT bankaccountname, + currcode + FROM bankaccounts + WHERE accountcode='" . $_POST['BankAccount']."'"; + $ErrMsg =_('The bank account name cannot be retrieved because'); $result= DB_query($SQL,$db,$ErrMsg); @@ -69,7 +76,7 @@ prnMsg(_('The exchange rate entered should be numeric'),'warn'); } } - if (isset($_POST['FunctionalExRate']) and $_POST['FunctionalExRate']!=''){ + if (isset($_POST['FunctionalExRate']) AND $_POST['FunctionalExRate']!=''){ if (is_numeric(filter_number_format($_POST['FunctionalExRate']))){ $_SESSION['ReceiptBatch']->FunctionalExRate=filter_number_format($_POST['FunctionalExRate']); //ex rate between receipt currency and account currency } else { @@ -119,14 +126,14 @@ */ /*Get suggested FunctionalExRate */ - $result = DB_query("SELECT rate FROM currencies WHERE currabrev='" . $_SESSION['ReceiptBatch']->AccountCurrency . "'",$db); - $myrow = DB_fetch_row($result); - $SuggestedFunctionalExRate = $myrow[0]; - + $result = DB_query("SELECT rate, decimalplaces FROM currencies WHERE currabrev='" . $_SESSION['ReceiptBatch']->AccountCurrency . "'",$db); + $myrow = DB_fetch_array($result); + $SuggestedFunctionalExRate = $myrow['rate']; + $_SESSION['ReceiptBatch']->CurrDecimalPlaces = $myrow['decimalplaces']; /*Get the exchange rate between the functional currency and the receipt currency*/ $result = DB_query("SELECT rate FROM currencies WHERE currabrev='" . $_SESSION['ReceiptBatch']->Currency . "'",$db); - $myrow = DB_fetch_row($result); - $tableExRate = $myrow[0]; //this is the rate of exchange between the functional currency and the receipt currency + $myrow = DB_fetch_array($result); + $tableExRate = $myrow['rate']; //this is the rate of exchange between the functional currency and the receipt currency /*Calculate cross rate to suggest appropriate exchange rate between receipt currency and account currency */ $SuggestedExRate = $tableExRate/$SuggestedFunctionalExRate; } //end else account currency != functional currency @@ -156,17 +163,17 @@ $_POST['CustomerName']=''; } - if ($_POST['GLCode'] == '' and $_GET['Type']=='GL') { + if ($_POST['GLCode'] == '' AND $_GET['Type']=='GL') { prnMsg( _('No General Ledger code has been chosen') . ' - ' . _('so this GL analysis item could not be added'),'warn'); } else { - $_SESSION['ReceiptBatch']->add_to_batch($_POST['Amount'], - $_POST['CustomerID'], - $_POST['Discount'], - $_POST['Narrative'], - $_POST['GLCode'], - $_POST['PayeeBankDetail'], - $_POST['CustomerName'], - $_POST['tag']); + $_SESSION['ReceiptBatch']->add_to_batch(filter_number_format($_POST['Amount']), + $_POST['CustomerID'], + filter_number_format($_POST['Discount']), + $_POST['Narrative'], + $_POST['GLCode'], + $_POST['PayeeBankDetail'], + $_POST['CustomerName'], + $_POST['tag']); /*Make sure the same receipt is not double processed by a page refresh */ $Cancel = 1; @@ -228,13 +235,20 @@ $k=0; //Table row counter for row styles $CustomerReceiptCounter=1; //Count lines of customer receipts in this batch - echo '<br /><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Allocate') . '" alt="" />' . ' ' . _('Summary of Receipt Batch').'</p><br />'; + echo '<br /> + <p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Allocate') . '" alt="" />' . ' ' . _('Summary of Receipt Batch').' + </p> + <br />'; - echo '<table class=selection><tr><th>'._('Batch Number').'</th> + echo '<table class="selection"> + <tr> + <th>'._('Batch Number').'</th> <th>' . _('Date Banked') . '</th> <th>' . _('Customer Name') . '</th> <th>' . _('GL Code') . '</th> - <th>' . _('Amount of Receipt').'</th></tr>'; + <th>' . _('Amount of Receipt').'</th> + </tr>'; foreach ($_SESSION['ReceiptBatch']->Items as $ReceiptItem) { @@ -254,7 +268,7 @@ <td>'.$_SESSION['ReceiptBatch']->DateBanked.'</td> <td>'.$ReceiptItem->CustomerName.'</td> <td>'.$ReceiptItem->GLCode.' - '.$myrow['accountname'].'</td> - <td class=number>'.locale_number_format($ReceiptItem->Amount/$_SESSION['ReceiptBatch']->ExRate/$_SESSION['ReceiptBatch']->FunctionalExRate,2) .'</td>'; + <td class="number">'.locale_number_format($ReceiptItem->Amount/$_SESSION['ReceiptBatch']->ExRate/$_SESSION['ReceiptBatch']->FunctionalExRate,$_SESSION['ReceiptBatch']->CurrDecimalPlaces) .'</td>'; if ($ReceiptItem->GLCode ==''){ echo '<td><a target="_blank" href="' . $rootpath . '/PDFReceipt.php?BatchNumber=' . $_SESSION['ReceiptBatch']->BatchNo. '&ReceiptNumber='.$CustomerReceiptCounter.'">'._('Print a Customer Receipt').'</a></td></tr>'; @@ -527,7 +541,8 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . '<a href="' . $rootpath . '/PDFBankingSummary.php?BatchNo=' . $_SESSION['ReceiptBatch']->BatchNo . '">' . _('Print PDF Batch Summary') . '</a></p>'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/allocation.png" title="' . _('Allocate') . '" alt="">' . ' ' . '<a href="' . $rootpath . '/CustomerAllocations.php">' . _('Allocate Receipts') . '</a></p>'; - echo '<p class="page_title_text">• ' . $rootpath . '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer ' . _('Enter Receipts') . ' </p>'; + echo '<p class="page_title_text"><a href="' . $rootpath . '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer">' . _('Enter Receipts') . '</a> + </p>'; unset($_SESSION['ReceiptBatch']); include('includes/footer.inc'); @@ -541,7 +556,10 @@ if ($_POST['Keywords'] AND $_POST['CustCode']) { $msg=_('Customer name keywords have been used in preference to the customer code extract entered'); } - if ($_POST['Keywords']=="" AND $_POST['CustCode']=="" AND $_POST['CustInvNo']=="") { + if ($_POST['Keywords']=='' + AND $_POST['CustCode']=='' + AND $_POST['CustInvNo']=='') { + $msg=_('At least one Customer Name keyword OR an extract of a Customer Code must be entered for the search'); } else { if (mb_strlen($_POST['Keywords'])>0) { @@ -549,24 +567,24 @@ $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT debtorsmaster.debtorno, - debtorsmaster.name - FROM debtorsmaster - WHERE debtorsmaster.name " . LIKE . " '". $SearchString . "' - AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; + debtorsmaster.name + FROM debtorsmaster + WHERE debtorsmaster.name " . LIKE . " '". $SearchString . "' + AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; } elseif (mb_strlen($_POST['CustCode'])>0){ $SQL = "SELECT debtorsmaster.debtorno, - debtorsmaster.name - FROM debtorsmaster - WHERE debtorsmaster.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' - AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; + debtorsmaster.name + FROM debtorsmaster + WHERE debtorsmaster.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' + AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; } elseif (mb_strlen($_POST['CustInvNo'])>0){ $SQL = "SELECT debtortrans.debtorno, - debtorsmaster.name - FROM debtorsmaster LEFT JOIN debtortrans - ON debtorsmaster.debtorno=debtortrans.debtorno - WHERE debtortrans.transno " . LIKE . " '%" . $_POST['CustInvNo'] . "%' - AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; + debtorsmaster.name + FROM debtorsmaster LEFT JOIN debtortrans + ON debtorsmaster.debtorno=debtortrans.debtorno + WHERE debtortrans.transno " . LIKE . " '%" . $_POST['CustInvNo'] . "%' + AND debtorsmaster.currcode= '" . $_SESSION['ReceiptBatch']->Currency . "'"; } $CustomerSearchResult = DB_query($SQL,$db,'','',false,false); @@ -609,6 +627,7 @@ debtorsmaster.currcode, currencies.currency, currencies.rate, + currencies.decimalplaces AS currdecimalplaces, paymentterms.terms, debtorsmaster.creditlimit, holdreasons.dissallowinvoices, @@ -629,21 +648,21 @@ ELSE CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1','MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))','DAY') . ")) >= " . $_SESSION['PastDueDays2'] . ") THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END) AS overdue2 - FROM debtorsmaster, - paymentterms, - holdreasons, - currencies, - debtortrans - WHERE debtorsmaster.paymentterms = paymentterms.termsindicator - AND debtorsmaster.currcode = currencies.currabrev - AND debtorsmaster.holdreason = holdreasons.reasoncode - AND debtorsmaster.debtorno = '" . $_POST['CustomerID'] . "' - AND debtorsmaster.debtorno = debtortrans.debtorno + FROM debtorsmaster INNER JOIN paymentterms + ON debtorsmaster.paymentterms = paymentterms.termsindicator + INNER JOIN holdreasons + ON debtorsmaster.holdreason = holdreasons.reasoncode + INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + INNER JOIN debtortrans + ON debtorsmaster.debtorno = debtortrans.debtorno + WHERE debtorsmaster.debtorno = '" . $_POST['CustomerID'] . "' GROUP BY debtorsmaster.name, debtorsmaster.pymtdiscount, debtorsmaster.currcode, currencies.currency, currencies.rate, + currencies.decimalplaces, paymentterms.terms, debtorsmaster.creditlimit, paymentterms.daysbeforedue, @@ -667,19 +686,19 @@ debtorsmaster.pymtdiscount, currencies.currency, currencies.rate, + currencies.decimalplaces AS currdecimalplaces, paymentterms.terms, debtorsmaster.creditlimit, debtorsmaster.currcode, holdreasons.dissallowinvoices, holdreasons.reasondescription - FROM debtorsmaster, - paymentterms, - holdreasons, - currencies - WHERE debtorsmaster.paymentterms = paymentterms.termsindicator - AND debtorsmaster.currcode = currencies.currabrev - AND debtorsmaster.holdreason = holdreasons.reasoncode - AND debtorsmaster.debtorno = '" . $_POST['CustomerID'] . "'"; + FROM debtorsmaster INNER JOIN paymentterms + ON debtorsmaster.paymentterms = paymentterms.termsindicator + INNER JOIN holdreasons + ON debtorsmaster.holdreason = holdreasons.reasoncode + INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + WHERE debtorsmaster.debtorno = '" . $_POST['CustomerID'] . "'"; $ErrMsg = _('The customer details could not be retrieved because'); $DbgMsg = _('The SQL that failed was'); @@ -708,11 +727,10 @@ /*show the batch header details and the entries in the batch so far */ $SQL = "SELECT bankaccountname, - bankaccounts.accountcode, - bankaccounts.currcode - FROM bankaccounts, - chartmaster - WHERE bankaccounts.accountcode=chartmaster.accountcode"; + bankaccounts.accountcode, + bankaccounts.currcode + FROM bankaccounts INNER JOIN chartmaster + ON bankaccounts.accountcode=chartmaster.accountcode"; $ErrMsg = _('The bank accounts could not be retrieved because'); @@ -725,11 +743,17 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Enter Receipt') . '" alt="">' . ' ' . _('Enter Customer Receipt') . '</p>'; echo '<div class="page_help_text">' . _('To enter a payment TO a customer (ie. to pay out a credit note), enter a negative payment amount.') . '</div>'; } -echo '<br /><table class=selection><tr><td>' . _('Bank Account') . ':</td> - <td><select tabindex=1 name="BankAccount" onChange="ReloadForm(form1.BatchInput)">'; +echo '<br /> + <table class="selection"> + <tr> + <td>' . _('Bank Account') . ':</td> + <td><select tabindex="1" name="BankAccount" onChange="ReloadForm(form1.BatchInput)">'; if (DB_num_rows($AccountsResults)==0){ - echo '</select></td></tr></table><p>'; + echo '</select></td> + </tr> + </table> + <p />'; prnMsg(_('Bank Accounts have not yet been defined') . '. ' . _('You must first') . ' ' . '<a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a>' . _('and general ledger accounts to be affected'),'info'); include('includes/footer.inc'); exit; @@ -743,23 +767,27 @@ echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname']. ' - ' . $myrow['currcode'] . '</option>'; } } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } if (!Is_Date($_SESSION['ReceiptBatch']->DateBanked)){ $_SESSION['ReceiptBatch']->DateBanked = Date($_SESSION['DefaultDateFormat']); } -echo '<tr><td>' . _('Date Banked') . ':</td> - <td><input tabindex=2 type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="DateBanked" maxlength=10 size=10 onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_SESSION['ReceiptBatch']->DateBanked . '"></td></tr>'; -echo '<tr><td>' . _('Currency') . ':</td> - <td><select tabindex=3 name="Currency" onChange="ReloadForm(form1.BatchInput)">'; +echo '<tr> + <td>' . _('Date Banked') . ':</td> + <td><input tabindex="2" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="DateBanked" maxlength="10" size="10" onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_SESSION['ReceiptBatch']->DateBanked . '"></td> + </tr> + <tr> + <td>' . _('Currency') . ':</td> + <td><select tabindex="3" name="Currency" onChange="ReloadForm(form1.BatchInput)">'; if (!isset($_SESSION['ReceiptBatch']->Currency)){ $_SESSION['ReceiptBatch']->Currency=$_SESSION['CompanyRecord']['currencydefault']; } -$SQL = 'SELECT currency, currabrev, rate FROM currencies'; +$SQL = "SELECT currency, currabrev, rate FROM currencies"; $result=DB_query($SQL,$db); if (DB_num_rows($result)==0){ echo '</select></td></tr>'; @@ -773,7 +801,8 @@ echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } @@ -793,26 +822,33 @@ if ($_SESSION['ReceiptBatch']->ExRate==1 AND isset($SuggestedExRate)){ $_SESSION['ReceiptBatch']->ExRate = $SuggestedExRate; } - echo '<tr><td>' . _('Receipt Exchange Rate') . ':</td> - <td><input tabindex=4 type="text" name="ExRate" maxlength=10 size=12 class=number value="' . $_SESSION['ReceiptBatch']->ExRate . '"></td> - <td>' . $SuggestedExRateText . ' <i>' . _('The exchange rate between the currency of the bank account currency and the currency of the receipt') . '. 1 ' . $_SESSION['ReceiptBatch']->AccountCurrency . ' = ? ' . $_SESSION['ReceiptBatch']->Currency . '</i></td></tr>'; + echo '<tr> + <td>' . _('Receipt Exchange Rate') . ':</td> + <td><input tabindex="4" type="text" name="ExRate" maxlength="10" size="12" class="number" value="' . locale_number_format($_SESSION['ReceiptBatch']->ExRate,6) . '" /></td> + <td>' . locale_number_format($SuggestedExRateText,6) . ' <i>' . _('The exchange rate between the currency of the bank account currency and the currency of the receipt') . '. 1 ' . $_SESSION['ReceiptBatch']->AccountCurrency . ' = ? ' . $_SESSION['ReceiptBatch']->Currency . '</i></td> + </tr>'; } if ($_SESSION['ReceiptBatch']->AccountCurrency!=$_SESSION['CompanyRecord']['currencydefault'] - AND isset($_SESSION['ReceiptBatch']->AccountCurrency)){ + AND isset($_SESSION['ReceiptBatch']->AccountCurrency)){ if (isset($SuggestedFunctionalExRate)){ - $SuggestedFunctionalExRateText = '<b>' . _('Suggested rate:') . ' ' . locale_number_format($SuggestedFunctionalExRate,4) . '</b>'; + $SuggestedFunctionalExRateText = '<b>' . _('Suggested rate:') . ' ' . locale_number_format($SuggestedFunctionalExRate,6) . '</b>'; } else { $SuggestedFunctionalExRateText =''; } if ($_SESSION['ReceiptBatch']->FunctionalExRate==1 AND isset($SuggestedFunctionalExRate)){ $_SESSION['ReceiptBatch']->FunctionalExRate = $SuggestedFunctionalExRate; } - echo '<tr><td>' . _('Functional Exchange Rate') . ':</td><td><input tabindex=5 type="text" name="FunctionalExRate" class=number maxlength=10 size=12 value="' . $_SESSION['ReceiptBatch']->FunctionalExRate . '"></td> - <td>' . ' ' . $SuggestedFunctionalExRateText . ' <i>' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '. 1 ' . $_SESSION['CompanyRecord']['currencydefault'] . ' = ? ' . $_SESSION['ReceiptBatch']->AccountCurrency . '</i></td></tr>'; + echo '<tr> + <td>' . _('Functional Exchange Rate') . ':</td> + <td><input tabindex="5" type="text" name="FunctionalExRate" class="number" maxlength="10" size="12" value="' . locale_number_format($_SESSION['ReceiptBatch']->FunctionalExRate,6) . '" /></td> + <td>' . ' ' . $SuggestedFunctionalExRateText . ' <i>' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '. 1 ' . $_SESSION['CompanyRecord']['currencydefault'] . ' = ? ' . $_SESSION['ReceiptBatch']->AccountCurrency . '</i></td> + </tr>'; } -echo '<tr><td>' . _('Receipt Type') . ':</td><td><select tabindex=6 name="ReceiptType">'; +echo '<tr> + <td>' . _('Receipt Type') . ':</td> + <td><select tabindex="6" name="ReceiptType">'; include('includes/GetPaymentMethods.php'); /* The array ReceiptTypes is defined from the setup tab of the main menu under payment methods - the array is populated from the include file GetPaymentMethods.php */ @@ -824,13 +860,24 @@ echo '<option value="' .$RcptType . '">' . $RcptType .'</option>'; } } -echo '</select></td></tr>'; +echo '</select></td> + </tr>'; if (!isset($_SESSION['ReceiptBatch']->Narrative)) { $_SESSION['ReceiptBatch']->Narrative=''; } -echo '<tr><td>' . _('Narrative') . ':</td><td><input tabindex=7 type="text" name="BatchNarrative" maxlength=50 size=52 value="' . $_SESSION['ReceiptBatch']->Narrative . '"></td></tr>'; -echo '<tr><td colspan=3><div class="centre"><input tabindex=8 type=submit name="BatchInput" Value="' . _('Accept') . '"></div></td></tr>'; -echo '</table><br />'; +echo '<tr> + <td>' . _('Narrative') . ':</td> + <td><input tabindex="7" type="text" name="BatchNarrative" maxlength="50" size="52" value="' . $_SESSION['ReceiptBatch']->Narrative . '" /></td> + </tr> + <tr> + <td colspan="3"> + <div class="centre"> + <input tabindex="8" type="submit" name="BatchInput" value="' . _('Accept') . '" /> + </div> + </td> + </tr> + </table> + <br />'; if (isset($_SESSION['ReceiptBatch'])){ /* Now show the entries made so far */ @@ -840,13 +887,14 @@ $_SESSION['ReceiptBatch']->BankAccountName . ' ' . _('on') . ' ' . $_SESSION['ReceiptBatch']->DateBanked . '</p>'; } - echo '<table width="90%" class=selection><tr> + echo '<table width="90%" class="selection"> + <tr> <th>' . _('Amount') . ' ' . _('Received') . '</th> <th>' . _('Discount') . '</th> <th>' . _('Customer') . '</th> <th>' . _('GL Code') . '</th> <th>' . _('Narrative') . '</th> - </tr>'; + </tr>'; $BatchTotal = 0; @@ -857,8 +905,8 @@ $myrow=DB_fetch_array($Result); echo '<tr> - <td class=number>' . locale_number_format($ReceiptItem->Amount,2) . '</td> - <td class=number>' . locale_number_format($ReceiptItem->Discount,2) . '</td> + <td class="number">' . locale_number_format($ReceiptItem->Amount,$_SESSION['ReceiptBatch']->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($ReceiptItem->Discount,$_SESSION['ReceiptBatch']->CurrDecimalPlaces) . '</td> <td>' . stripslashes($ReceiptItem->CustomerName) . '</td> <td>'.$ReceiptItem->GLCode.' - '.$myrow['accountname'].'</td> <td>'.$ReceiptItem->Narrative . '</td> @@ -867,7 +915,10 @@ $BatchTotal= $BatchTotal + $ReceiptItem->Amount; } - echo '<tr><td class=number><b>' . locale_number_format($BatchTotal,2) . '</b></td></tr></table>'; + echo '<tr> + <td class="number"><b>' . locale_number_format($BatchTotal,$_SESSION['ReceiptBatch']->CurrDecimalPlaces) . '</b></td> + </tr> + </table>'; } /*this next block of ifs deals with what information to display for input into the form @@ -897,43 +948,51 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . $_SESSION['CustomerRecord']['name'] . ' - (' . _('All amounts stated in') . ' ' . $_SESSION['CustomerRecord']['currency'] . ')' . _('Terms') . ': ' . $_SESSION['CustomerRecord']['terms'] . '<br/>' . _('Credit Limit') . ': ' . locale_number_format($_SESSION['CustomerRecord']['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $_SESSION['CustomerRecord']['reasondescription']; if ($_SESSION['CustomerRecord']['dissallowinvoices']!=0){ - echo '<br /><font color=red size=4><b>' . _('ACCOUNT ON HOLD') . '</font></b><br/>'; + echo '<br /> + <font color="red" size="4"><b>' . _('ACCOUNT ON HOLD') . '</font></b> + <br/>'; } - echo '<table width="90%" class=selection> + echo '<table width="90%" class="selection"> <tr> - <th width=20%>' . _('Total Balance') . '</th> - <th width=20%>' . _('Current') . '</th> - <th width=20%>' . _('Now Due') . '</th> - <th width=20%>' . $_SESSION['PastDueDays1'] . '-' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th> - <th width=20%>' . _('Over') . ' ' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th> + <th width="20%">' . _('Total Balance') . '</th> + <th width="20%">' . _('Current') . '</th> + <th width="20%">' . _('Now Due') . '</th> + <th width="20%">' . $_SESSION['PastDueDays1'] . '-' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th> + <th width="20%">' . _('Over') . ' ' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th> </tr>'; echo '<tr> - <td class=number>' . locale_number_format($_SESSION['CustomerRecord']['balance'],2) . '</td> - <td class=number>' . locale_number_format(($_SESSION['CustomerRecord']['balance'] - $_SESSION['CustomerRecord']['due']),2) . '</td> - <td class=number>' . locale_number_format(($_SESSION['CustomerRecord']['due']-$_SESSION['CustomerRecord']['overdue1']),2) . '</td> - <td class=number>' . locale_number_format(($_SESSION['CustomerRecord']['overdue1']-$_SESSION['CustomerRecord']['overdue2']) ,2) . '</td> - <td class=number>' . locale_number_format($_SESSION['CustomerRecord']['overdue2'],2) . '</td> + <td class="number">' . locale_number_format($_SESSION['CustomerRecord']['balance'],$_SESSION['CustomerRecord']['currdecimalplaces']) . '</td> + <td class="number">' . locale_number_format(($_SESSION['CustomerRecord']['balance'] - $_SESSION['CustomerRecord']['due']),$_SESSION['CustomerRecord']['currdecimalplaces']) . '</td> + <td class="number">' . locale_number_format(($_SESSION['CustomerRecord']['due']-$_SESSION['CustomerRecord']['overdue1']),$_SESSION['CustomerRecord']['currdecimalplaces']) . '</td> + <td class="number">' . locale_number_format(($_SESSION['CustomerRecord']['overdue1']-$_SESSION['CustomerRecord']['overdue2']) ,$_SESSION['CustomerRecord']['currdecimalplaces']) . '</td> + <td class="number">' . locale_number_format($_SESSION['CustomerRecord']['overdue2'],$_SESSION['CustomerRecord']['currdecimalplaces']) . '</td> </tr> - </table><br />'; + </table> + <br />'; echo '<table class="selection">'; $DisplayDiscountPercent = locale_number_format($_SESSION['CustomerRecord']['pymtdiscount']*100,2) . '%'; - echo '<input type="hidden" name="CustomerID" value="' . $_POST['CustomerID'] . '">'; - echo '<input type="hidden" name="CustomerName" value="' . $_SESSION['CustomerRecord']['name'] . '">'; + echo '<input type="hidden" name="CustomerID" value="' . $_POST['CustomerID'] . '" />'; + echo '<input type="hidden" name="CustomerName" value="' . $_SESSION['CustomerRecord']['name'] . '" />'; } if (isset($_POST['GLEntry']) AND isset($_SESSION['ReceiptBatch'])){ /* Set up a heading for the transaction entry for a GL Receipt */ - echo '<br /><table class=selection>'; - echo '<th colspan=2><font size=2 color=navy>' . _('General Ledger Receipt Entry') . '</font></th>'; + echo '<br /> + <table class="selection"> + <tr> + <th colspan="2"><font size="2" color="navy">' . _('General Ledger Receipt Entry') . '</font></th> + </tr>'; //Select the tag - echo '<tr><td>' . _('Select Tag') . ':</td><td><select name="tag">'; + echo '<tr> + <td>' . _('Select Tag') . ':</td> + <td><select name="tag">'; $SQL = "SELECT tagref, tagdescription @@ -949,15 +1008,20 @@ echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; // End select tag /*now set up a GLCode field to select from avaialble GL accounts */ - echo '<tr><td>' . _('GL Account') . ':</td><td><select tabindex=8 name="GLCode">'; - $SQL = 'SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode'; + echo '<tr> + <td>' . _('GL Account') . ':</td> + <td><select tabindex="8" name="GLCode">'; + + $SQL = "SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode"; $result=DB_query($SQL,$db); if (DB_num_rows($result)==0){ - echo '</select>' . _('No General ledger accounts have been set up yet') . ' - ' . _('receipts cannot be entered against GL accounts until the GL accounts are set up') . '</td></tr>'; + echo '</select>' . _('No General ledger accounts have been set up yet') . ' - ' . _('receipts cannot be entered against GL accounts until the GL accounts are set up') . '</td> + </tr>'; } else { echo '<option value=""></option>'; while ($myrow=DB_fetch_array($result)){ @@ -967,9 +1031,9 @@ echo '<option value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } - } /*if either a customer is selected or its a GL Entry then set out @@ -977,9 +1041,9 @@ if (((isset($_SESSION['CustomerRecord']) AND isset($_POST['CustomerID']) - AND $_POST['CustomerID']!="") + AND $_POST['CustomerID']!='') OR isset($_POST['GLEntry'])) - AND isset($_SESSION['ReceiptBatch'])){ + AND isset($_SESSION['ReceiptBatch'])){ if (!isset($_POST['Amount'])) { $_POST['Amount']=0; @@ -993,52 +1057,71 @@ if (!isset($_POST['Narrative'])) { $_POST['Narrative']=''; } - echo '<tr><td>' . _('Amount of Receipt') . ':</td> - <td><input tabindex=9 type="text" name="Amount" maxlength=12 size=13 class=number value="' . $_POST['Amount'] . '"></td> - </tr>'; + echo '<tr> + <td>' . _('Amount of Receipt') . ':</td> + <td><input tabindex="9" type="text" name="Amount" maxlength="12" size="13" class="number" value="' . $_POST['Amount'] . '" /></td> + </tr>'; if (!isset($_POST['GLEntry'])){ - echo '<tr><td>' . _('Amount of Discount') . ':</td> - <td><input tabindex=10 type="text" name="Discount" maxlength=12 size=13 class=number value="' . $_POST['Discount'] . '"> ' . _('agreed prompt payment discount is') . ' ' . $DisplayDiscountPercent . '</td></tr>'; + echo '<tr> + <td>' . _('Amount of Discount') . ':</td> + <td><input tabindex="10" type="text" name="Discount" maxlength="12" size="13" class="number" value="' . $_POST['Discount'] . '" /> ' . _('agreed prompt payment discount is') . ' ' . $DisplayDiscountPercent . '</td></tr>'; } else { - echo '<input tabindex=11 type="hidden" name="Discount" Value=0>'; + echo '<input tabindex=11 type="hidden" name="Discount" value="0" />'; } - echo '<tr><td>' . _('Payee Bank Details') . ':</td> - <td><input tabindex=12 type="text" name="PayeeBankDetail" maxlength=22 size=20 value="' . $_POST['PayeeBankDetail'] . '"></td></tr>'; + echo '<tr> + <td>' . _('Payee Bank Details') . ':</td> + <td><input tabindex="12" type="text" name="PayeeBankDetail" maxlength="22" size="20" value="' . $_POST['PayeeBankDetail'] . '" /></td> + </tr>'; // echo '<tr><td>' . _('Narrative') . ':</td> // <td><input tabindex=13 type="text" name="Narrative" maxlength=30 size=32 value="' . $_POST['Narrative'] . '"></td></tr>'; - echo '<td>' . _('Narrative') . ':</td>'; - echo '<td><textarea name="Narrative" cols=40 rows=1></textarea></td>'; - echo '</table>'; - echo '<br /><div class="centre"><input tabindex=14 type="submit" name="Process" value="' . _('Accept') . '">'; - echo '<input tabindex=14 type="submit" name="Cancel" value="' . _('Cancel') . '"></div>'; + echo '<td>' . _('Narrative') . ':</td> + <td><textarea name="Narrative" cols="40" rows="1"></textarea></td> + </tr> + </table> + <br /> + <div class="centre"> + <input tabindex="14" type="submit" name="Process" value="' . _('Accept') . '" /> + <input tabindex="15" type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div>'; -} elseif (isset($_SESSION['ReceiptBatch']) AND !isset($_POST['GLEntry'])){ +} elseif (isset($_SESSION['ReceiptBatch']) + AND !isset($_POST['GLEntry'])){ /*Show the form to select a customer */ echo '<br />'; - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Select a Customer') . '</b>'; - echo '<table cellpadding=3 colspan=4 class=selection>'; - echo '<tr><td>' . _('Text in the Customer') . ' ' . '<b>' . _('name') . '</b>:</td>'; - echo '<td><input tabindex=9 type="text" name="Keywords" size=15 maxlength=25></td>'; - echo '<td><font size=3><b>' . _('OR') . '</b></font></td>'; - echo '<td>' . _('Text extract in the Customer') . ' ' . '<b>' . _('code') . '</b>:</td>'; - echo '<td><input tabindex=10 type="text" name="CustCode" size=10 maxlength=18></td>'; - echo '<td><font size=3><b>' . _('OR') . '</b></font></td>'; - echo '<td>' . _('Customer invoice number') . ':</td>'; - echo '<td><input tabindex=11 type="text" name="CustInvNo" size=8 maxlength=8></td>'; - echo '</tr></table>'; - echo '<div class="centre"><br />'; - echo '<input tabindex=11 type=submit name="Search" value="' . _('Search Now') . '">'; - echo '<br/><br/><input tabindex=12 type=submit name="GLEntry" value="' . _('Enter A GL Receipt') . '"><br /></div>'; + echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Select a Customer') . '</b> + <table class="selection"> + <tr> + <td>' . _('Text in the Customer') . ' ' . '<b>' . _('name') . '</b>:</td> + <td><input tabindex="9" type="text" name="Keywords" size="15" maxlength="25" /></td> + <td><font size="3"><b>' . _('OR') . '</b></font></td> + <td>' . _('Text extract in the Customer') . ' ' . '<b>' . _('code') . '</b>:</td> + <td><input tabindex="10" type="text" name="CustCode" size="10" maxlength="18" /></td> + <td><font size="3"><b>' . _('OR') . '</b></font></td> + <td>' . _('Customer invoice number') . ':</td> + <td><input tabindex="11" type="text" name="CustInvNo" size="8" maxlength="8" /></td> + </tr> + </table> + <div class="centre"> + <br /> + <input tabindex="11" type="submit" name="Search" value="' . _('Search Now') . '" /> + <br/> + <br/> + <input tabindex="12" type="submit" name="GLEntry" value="' . _('Enter A GL Receipt') . '" /> + <br /> + </div>'; if (isset($CustomerSearchResult)) { - echo '<table cellpadding=2 colspan=7 class=selection>'; - $TableHeader = '<tr><th>' . _('Code') . '</th> - <th>' . _('Customer Name') . '</th></tr>'; + echo '<table class="selection">'; + $TableHeader = '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Customer Name') . '</th> + </tr>'; echo $TableHeader; $j = 1; $k = 0; //row counter to determine background colour @@ -1052,9 +1135,9 @@ echo '<tr class="EvenTableRows">'; $k=1; } - printf('<td><font size=1> - <input tabindex='.locale_number_format(12+$j).' type=submit name="Select" value="%s"></font></td> - <td>%s</td></tr>', + printf('<td><font size=1><input tabindex="'. strval(12+$j).'" type="submit" name="Select" value="%s" /></font></td> + <td>%s</td> + </tr>', $myrow['debtorno'], $myrow['name']); @@ -1074,8 +1157,11 @@ } if (isset($_SESSION['ReceiptBatch']->Items) and count($_SESSION['ReceiptBatch']->Items) > 0){ - echo '<div class="centre"><br/><input tabindex="13" type="submit" name="CommitBatch" value="' . _('Accept and Process Batch') . '"></div>'; + echo '<div class="centre"> + <br/> + <input tabindex="13" type="submit" name="CommitBatch" value="' . _('Accept and Process Batch') . '" /> + </div>'; } echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/DailySalesInquiry.php 2011-11-04 04:56:22 UTC (rev 4739) @@ -5,7 +5,6 @@ include('includes/session.inc'); $title = _('Daily Sales Inquiry'); include('includes/header.inc'); -include('includes/DefineCartClass.php'); echo '<p class="page_title_text"> <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Daily Sales') . '" alt="" />' . ' ' . _('Daily Sales') . ' @@ -21,16 +20,18 @@ <td>' . _('Month to Show') . ':</td> <td><select tabindex="1" name="MonthToShow">'; - if (!isset($_POST['MonthToShow'])){ $_POST['MonthToShow'] = GetPeriod(Date($_SESSION['DefaultDateFormat']),$db); + $Result = DB_query("SELECT lastdate_in_period FROM periods WHERE period='" . $_POST['MonthToShow'] . "'",$db); + $myrow = DB_fetch_array($Result); + $EndDateSQL = $myrow['lastdate_in_period']; } $PeriodsResult = DB_query("SELECT periodno, lastdate_in_period FROM periods",$db); while ($PeriodRow = DB_fetch_array($PeriodsResult)){ if ($_POST['MonthToShow']==$PeriodRow['periodno']) { - echo '<option selected Value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; + echo '<option selected value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; $EndDateSQL = $PeriodRow['lastdate_in_period']; } else { echo '<option value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; Modified: trunk/PDFReceipt.php =================================================================== --- trunk/PDFReceipt.php 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/PDFReceipt.php 2011-11-04 04:56:22 UTC (rev 4739) @@ -46,23 +46,23 @@ $PageNumber++; -$sql="SELECT MIN(id) as start FROM debtortrans WHERE type=12 AND transno='". filer_locale_number_format($_GET['BatchNumber']). "'"; +$sql="SELECT MIN(id) as start FROM debtortrans WHERE type=12 AND transno='". $_GET['BatchNumber']. "'"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $StartReceiptNumber=$myrow['start']; -$sql="SELECT debtorno, - ovamount, - invtext - FROM debtortrans - WHERE type=12 - AND transno='".$_GET['BatchNumber']."' - AND id='". $StartReceiptNumber-1+$_GET['ReceiptNumber'] ."'"; -$result=DB_query($sql, $db); -$myrow=DB_fetch_array($result); -$DebtorNo=$myrow['debtorno']; -$Amount=$myrow['ovamount']; -$Narrative=$myrow['invtext']; +$sql="SELECT debtorno, + ovamount, + invtext + FROM debtortrans + WHERE type=12 + AND transno='" . $_GET['BatchNumber'] . "' + AND id='". ($StartReceiptNumber-1+$_GET['ReceiptNumber']) ."'"; +$result = DB_query($sql, $db); +$myrow = DB_fetch_array($result); +$DebtorNo = $myrow['debtorno']; +$Amount = $myrow['ovamount']; +$Narrative = $myrow['invtext']; $sql="SELECT currency, decimalplaces @@ -76,13 +76,13 @@ $Currency=$myrow['currency']; $DecimalPlaces=$myrow['decimalplaces']; -$sql="SELECT name, - address1, - address2, - address3, - address4, - address5, - address6 +$sql="SELECT name, + address1, + address2, + address3, + address4, + address5, + address6 FROM debtorsmaster WHERE debtorno='".$DebtorNo."'"; Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/WWW_Users.php 2011-11-04 04:56:22 UTC (rev 4739) @@ -33,8 +33,10 @@ // Make an array of the security roles $sql = "SELECT secroleid, - secrolename - FROM securityroles ORDER BY secroleid"; + secrolename + FROM securityroles + ORDER BY secroleid"; + $Sec_Result = DB_query($sql, $db); $SecurityRoles = array(); // Now load it into an a ray using Key/Value pairs @@ -72,7 +74,8 @@ } elseif (mb_strstr($_POST['Password'],$_POST['UserID'])!= False){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); - } elseif ((mb_strlen($_POST['Cust'])>0) AND (mb_strlen($_POST['BranchCode'])==0)) { + } elseif ((mb_strlen($_POST['Cust'])>0) + AND (mb_strlen($_POST['BranchCode'])==0)) { $InputError = 1; prnMsg(_('If you enter a Customer Code you must also enter a Branch Code valid for this Customer'),'error'); } @@ -173,15 +176,15 @@ theme, language, pdflanguage) - VALUES ('" . DB_escape_string($_POST['UserID']) . "', - '" . DB_escape_string($_POST['RealName']) ."', - '" . DB_escape_string($_POST['Cust']) ."', - '" . DB_escape_string($_POST['BranchCode']) ."', - '" . DB_escape_string($_POST['SupplierID']) ."', + VALUES ('" . $_POST['UserID'] . "', + '" . $_POST['RealName'] ."', + '" . $_POST['Cust'] ."', + '" . $_POST['BranchCode'] ."', + '" . $_POST['SupplierID'] ."', '" . $_POST['Salesman'] . "', '" . CryptPass($_POST['Password']) ."', - '" . DB_escape_string($_POST['Phone']) . "', - '" . DB_escape_string($_POST['Email']) ."', + '" . $_POST['Phone'] . "', + '" . $_POST['Email'] ."', '" . $_POST['PageSize'] ."', '" . $_POST['Access'] . "', '" . $_POST['DefaultLocation'] ."', @@ -327,7 +330,7 @@ $SecurityRoles[($myrow['fullaccess'])], $myrow['pagesize'], $myrow['theme'], - $LanguagesArray[$myrow['language']], + $LanguagesArray[$myrow['language']]['LanguageName'], htmlspecialchars($_SERVER['PHP_SELF']) . '?', $myrow['userid'], htmlspecialchars($_SERVER['PHP_SELF']) . '?', Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/doc/Change.log 2011-11-04 04:56:22 UTC (rev 4739) @@ -5,6 +5,7 @@ 29/10/11 High-Tech Bridge SA Security Research Lab <adv...@ht...> - sanitising $_SERVER['PHP_SELF'] and unquoted sql in reportwriter/FormMaker.php and reportwriter/ReportMaker.php 15/10/11 Phil: Tried to get correct characters for each language's thousands separator and decimal point in includes/LanguagesArray.php 15/10/11 Phil: Updated PHPplot to 5.5.0 +15/10/11 Fred Schuettler aguapop - theme 8/10/11 Ricard: PcExpenses.php PcAuthorizeExpense.php now uses GL tags 8/10/11 Phil: SelectSalesOrder.php now allows for creation of purchase orders for the components of assembly items on sales orders. 29/9/11 Ricard: added new query critera to AuditTrail.php to look for text in query strings to enable searching for updates/inserts/deletes relating to a specified customer or item code etc Modified: trunk/includes/DefineReceiptClass.php =================================================================== --- trunk/includes/DefineReceiptClass.php 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/includes/DefineReceiptClass.php 2011-11-04 04:56:22 UTC (rev 4739) @@ -14,6 +14,7 @@ var $ExRate; /*Exchange rate conversion between currency received and bank account currency */ var $FunctionalExRate; /* Exchange Rate between Bank Account Currency and Functional(business reporting) currency */ var $Currency; /*Currency being banked - defaulted to company functional */ + var $CurrDecimalPlaces; var $Narrative; var $ReceiptType; /*Type of receipt ie credit card/cash/cheque etc - array of types defined in config.php*/ var $total; /*Total of the batch of receipts in the currency of the company*/ Modified: trunk/install/save.php =================================================================== --- trunk/install/save.php 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/install/save.php 2011-11-04 04:56:22 UTC (rev 4739) @@ -298,7 +298,7 @@ $msg .= "\$CryptFunction = 'sha1';\n"; $msg .= "\$DefaultClock = 12;\n"; -$msg .= "\$rootpath = dirname(\htmlspecialchars($_SERVER['PHP_SELF']));\n"; +$msg .= "\$rootpath = dirname(htmlspecialchars(\$_SERVER['PHP_SELF']));\n"; $msg .= "if (isset(\$DirectoryLevelsDeep)){\n"; $msg .= " for (\$i=0;\$i<\$DirectoryLevelsDeep;\$i++){\n"; $msg .= "\$rootpath = mb_substr(\$rootpath,0, strrpos(\$rootpath,'/'));\n"; Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-10-30 09:17:27 UTC (rev 4738) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-04 04:56:22 UTC (rev 4739) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-09-11 19:23+1200\n" +"POT-Creation-Date: 2011-11-01 22:26+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -21,7 +21,7 @@ "X-Poedit-Language: Czech\n" "X-Poedit-SourceCharset: utf-8\n" -#: AccountGroups.php:7 index.php:1296 +#: AccountGroups.php:7 index.php:1298 msgid "Account Groups" msgstr "Účetní skupiny" @@ -41,8 +41,8 @@ "SQL příkaz použitý při získávání účetních skupin rodičovské účetní skupiny " "byl" -#: AccountGroups.php:57 AccountGroups.php:94 AccountGroups.php:178 -#: AccountGroups.php:188 +#: AccountGroups.php:57 AccountGroups.php:102 AccountGroups.php:174 +#: AccountGroups.php:184 msgid "The SQL that was used to retrieve the information was" msgstr "SQL, který byl použit k získání informace" @@ -58,16 +58,22 @@ msgid "The account group name cannot contain the character" msgstr "Název účetní skupiny nemůže obsahovat znak" -#: AccountGroups.php:71 TaxCategories.php:31 TaxProvinces.php:30 -#: UnitsOfMeasure.php:30 +#: AccountGroups.php:71 TaxCategories.php:31 msgid "or the character" msgstr "nebo znak" #: AccountGroups.php:77 +#, fuzzy +msgid "" +"The sequence that the account group is listed in the trial balance is " +"expected to be numeric" +msgstr "Množství uvedené pro převody Očekává se, že číselné" + +#: AccountGroups.php:85 msgid "The account group name must be at least one character long" msgstr "Název účetní skupiny musí být dlouhý minimálně jeden znak" -#: AccountGroups.php:84 +#: AccountGroups.php:92 msgid "" "The parent account group selected appears to result in a recursive account " "structure - select an alternative parent account group or make this group a " @@ -77,11 +83,11 @@ "účtu - vyberte alternativní mateřské účet skupiny nebo tuto skupinu na " "nejvyšší úrovni účtové skupiny" -#: AccountGroups.php:95 +#: AccountGroups.php:103 msgid "Could not check whether the group is recursive because" msgstr "Nepodařilo se zjistit, zda skupina je rekurzivní, protože" -#: AccountGroups.php:103 +#: AccountGroups.php:111 msgid "" "Since this account group is a child group, the sequence in the trial " "balance, the section in the accounts and whether or not the account group " @@ -90,47 +96,39 @@ "will have no effect." msgstr "" -#: AccountGroups.php:108 +#: AccountGroups.php:116 msgid "The section in accounts must be an integer" msgstr "Sekce v účtech musí být celé kladné číslo" -#: AccountGroups.php:114 -msgid "The sequence in the trial balance must be an integer" -msgstr "Pořadí v předvaze musí být celé číslo" - -#: AccountGroups.php:120 -msgid "The sequence in the TB must be numeric and less than" -msgstr "Pořadí v TB musí být číslo a méně než" - -#: AccountGroups.php:137 +#: AccountGroups.php:133 msgid "An error occurred in updating the account group" msgstr "Došlo k chybě při aktualizaci účtové skupiny" -#: AccountGroups.php:138 +#: AccountGroups.php:134 msgid "The SQL that was used to update the account group was" msgstr "SQL, který byl použit k aktualizaci účtu skupina byla" -#: AccountGroups.php:140 AccountSections.php:104 PaymentMethods.php:82 +#: AccountGroups.php:136 AccountSections.php:104 PaymentMethods.php:82 msgid "Record Updated" msgstr "Záznam aktualizován" -#: AccountGroups.php:158 +#: AccountGroups.php:154 msgid "An error occurred in inserting the account group" msgstr "Došlo k chybě při vkládání účtové skupiny" -#: AccountGroups.php:159 +#: AccountGroups.php:155 msgid "The SQL that was used to insert the account group was" msgstr "SQL, který byl použit pro vložení na účet skupina byla" -#: AccountGroups.php:160 AccountSections.php:116 PaymentMethods.php:103 +#: AccountGroups.php:156 AccountSections.php:116 PaymentMethods.php:103 msgid "Record inserted" msgstr "Záznam vložen" -#: AccountGroups.php:177 +#: AccountGroups.php:173 msgid "An error occurred in retrieving the group information from chartmaster" msgstr "Došlo k chybě při získávání informací od skupiny chartmaster" -#: AccountGroups.php:182 +#: AccountGroups.php:178 msgid "" "Cannot delete this account group because general ledger accounts have been " "created using this group" @@ -138,37 +136,37 @@ "Nelze smazat tento účet skupiny, protože účtů hlavní knihy byly vytvořeny " "pomocí této skupině" -#: AccountGroups.php:183 AccountGroups.php:193 AccountSections.php:137 -#: Areas.php:116 Areas.php:125 BankAccounts.php:158 CreditStatus.php:123 -#: Currencies.php:164 Currencies.php:172 Currencies.php:180 +#: AccountGroups.php:179 AccountGroups.php:189 AccountSections.php:137 +#: Areas.php:116 Areas.php:125 BankAccounts.php:158 CreditStatus.php:125 +#: Currencies.php:166 Currencies.php:174 Currencies.php:182 #: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306 -#: CustomerBranches.php:316 Customers.php:312 Customers.php:321 -#: Customers.php:329 Customers.php:337 CustomerTypes.php:147 -#: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:129 -#: GLAccounts.php:80 GLAccounts.php:96 Locations.php:237 Locations.php:245 -#: Locations.php:256 Locations.php:265 Locations.php:274 Locations.php:283 -#: Locations.php:292 Locations.php:301 MRPDemandTypes.php:87 -#: PaymentMethods.php:138 PaymentTerms.php:144 PaymentTerms.php:151 -#: PcExpenses.php:152 SalesCategories.php:124 SalesCategories.php:131 -#: SalesPeople.php:149 SalesPeople.php:156 SalesTypes.php:150 -#: SalesTypes.php:160 Shippers.php:82 Shippers.php:94 StockCategories.php:179 -#: Stocks.php:604 Stocks.php:613 Stocks.php:621 Stocks.php:629 Stocks.php:637 -#: Stocks.php:645 Suppliers.php:609 Suppliers.php:618 Suppliers.php:626 -#: SupplierTypes.php:145 TaxCategories.php:131 TaxGroups.php:127 -#: TaxGroups.php:134 TaxProvinces.php:125 UnitsOfMeasure.php:138 -#: WorkCentres.php:89 WorkCentres.php:95 WWW_Access.php:83 +#: CustomerBranches.php:316 CustomerTypes.php:147 CustomerTypes.php:157 +#: Customers.php:289 Customers.php:298 Customers.php:306 Customers.php:314 +#: Factors.php:134 FixedAssetCategories.php:129 GLAccounts.php:80 +#: GLAccounts.php:96 Locations.php:237 Locations.php:245 Locations.php:256 +#: Locations.php:265 Locations.php:274 Locations.php:283 Locations.php:292 +#: Locations.php:301 MRPDemandTypes.php:87 PaymentMethods.php:138 +#: PaymentTerms.php:146 PaymentTerms.php:153 PcExpenses.php:158 +#: SalesCategories.php:124 SalesCategories.php:131 SalesPeople.php:150 +#: SalesPeople.php:157 SalesPeople.php:163 SalesTypes.php:140 +#: SalesTypes.php:150 Shippers.php:82 Shippers.php:94 StockCategories.php:181 +#: Stocks.php:615 Stocks.php:624 Stocks.php:632 Stocks.php:640 Stocks.php:648 +#: Stocks.php:656 SupplierTypes.php:145 Suppliers.php:612 Suppliers.php:621 +#: Suppliers.php:629 TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 +#: TaxProvinces.php:129 UnitsOfMeasure.php:135 WWW_Access.php:83 +#: WorkCentres.php:89 WorkCentres.php:95 msgid "There are" msgstr "Jsou zde" -#: AccountGroups.php:183 +#: AccountGroups.php:179 msgid "general ledger accounts that refer to this account group" msgstr "účtů hlavní knihy, které se vztahují k tomuto účtu skupině" -#: AccountGroups.php:187 +#: AccountGroups.php:183 msgid "An error occurred in retrieving the parent group information" msgstr "Došlo k chybě při načítání mateřské skupiny informací" -#: AccountGroups.php:192 +#: AccountGroups.php:188 msgid "" "Cannot delete this account group because it is a parent account group of " "other account group(s)" @@ -176,239 +174,237 @@ "Nelze smazat tento účet skupiny, protože se jedná o mateřskou účet skupinou " "dalších účtové skupiny (y)" -#: AccountGroups.php:193 +#: AccountGroups.php:189 msgid "account groups that have this group as its/there parent account group" msgstr "" "účet skupiny, které mají tuto skupinu jako jeho / je skupina rodičů účet" -#: AccountGroups.php:196 +#: AccountGroups.php:192 msgid "An error occurred in deleting the account group" msgstr "Došlo k chybě při mazání účtu skupiny" -#: AccountGroups.php:197 +#: AccountGroups.php:193 msgid "The SQL that was used to delete the account group was" msgstr "SQL, který byl použit smazat účet skupina byla" -#: AccountGroups.php:199 +#: AccountGroups.php:195 msgid "group has been deleted" msgstr "skupina byla smazána" -#: AccountGroups.php:224 +#: AccountGroups.php:220 msgid "The sql that was used to retrieve the account group information was " msgstr "Sql, který byl použit k načtení účtové skupiny informace " -#: AccountGroups.php:225 +#: AccountGroups.php:221 msgid "Could not get account groups because" msgstr "Nemohu získat účetní skupiny, protože" -#: AccountGroups.php:227 AccountSections.php:175 AddCustomerContacts.php:25 -#: AddCustomerContacts.php:28 AddCustomerNotes.php:101 -#: AddCustomerTypeNotes.php:95 AgedDebtors.php:454 AgedSuppliers.php:268 -#: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:13 -#: BOMExtendedQty.php:259 BOMIndented.php:246 BOMIndentedReverse.php:236 -#: BOMInquiry.php:171 BOMListing.php:109 BOMs.php:208 BOMs.php:798 -#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2002 -#: CounterSales.php:2123 Credit_Invoice.php:255 CreditStatus.php:20 -#: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:10 -#: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10 -#: DiscountCategories.php:131 DiscountMatrix.php:16 EDIMessageFormat.php:104 -#: FixedAssetLocations.php:9 FixedAssetRegister.php:13 -#: FixedAssetRegister.php:237 FixedAssetTransfer.php:31 FormDesigner.php:129 -#: GLBalanceSheet.php:351 GLBudgets.php:28 GLJournal.php:228 -#: InventoryPlanning.php:373 InventoryPlanningPrefSupplier.php:467 -#: Labels.php:115 Labels.php:270 MRPReport.php:515 OutstandingGRNs.php:160 -#: PcAssignCashToTab.php:56 PcAssignCashToTab.php:130 -#: PcAssignCashToTab.php:146 PcAssignCashToTab.php:183 PDFPickingList.php:28 -#: PDFPrintLabel.php:139 PDFStockLocTransfer.php:21 -#: PO_AuthorisationLevels.php:10 POReport.php:60 POReport.php:64 -#: POReport.php:68 PO_SelectOSPurchOrder.php:133 PricesBasedOnMarkUp.php:11 -#: Prices_Customer.php:39 Prices.php:30 PurchData.php:138 PurchData.php:249 -#: PurchData.php:268 RecurringSalesOrders.php:310 SalesAnalReptCols.php:51 +#: AccountGroups.php:223 AccountSections.php:175 AddCustomerContacts.php:25 +#: AddCustomerContacts.php:28 AddCustomerNotes.php:103 +#: AddCustomerTypeNotes.php:97 AgedDebtors.php:451 AgedSuppliers.php:278 +#: Areas.php:144 AuditTrail.php:11 BOMExtendedQty.php:261 BOMIndented.php:246 +#: BOMIndentedReverse.php:235 BOMInquiry.php:187 BOMListing.php:109 +#: BOMs.php:213 BOMs.php:832 BankReconciliation.php:13 COGSGLPostings.php:18 +#: CompanyPreferences.php:153 CounterSales.php:2010 CounterSales.php:2135 +#: CreditStatus.php:21 Credit_Invoice.php:255 Currencies.php:28 +#: CustEDISetup.php:17 DailyBankTransactions.php:11 DebtorsAtPeriodEnd.php:125 +#: DiscountCategories.php:10 DiscountCategories.php:131 DiscountMatrix.php:16 +#: EDIMessageFormat.php:104 FixedAssetLocations.php:9 +#: FixedAssetRegister.php:13 FixedAssetRegister.php:237 +#: FixedAssetTransfer.php:31 FormDesigner.php:129 GLBalanceSheet.php:362 +#: GLBudgets.php:29 GLJournal.php:246 InventoryPlanning.php:374 +#: InventoryPlanningPrefSupplier.php:467 Labels.php:115 Labels.php:270 +#: MRPReport.php:515 OutstandingGRNs.php:160 PDFPickingList.php:28 +#: PDFPrintLabel.php:140 PDFStockLocTransfer.php:17 POReport.php:60 +#: POReport.php:64 POReport.php:68 PO_AuthorisationLevels.php:10 +#: PO_SelectOSPurchOrder.php:135 PcAssignCashToTab.php:56 +#: PcAssignCashToTab.php:130 PcAssignCashToTab.php:146 +#: PcAssignCashToTab.php:187 Prices.php:30 PricesBasedOnMarkUp.php:8 +#: Prices_Customer.php:34 PurchData.php:137 PurchData.php:258 +#: PurchData.php:282 RecurringSalesOrders.php:309 SalesAnalReptCols.php:51 #: SalesAnalRepts.php:11 SalesCategories.php:11 SalesGLPostings.php:17 #: SalesGraph.php:34 SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:45 #: SelectCompletedOrder.php:11 SelectContract.php:78 SelectCreditItems.php:215 -#: SelectCreditItems.php:283 SelectCustomer.php:247 SelectGLAccount.php:19 -#: SelectGLAccount.php:79 SelectOrderItems.php:618 SelectOrderItems.php:1512 -#: SelectOrderItems.php:1636 SelectProduct.php:496 SelectSalesOrder.php:454 -#: SelectSupplier.php:9 SelectSupplier.php:192 SelectWorkOrder.php:9 -#: SelectWorkOrder.php:145 ShipmentCosting.php:11 Shipments.php:17 +#: SelectCreditItems.php:286 SelectCustomer.php:260 SelectGLAccount.php:17 +#: SelectGLAccount.php:77 SelectOrderItems.php:575 SelectOrderItems.php:1468 +#: SelectOrderItems.php:1592 SelectProduct.php:496 SelectSalesOrder.php:533 +#: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:9 +#: SelectWorkOrder.php:151 ShipmentCosting.php:11 Shipments.php:17 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:8 -#: StockLocMovements.php:13 StockLocStatus.php:26 Suppliers.php:302 -#: SupplierTenders.php:260 SupplierTenders.php:317 SupplierTransInquiry.php:11 -#: TaxGroups.php:15 TaxProvinces.php:10 TopItems.php:65 -#: WhereUsedInquiry.php:18 WorkCentres.php:110 WorkCentres.php:157 -#: WorkOrderCosting.php:12 WorkOrderEntry.php:10 WorkOrderIssue.php:20 -#: WorkOrderReceive.php:13 WorkOrderStatus.php:41 WWW_Access.php:11 -#: WWW_Users.php:32 Z_BottomUpCosts.php:51 +#: StockLocMovements.php:13 StockLocStatus.php:27 SupplierTenders.php:260 +#: SupplierTenders.php:317 SupplierTransInquiry.php:10 Suppliers.php:302 +#: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 WWW_Access.php:11 +#: WWW_Users.php:31 WhereUsedInquiry.php:18 WorkCentres.php:111 +#: WorkCentres.php:162 WorkOrderCosting.php:13 WorkOrderEntry.php:11 +#: WorkOrderIssue.php:22 WorkOrderReceive.php:15 WorkOrderStatus.php:42 +#: Z_BottomUpCosts.php:51 msgid "Search" msgstr "Vyhledávání" -#: AccountGroups.php:231 +#: AccountGroups.php:227 msgid "Group... [truncated message content] |
From: <dai...@us...> - 2011-10-30 09:17:35
|
Revision: 4738 http://web-erp.svn.sourceforge.net/web-erp/?rev=4738&view=rev Author: daintree Date: 2011-10-30 09:17:27 +0000 (Sun, 30 Oct 2011) Log Message: ----------- number_formatting Modified Paths: -------------- trunk/BOMExtendedQty.php trunk/CustomerReceipt.php trunk/CustomerTransInquiry.php trunk/Customers.php trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/Stocks.php trunk/doc/Change.log Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2011-10-30 05:50:51 UTC (rev 4737) +++ trunk/BOMExtendedQty.php 2011-10-30 09:17:27 UTC (rev 4738) @@ -77,7 +77,7 @@ bom.effectiveafter, bom.effectiveto, (" . filter_number_format($_POST['Quantity']) . " * bom.quantity) as extendedqpa - FROM bom + FROM bom WHERE bom.parent ='" . $_POST['Part'] . "' AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; @@ -188,11 +188,13 @@ GROUP BY purchorderdetails.itemcode) AS poqty, (SELECT SUM(woitems.qtyreqd - woitems.qtyrecd) as netwoqty - FROM woitems + FROM woitems INNER JOIN workorders + ON woitems.wo = workorders.wo WHERE woitems.stockid = tempbom.component + AND workorders.closed=0 GROUP BY woitems.stockid) AS woqty - FROM tempbom,stockmaster - WHERE tempbom.component = stockmaster.stockid + FROM tempbom INNER JOIN stockmaster + ON tempbom.component = stockmaster.stockid GROUP BY tempbom.component, stockmaster.description, stockmaster.decimalplaces, Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-10-30 05:50:51 UTC (rev 4737) +++ trunk/CustomerReceipt.php 2011-10-30 09:17:27 UTC (rev 4738) @@ -52,7 +52,7 @@ $_SESSION['ReceiptBatch']->BankAccountName = $myrow[0]; $_SESSION['ReceiptBatch']->AccountCurrency=$myrow[1]; unset($result); - } elseif (DB_num_rows($result)==0 and !$BankAccountEmpty){ + } elseif (DB_num_rows($result)==0 AND !$BankAccountEmpty){ prnMsg( _('The bank account number') . ' ' . $_POST['BankAccount'] . ' ' . _('is not set up as a bank account'),'error'); include ('includes/footer.inc'); exit; @@ -62,7 +62,7 @@ $_POST['DateBanked'] = Date($_SESSION['DefaultDateFormat']); } $_SESSION['ReceiptBatch']->DateBanked = $_POST['DateBanked']; - if (isset($_POST['ExRate']) and $_POST['ExRate']!=''){ + if (isset($_POST['ExRate']) AND $_POST['ExRate']!=''){ if (is_numeric(filter_number_format($_POST['ExRate']))){ $_SESSION['ReceiptBatch']->ExRate = filter_number_format($_POST['ExRate']); } else { Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2011-10-30 05:50:51 UTC (rev 4737) +++ trunk/CustomerTransInquiry.php 2011-10-30 09:17:27 UTC (rev 4738) @@ -6,18 +6,20 @@ $title = _('Customer Transactions Inquiry'); include('includes/header.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Transaction Inquiry') . '" alt="" />' . ' ' . _('Transaction Inquiry') . '</p>'; +echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Transaction Inquiry') . '" alt="" />' . ' ' . _('Transaction Inquiry') . ' + </p>'; echo '<div class="page_help_text">' . _('Choose which type of transaction to report on.') . '</div> <br />'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method=post>'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table cellpadding=2 class=selection><tr>'; +echo '<table class="selection"> + <tr> + <td>' . _('Type') . ':</td> + <td><select tabindex="1" name="TransType"> '; -echo '<td>' . _('Type') . ':</td> - <td><select tabindex="1" name="TransType"> '; - $sql = "SELECT typeid, typename FROM systypes @@ -35,7 +37,7 @@ echo '<option value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } } else { - echo "<option Value='" . $myrow['typeid'] . "'>" . $myrow['typename']; + echo '<option Value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } } echo '</select></td>'; @@ -46,31 +48,38 @@ if (!isset($_POST['ToDate'])){ $_POST['ToDate'] = Date($_SESSION['DefaultDateFormat']); } -echo '<td>' . _('From') . ':</td><td><input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="TEXT" name="FromDate" maxlength="10" size="11" VALUE="' . $_POST['FromDate'] . '"></td>'; -echo '<td>' . _('To') . ':</td><td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="TEXT" name="ToDate" maxlength="10" size="11" VALUE="' . $_POST['ToDate'] . '"></td>'; +echo '<td>' . _('From') . ':</td> + <td><input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="FromDate" maxlength="10" size="11" value="' . $_POST['FromDate'] . '" /></td> + <td>' . _('To') . ':</td> + <td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '" /></td>'; -echo "</tr></table><br /><div class='centre'><input tabindex=4 type=submit name='ShowResults' VALUE='" . _('Show Transactions') . "'>"; +echo '</tr></table> + <br /> + <div class="centre"> + <input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Transactions') . '"> + </div> + </form>'; -echo '</form></div>'; - if (isset($_POST['ShowResults']) && $_POST['TransType'] != ''){ $SQL_FromDate = FormatDateForSQL($_POST['FromDate']); $SQL_ToDate = FormatDateForSQL($_POST['ToDate']); $sql = "SELECT transno, - trandate, - debtortrans.debtorno, - branchcode, - reference, - invtext, - order_, - rate, - ovamount+ovgst+ovfreight+ovdiscount as totalamt, - currcode, - typename - FROM debtortrans - INNER JOIN debtorsmaster ON debtortrans.debtorno=debtorsmaster.debtorno - INNER JOIN systypes ON debtortrans.type = systypes.typeid - WHERE "; + trandate, + debtortrans.debtorno, + branchcode, + reference, + invtext, + order_, + debtortrans.rate, + ovamount+ovgst+ovfreight+ovdiscount as totalamt, + currcode, + typename, + decimalplaces AS currdecimalplaces + FROM debtortrans + INNER JOIN debtorsmaster ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN currencies ON debtorsmaster.currcode=currencies.currabrev + INNER JOIN systypes ON debtortrans.type = systypes.typeid + WHERE "; $sql = $sql . "trandate >='" . $SQL_FromDate . "' AND trandate <= '" . $SQL_ToDate . "'"; if ($_POST['TransType']!='All') { @@ -82,21 +91,23 @@ $DbgMsg = _('The SQL that failed was'); $TransResult = DB_query($sql, $db,$ErrMsg,$DbgMsg); - echo '<br /><table cellpadding=2 class=selection>'; + echo '<br /> + <table class="selection">'; - $tableheader = "<tr> - <th>" . _('Type') . "</th> - <th>" . _('Number') . "</th> - <th>" . _('Date') . "</th> - <th>" . _('Customer') . "</th> - <th>" . _('Branch') . "</th> - <th>" . _('Reference') . "</th> - <th>" . _('Comments') . "</th> - <th>" . _('Order') . "</th> - <th>" . _('Ex Rate') . "</th> - <th>" . _('Amount') . "</th> - <th>" . _('Currency') . '</th></tr>'; - echo $tableheader; + $TableHeader = '<tr> + <th>' . _('Type') . '</th> + <th>' . _('Number') . '</th> + <th>' . _('Date') . '</th> + <th>' . _('Customer') . '</th> + <th>' . _('Branch') . '</th> + <th>' . _('Reference') . '</th> + <th>' . _('Comments') . '</th> + <th>' . _('Order') . '</th> + <th>' . _('Ex Rate') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Currency') . '</th> + </tr>'; + echo $TableHeader; $RowCounter = 1; $k = 0; //row colour counter @@ -111,70 +122,69 @@ $k++; } - $format_base = "<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td width='200'>%s</td> - <td>%s</td> - <td class=number>%s</td> - <td class=number>%s</td> - <td>%s</td>"; + $format_base = '<td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td width="200">%s</td> + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td>%s</td>'; if ($_POST['TransType']==10){ /* invoices */ - printf("$format_base - <td><a target='_blank' href='%s/PrintCustTrans.php?%&FromTransNo=%s&InvOrCredit=Invoice'><IMG SRC='%s' title='" . _('Click to preview the invoice') . "'></a></td> - </tr>", - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - $myrow['debtorno'], - $myrow['branchcode'], - $myrow['reference'], - $myrow['invtext'], - $myrow['order_'], - $myrow['rate'], - locale_number_format($myrow['totalamt'],2), - $myrow['currcode'], - $rootpath, - SID, - $myrow['transno'], - $rootpath.'/css/'.$theme.'/images/preview.gif'); + printf($format_base . + '<td><a target="_blank" href=%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice"><img src="%s" title="' . _('Click to preview the invoice') . '"></a></td> + </tr>', + $myrow['typename'], + $myrow['transno'], + ConvertSQLDate($myrow['trandate']), + $myrow['debtorno'], + $myrow['branchcode'], + $myrow['reference'], + $myrow['invtext'], + $myrow['order_'], + locale_number_format($myrow['rate'],6), + locale_number_format($myrow['totalamt'],$myrow['currdecimalplaces']), + $myrow['currcode'], + $rootpath, + $myrow['transno'], + $rootpath.'/css/'.$theme.'/images/preview.gif'); + } elseif ($_POST['TransType']==11){ /* credit notes */ - printf("$format_base - <td><a target='_blank' href='%s/PrintCustTrans.php?%s&FromTransNo=%s&InvOrCredit=Credit'><IMG SRC='%s' title='" . _('Click to preview the credit') . "'></a></td> - </tr>", - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - $myrow['debtorno'], - $myrow['branchcode'], - $myrow['reference'], - $myrow['invtext'], - $myrow['order_'], - $myrow['rate'], - locale_number_format($myrow['totalamt'],2), - $myrow['currcode'], - $rootpath, - SID, - $myrow['transno'], - $rootpath.'/css/'.$theme.'/images/preview.gif'); + printf($format_base . + '<td><a target="_blank" href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Credit"><img src="%s" title="' . _('Click to preview the credit') . '"></a></td> + </tr>', + $myrow['typename'], + $myrow['transno'], + ConvertSQLDate($myrow['trandate']), + $myrow['debtorno'], + $myrow['branchcode'], + $myrow['reference'], + $myrow['invtext'], + $myrow['order_'], + locale_number_format($myrow['rate'],6), + locale_number_format($myrow['totalamt'],$myrow['currdecimalplaces']), + $myrow['currcode'], + $rootpath, + $myrow['transno'], + $rootpath.'/css/'.$theme.'/images/preview.gif'); } else { /* otherwise */ - printf("$format_base</tr>", - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - $myrow['debtorno'], - $myrow['branchcode'], - $myrow['reference'], - $myrow['invtext'], - $myrow['order_'], - $myrow['rate'], - locale_number_format($myrow['totalamt'],2), - $myrow['currcode']); + printf($format_base . '</tr>', + $myrow['typename'], + $myrow['transno'], + ConvertSQLDate($myrow['trandate']), + $myrow['debtorno'], + $myrow['branchcode'], + $myrow['reference'], + $myrow['invtext'], + $myrow['order_'], + locale_number_format($myrow['rate'],6), + locale_number_format($myrow['totalamt'],$myrow['currdecimalplaces']), + $myrow['currcode']); } } Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-10-30 05:50:51 UTC (rev 4737) +++ trunk/Customers.php 2011-10-30 09:17:27 UTC (rev 4738) @@ -10,8 +10,10 @@ include('includes/SQL_CommonFunctions.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . - '" alt="" />' . ' ' . _('Customer Maintenance') . '</p>'; +echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . + '" alt="" />' . ' ' . _('Customer Maintenance') . ' + </p>'; if (isset($Errors)) { unset($Errors); @@ -84,37 +86,12 @@ prnMsg( _('The Line 6 of the address must be fifteen characters or less long'),'error'); $Errors[$i] = 'Address6'; $i++; - } - elseif (mb_strlen($_POST['Phone']) >25) { + } elseif (!is_numeric(filter_number_format($_POST['CreditLimit']))) { $InputError = 1; - prnMsg(_('The telephone number must be 25 characters or less long'),'error'); - $Errors[$i] = 'Telephone'; - $i++; - } - elseif (mb_strlen($_POST['Fax']) >25) { - $InputError = 1; - prnMsg(_('The fax number must be 25 characters or less long'),'error'); - $Errors[$i] = 'Fax'; - $i++; - } - elseif (mb_strlen($_POST['Email']) >55) { - $InputError = 1; - prnMsg(_('The email address must be 55 characters or less long'),'error'); - $Errors[$i] = 'Email'; - $i++; - } - elseif (mb_strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { - $InputError = 1; - prnMsg(_('The email address is not correctly formed'),'error'); - $Errors[$i] = 'Email'; - $i++; - } - elseif (!is_numeric($_POST['CreditLimit'])) { - $InputError = 1; prnMsg( _('The credit limit must be numeric'),'error'); $Errors[$i] = 'CreditLimit'; $i++; - } elseif (!is_numeric($_POST['PymtDiscount'])) { + } elseif (!is_numeric(filter_number_format($_POST['PymtDiscount']))) { $InputError = 1; prnMsg( _('The payment discount must be numeric'),'error'); $Errors[$i] = 'PymtDiscount'; @@ -124,22 +101,22 @@ prnMsg( _('The customer since field must be a date in the format') . ' ' . $_SESSION['DefaultDateFormat'],'error'); $Errors[$i] = 'ClientSince'; $i++; - } elseif (!is_numeric($_POST['Discount'])) { + } elseif (!is_numeric(filter_number_format($_POST['Discount']))) { $InputError = 1; prnMsg( _('The discount percentage must be numeric'),'error'); $Errors[$i] = 'Discount'; $i++; - } elseif ((double) $_POST['CreditLimit'] <0) { + } elseif (filter_number_format($_POST['CreditLimit']) <0) { $InputError = 1; prnMsg( _('The credit limit must be a positive number'),'error'); $Errors[$i] = 'CreditLimit'; $i++; - } elseif (((double) $_POST['PymtDiscount']> 10) OR ((double) $_POST['PymtDiscount'] <0)) { + } elseif ((filter_number_format($_POST['PymtDiscount'])> 10) OR (filter_number_format($_POST['PymtDiscount']) <0)) { $InputError = 1; prnMsg( _('The payment discount is expected to be less than 10% and greater than or equal to 0'),'error'); $Errors[$i] = 'PymtDiscount'; $i++; - } elseif (((double) $_POST['Discount']> 100) OR ((double) $_POST['Discount'] <0)) { + } elseif ((filter_number_format($_POST['Discount'])> 100) OR (filter_number_format($_POST['Discount']) <0)) { $InputError = 1; prnMsg( _('The discount is expected to be less than 100% and greater than or equal to 0'),'error'); $Errors[$i] = 'Discount'; @@ -171,10 +148,10 @@ clientsince='" . $SQL_ClientSince. "', holdreason='" . $_POST['HoldReason'] . "', paymentterms='" . $_POST['PaymentTerms'] . "', - discount='" . ($_POST['Discount'])/100 . "', + discount='" . filter_number_format($_POST['Discount'])/100 . "', discountcode='" . $_POST['DiscountCode'] . "', - pymtdiscount='" . ($_POST['PymtDiscount'])/100 . "', - creditlimit='" . $_POST['CreditLimit'] . "', + pymtdiscount='" . filter_number_format($_POST['PymtDiscount'])/100 . "', + creditlimit='" . filter_number_format($_POST['CreditLimit']) . "', salestype = '" . $_POST['SalesType'] . "', invaddrbranch='" . $_POST['AddrInvBranch'] . "', taxref='" . $_POST['TaxRef'] . "', @@ -201,10 +178,10 @@ clientsince='" . $SQL_ClientSince . "', holdreason='" . $_POST['HoldReason'] . "', paymentterms='" . $_POST['PaymentTerms'] . "', - discount='" . ($_POST['Discount'])/100 . "', + discount='" . filter_number_format($_POST['Discount'])/100 . "', discountcode='" . $_POST['DiscountCode'] . "', - pymtdiscount='" . ($_POST['PymtDiscount'])/100 . "', - creditlimit='" . $_POST['CreditLimit'] . "', + pymtdiscount='" . filter_number_format($_POST['PymtDiscount'])/100 . "', + creditlimit='" . filter_number_format($_POST['CreditLimit']) . "', salestype = '" . $_POST['SalesType'] . "', invaddrbranch='" . $_POST['AddrInvBranch'] . "', taxref='" . $_POST['TaxRef'] . "', @@ -266,10 +243,10 @@ '" . $SQL_ClientSince . "', '" . $_POST['HoldReason'] . "', '" . $_POST['PaymentTerms'] . "', - '" . ($_POST['Discount'])/100 . "', + '" . filter_number_format($_POST['Discount'])/100 . "', '" . $_POST['DiscountCode'] . "', - '" . ($_POST['PymtDiscount'])/100 . "', - '" . $_POST['CreditLimit'] . "', + '" . filter_number_format($_POST['PymtDiscount'])/100 . "', + '" . filter_number_format($_POST['CreditLimit']) . "', '" . $_POST['SalesType'] . "', '" . $_POST['AddrInvBranch'] . "', '" . $_POST['TaxRef'] . "', @@ -577,8 +554,9 @@ $myrow = DB_fetch_row($CurrResult); $_POST['CurrCode'] = $myrow[0]; } - echo '<tr><td>' . _('Customer Currency') . ':</td> - <td><select tabindex=17 name="CurrCode">'; + echo '<tr> + <td>' . _('Customer Currency') . ':</td> + <td><select tabindex="17" name="CurrCode">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['CurrCode']==$myrow['currabrev']){ echo '<option selected value='. $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; @@ -588,28 +566,34 @@ } //end while loop DB_data_seek($result,0); - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } - echo '<tr><td>' . _('Customer PO Line on SO') . ':</td> + echo '<tr> + <td>' . _('Customer PO Line on SO') . ':</td> <td><select tabindex="18" name="CustomerPOLine"> <option selected value=0>' . _('No') . '</option> <option value=1>' . _('Yes') . '</option> </select> </td> - </tr>'; - - echo '<tr><td>' . _('Invoice Addressing') . ':</td> + </tr> + <tr> + <td>' . _('Invoice Addressing') . ':</td> <td><select tabindex="19" name="AddrInvBranch"> <option selected value=0>' . _('Address to HO') . '</option> <option value=1>' . _('Address to Branch') . '</option> </select> </td> - </tr>'; - - echo'</table></td></tr></table>'; + </tr> + </table></td> + </tr> + </table>'; if ($DataError ==0){ - echo '<br /><div class="centre"><input tabindex=20 type="Submit" name="submit" value="' . _('Add New Customer') . '"> <input tabindex=21 type="submit" action="Reset" value="' . _('Reset') . '"></div>'; + echo '<br /> + <div class="centre"> + <input tabindex="20" type="submit" name="submit" value="' . _('Add New Customer') . '" /> <input tabindex="21" type="submit" action="Reset" value="' . _('Reset') . '" /> + </div>'; } echo '</form>'; @@ -620,34 +604,34 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection cellspacing=4> - <tr><td valign=top><table class=selection>'; + echo '<table class="selection"> + <tr><td valign="top"><table class="selection">'; if (!isset($_POST['New'])) { $sql = "SELECT debtorsmaster.debtorno, - name, - address1, - address2, - address3, - address4, - address5, - address6, - currcode, - salestype, - clientsince, - holdreason, - paymentterms, - discount, - discountcode, - pymtdiscount, - creditlimit, - invaddrbranch, - taxref, - customerpoline, - typeid + name, + address1, + address2, + address3, + address4, + address5, + address6, + currcode, + salestype, + clientsince, + holdreason, + paymentterms, + discount, + discountcode, + pymtdiscount, + creditlimit, + invaddrbranch, + taxref, + customerpoline, + typeid FROM debtorsmaster - WHERE debtorsmaster.debtorno = '" . $DebtorNo . "'"; - + WHERE debtorsmaster.debtorno = '" . $DebtorNo . "'"; + $ErrMsg = _('The customer details could not be retrieved because'); $result = DB_query($sql,$db,$ErrMsg); @@ -672,10 +656,10 @@ $_POST['ClientSince'] = ConvertSQLDate($myrow['clientsince']); $_POST['HoldReason'] = $myrow['holdreason']; $_POST['PaymentTerms'] = $myrow['paymentterms']; - $_POST['Discount'] = $myrow['discount'] * 100; + $_POST['Discount'] = locale_number_format($myrow['discount'] * 100,2); $_POST['DiscountCode'] = $myrow['discountcode']; - $_POST['PymtDiscount'] = $myrow['pymtdiscount'] * 100; - $_POST['CreditLimit'] = $myrow['creditlimit']; + $_POST['PymtDiscount'] = locale_number_format($myrow['pymtdiscount'] * 100,2); + $_POST['CreditLimit'] = locale_number_format($myrow['creditlimit'],0); $_POST['InvAddrBranch'] = $myrow['invaddrbranch']; $_POST['TaxRef'] = $myrow['taxref']; $_POST['CustomerPOLine'] = $myrow['customerpoline']; @@ -690,34 +674,70 @@ /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then provide an input box for the DebtorNo to manually assigned */ if ($_SESSION['AutoDebtorNo']== 0 ) { - echo '<tr><td>' . _('Customer Code') . ':</td> - <td><input ' . (in_array('DebtorNo',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="DebtorNo" value="' . $DebtorNo . '" size=12 maxlength=10></td></tr>'; + echo '<tr> + <td>' . _('Customer Code') . ':</td> + <td><input ' . (in_array('DebtorNo',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="DebtorNo" value="' . $DebtorNo . '" size="12" maxlength="10" /></td></tr>'; } } if (isset($_GET['Modify'])) { - echo '<tr><td>' . _('Customer Name') . ':</td><td>' . $_POST['CustName'] . '</td></tr>'; - echo '<tr><td>' . _('Address Line 1 (Street)') . ':</td><td>' . $_POST['Address1'] . '</td></tr>'; - echo '<tr><td>' . _('Address Line 2 (Suburb/City)') . ':</td><td>' . $_POST['Address2'] . '</td></tr>'; - echo '<tr><td>' . _('Address Line 3 (State/Province)') . ':</td><td>' . $_POST['Address3'] . '</td></tr>'; - echo '<tr><td>' . _('Address Line 4 (Postal Code)') . ':</td><td>' . $_POST['Address4'] . '</td></tr>'; - echo '<tr><td>' . _('Address Line 5') . ':</td><td>' . $_POST['Address5'] . '</td></tr>'; - echo '<tr><td>' . _('Address Line 6') . ':</td><td>' . $_POST['Address6'] . '</td></tr>'; + echo '<tr> + <td>' . _('Customer Name') . ':</td> + <td>' . $_POST['CustName'] . '</td> + </tr> + <tr> + <td>' . _('Address Line 1 (Street)') . ':</td> + <td>' . $_POST['Address1'] . '</td> + </tr> + <tr> + <td>' . _('Address Line 2 (Suburb/City)') . ':</td> + <td>' . $_POST['Address2'] . '</td> + </tr> + <tr> + <td>' . _('Address Line 3 (State/Province)') . ':</td> + <td>' . $_POST['Address3'] . '</td> + </tr> + <tr> + <td>' . _('Address Line 4 (Postal Code)') . ':</td> + <td>' . $_POST['Address4'] . '</td> + </tr> + <tr> + <td>' . _('Address Line 5') . ':</td> + <td>' . $_POST['Address5'] . '</td> + </tr> + <tr> + <td>' . _('Address Line 6') . ':</td> + <td>' . $_POST['Address6'] . '</td> + </tr>'; } else { - echo '<tr><td>' . _('Customer Name') . ':</td> - <td><input ' . (in_array('CustName',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="CustName" value="' . $_POST['CustName'] . '" size=42 maxlength=40></td></tr>'; - echo '<tr><td>' . _('Address Line 1 (Street)') . ':</td> - <td><input ' . (in_array('Address1',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address1" size=42 maxlength=40 value="' . $_POST['Address1'] . '"></td></tr>'; - echo '<tr><td>' . _('Address Line 2 (Suburb/City)') . ':</td> - <td><input ' . (in_array('Address2',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address2" size=42 maxlength=40 value="' . $_POST['Address2'] . '"></td></tr>'; - echo '<tr><td>' . _('Address Line 3 (State/Province)') . ':</td> - <td><input ' . (in_array('Address3',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address3" size=42 maxlength=40 value="' . $_POST['Address3'] . '"></td></tr>'; - echo '<tr><td>' . _('Address Line 4 (Postal Code)') . ':</td> - <td><input ' . (in_array('Address4',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address4" size=42 maxlength=40 value="' . $_POST['Address4'] . '"></td></tr>'; - echo '<tr><td>' . _('Address Line 5') . ':</td> - <td><input ' . (in_array('Address5',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address5" size=42 maxlength=40 value="' . $_POST['Address5'] . '"></td></tr>'; - echo '<tr><td>' . _('Address Line 6') . ':</td> - <td><input ' . (in_array('Address6',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="Address6" size=42 maxlength=40 value="' . $_POST['Address6'] . '"></td></tr>'; + echo '<tr> + <td>' . _('Customer Name') . ':</td> + <td><input ' . (in_array('CustName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="CustName" value="' . $_POST['CustName'] . '" size="42" maxlength="40" /></td> + </tr> + <tr> + <td>' . _('Address Line 1 (Street)') . ':</td> + <td><input ' . (in_array('Address1',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address1" size="42" maxlength="40" value="' . $_POST['Address1'] . '" /></td> + </tr> + <tr> + <td>' . _('Address Line 2 (Suburb/City)') . ':</td> + <td><input ' . (in_array('Address2',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address2" size="42" maxlength="40" value="' . $_POST['Address2'] . '" /></td> + </tr> + <tr> + <td>' . _('Address Line 3 (State/Province)') . ':</td> + <td><input ' . (in_array('Address3',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address3" size="42" maxlength="40" value="' . $_POST['Address3'] . '" /></td> + </tr> + <tr> + <td>' . _('Address Line 4 (Postal Code)') . ':</td> + <td><input ' . (in_array('Address4',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address4" size="42" maxlength="40" value="' . $_POST['Address4'] . '" /></td> + </tr> + <tr> + <td>' . _('Address Line 5') . ':</td> + <td><input ' . (in_array('Address5',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address5" size="42" maxlength="40" value="' . $_POST['Address5'] . '" /></td> + </tr> + <tr> + <td>' . _('Address Line 6') . ':</td> + <td><input ' . (in_array('Address6',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Address6" size="42" maxlength="40" value="' . $_POST['Address6'] . '" /></td> + </tr>'; } // Select sales types for drop down list @@ -743,12 +763,14 @@ if (isset($_GET['Modify'])) { $result=DB_query("SELECT typename FROM debtortype WHERE typeid='".$_POST['typeid']."'",$db); $myrow=DB_fetch_array($result); - echo '<tr><td>' . _('Customer Type') . ':</td> + echo '<tr> + <td>' . _('Customer Type') . ':</td> <td>'.$myrow['typename'] . '</td> </tr>'; } else { $result=DB_query("SELECT typeid, typename FROM debtortype ORDER BY typename",$db); - echo '<tr><td>' . _('Customer Type') . ':</td> + echo '<tr> + <td>' . _('Customer Type') . ':</td> <td><select name="typeid">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['typeid']==$myrow['typeid']){ @@ -765,45 +787,73 @@ <tr><td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> <td>' . $_POST['ClientSince'] . '</td></tr>'; - echo '</table></td><td><table class=selection>'; + echo '</table></td> + <td><table class="selection">'; - echo '<tr><td>' . _('Discount Percent') . ':</td> - <td>' . $_POST['Discount'] . '</td></tr>'; - echo '<tr><td>' . _('Discount Code') . ':</td> - <td>' . $_POST['DiscountCode'] . '</td></tr>'; - echo '<tr><td>' . _('Payment Discount Percent') . ':</td> - <td>' . $_POST['PymtDiscount'] . '</td></tr>'; - echo '<tr><td>' . _('Credit Limit') . ':</td> - <td>' . locale_number_format($_POST['CreditLimit'],2) . '</td></tr>'; - echo '<tr><td>' . _('Tax Reference') . ':</td> - <td>' . $_POST['TaxRef'] . '</td></tr>'; + echo '<tr> + <td>' . _('Discount Percent') . ':</td> + <td>' . $_POST['Discount'] . '</td> + </tr> + <tr> + <td>' . _('Discount Code') . ':</td> + <td>' . $_POST['DiscountCode'] . '</td> + </tr> + <tr> + <td>' . _('Payment Discount Percent') . ':</td> + <td>' . $_POST['PymtDiscount'] . '</td> + </tr> + <tr> + <td>' . _('Credit Limit') . ':</td> + <td>' . $_POST['CreditLimit'] . '</td> + </tr> + <tr> + <td>' . _('Tax Reference') . ':</td> + <td>' . $_POST['TaxRef'] . '</td> + </tr>'; } else { - echo '</select></td></tr> - <tr><td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> - <td><input ' . (in_array('ClientSince',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" size=11 maxlength=10 value=' . $_POST['ClientSince'] . '></td></tr>'; + echo '</select></td> + </tr> + <tr> + <td>' . _('Customer Since') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input ' . (in_array('ClientSince',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" size="11" maxlength="10" value="' . $_POST['ClientSince'] . '" /></td> + </tr> + </table></td> + <td><table class="selection">'; - echo '</table></td><td><table class="selection">'; - - echo '<tr><td>' . _('Discount Percent') . ':</td> - <td><input type="Text" name="Discount" class=number size=5 maxlength=4 value=' . $_POST['Discount'] . '></td></tr>'; - echo '<tr><td>' . _('Discount Code') . ':</td> - <td><input ' . (in_array('DiscountCode',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="DiscountCode" size=3 maxlength=2 value="' . $_POST['DiscountCode'] . '"></td></tr>'; - echo '<tr><td>' . _('Payment Discount Percent') . ':</td> - <td><input ' . (in_array('PymtDiscount',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" class=number name="PymtDiscount" size=5 maxlength=4 value=' . $_POST['PymtDiscount'] . '></td></tr>'; - echo '<tr><td>' . _('Credit Limit') . ':</td> - <td><input ' . (in_array('CreditLimit',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" class=number name="CreditLimit" size=16 maxlength=14 value=' . $_POST['CreditLimit'] . '></td></tr>'; - echo '<tr><td>' . _('Tax Reference') . ':</td> - <td><input type="Text" name="TaxRef" size=22 maxlength=20 value="' . $_POST['TaxRef'] . '"></td></tr>'; + echo '<tr> + <td>' . _('Discount Percent') . ':</td> + <td><input type="text" name="Discount" class="number" size="5" maxlength="4" value="' . $_POST['Discount'] . '" /></td> + </tr> + <tr> + <td>' . _('Discount Code') . ':</td> + <td><input ' . (in_array('DiscountCode',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="DiscountCode" size="3" maxlength="2" value="' . $_POST['DiscountCode'] . '"></td> + </tr> + <tr> + <td>' . _('Payment Discount Percent') . ':</td> + <td><input ' . (in_array('PymtDiscount',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="number" name="PymtDiscount" size="5" maxlength="4" value="' . $_POST['PymtDiscount'] . '"></td> + </tr> + <tr> + <td>' . _('Credit Limit') . ':</td> + <td><input ' . (in_array('CreditLimit',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="number" name="CreditLimit" size="16" maxlength="14" value="' . $_POST['CreditLimit'] . '" /></td> + </tr> + <tr> + <td>' . _('Tax Reference') . ':</td> + <td><input type="text" name="TaxRef" size="22" maxlength="20" value="' . $_POST['TaxRef'] . '" /></td> + </tr>'; } if (isset($_GET['Modify'])) { $result=DB_query("SELECT terms FROM paymentterms WHERE termsindicator='".$_POST['PaymentTerms']."'",$db); $myrow=DB_fetch_array($result); - echo '<tr><td>' . _('Payment Terms') . ':</td><td>' . $myrow['terms'] . '</td></tr>'; + echo '<tr> + <td>' . _('Payment Terms') . ':</td> + <td>' . $myrow['terms'] . '</td> + </tr>'; } else { $result=DB_query("SELECT terms, termsindicator FROM paymentterms",$db); - echo '<tr><td>' . _('Payment Terms') . ':</td> - <td><select name="PaymentTerms">'; + echo '<tr> + <td>' . _('Payment Terms') . ':</td> + <td><select name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['PaymentTerms']==$myrow['termsindicator']){ echo '<option selected value="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; @@ -812,18 +862,22 @@ } } //end while loop DB_data_seek($result,0); - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } if (isset($_GET['Modify'])) { $result=DB_query("SELECT reasondescription FROM holdreasons WHERE reasoncode='".$_POST['HoldReason']."'",$db); $myrow=DB_fetch_array($result); - echo '<tr><td>' . _('Credit Status') . ':</td> - <td>'.$myrow['reasondescription'] . '</td></tr>'; + echo '<tr> + <td>' . _('Credit Status') . ':</td> + <td>'.$myrow['reasondescription'] . '</td> + </tr>'; } else { $result=DB_query("SELECT reasoncode, reasondescription FROM holdreasons",$db); - echo '<tr><td>' . _('Credit Status') . ':</td> - <td><select name="HoldReason">'; + echo '<tr> + <td>' . _('Credit Status') . ':</td> + <td><select name="HoldReason">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['HoldReason']==$myrow['reasoncode']){ echo '<option selected value="'. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; @@ -832,18 +886,21 @@ } } //end while loop DB_data_seek($result,0); - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } if (isset($_GET['Modify'])) { $result=DB_query("SELECT currency FROM currencies WHERE currabrev='".$_POST['CurrCode']."'",$db); $myrow=DB_fetch_array($result); - echo '<tr><td>' . _('Credit Status') . ':</td> + echo '<tr> + <td>' . _('Credit Status') . ':</td> <td>' . $myrow['currency'] . '</td></tr>'; } else { $result=DB_query("SELECT currency, currabrev FROM currencies",$db); - echo '<tr><td>' . _('Customers Currency') . ':</td> - <td><select name="CurrCode">'; + echo '<tr> + <td>' . _('Customers Currency') . ':</td> + <td><select name="CurrCode">'; while ($myrow = DB_fetch_array($result)) { if ($_POST['CurrCode']==$myrow['currabrev']){ echo '<option selected value="'. $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; @@ -852,22 +909,26 @@ } } //end while loop DB_data_seek($result,0); - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } /*added lines 8/23/2007 by Morris Kelly to get po line parameter Y/N*/ if (isset($_GET['Modify'])) { if ($_POST['CustomerPOLine']==0){ - echo '<tr><td>' . _('Credit Status') . ':</td> + echo '<tr> + <td>' . _('Credit Status') . ':</td> <td>'._('No') . '</td> </tr>'; } else { - echo '<tr><td>' . _('Credit Status') . ':</td> + echo '<tr> + <td>' . _('Credit Status') . ':</td> <td>'._('Yes') . '</td> - </tr>'; + </tr>'; } } else { - echo '<tr><td>' . _('Require Customer PO Line on SO') . ':</td> - <td><select name="CustomerPOLine">'; + echo '<tr> + <td>' . _('Require Customer PO Line on SO') . ':</td> + <td><select name="CustomerPOLine">'; if ($_POST['CustomerPOLine']==0){ echo '<option selected value=0>' . _('No') . '</option>'; echo '<option value=1>' . _('Yes') . '</option>'; @@ -875,18 +936,26 @@ echo '<option value=0>' . _('No') . '</option>'; echo '<option selected value=1>' . _('Yes') . '</option>'; } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } if (isset($_GET['Modify'])) { if ($_POST['CustomerPOLine']==0){ - echo '<tr><td>' . _('Invoice Addressing') . ':</td><td>'._('Address to HO').'</td></tr>'; + echo '<tr> + <td>' . _('Invoice Addressing') . ':</td> + <td>'._('Address to HO').'</td> + </tr>'; } else { - echo '<tr><td>' . _('Invoice Addressing') . ':</td><td>'._('Address to Branch').'</td></tr>'; + echo '<tr> + <td>' . _('Invoice Addressing') . ':</td> + <td>'._('Address to Branch').'</td> + </tr>'; } } else { - echo '<tr><td>' . _('Invoice Addressing') . ':</td> - <td><select name="AddrInvBranch">'; + echo '<tr> + <td>' . _('Invoice Addressing') . ':</td> + <td><select name="AddrInvBranch">'; if ($_POST['InvAddrBranch']==0){ echo '<option selected value=0>' . _('Address to HO') . '</option>'; echo '<option value=1>' . _('Address to Branch') . '</option>'; @@ -896,11 +965,12 @@ } } - echo '</select></td></tr> - </table></td></tr>'; - echo '<tr><td colspan=2>'; + echo '</select></td> + </tr> + </table></td> + </tr> + <tr><td colspan="2">'; - if (isset($_GET['delete'])) { //User hit delete link on customer contacts /*Process this first before showing remaining contacts */ $resultupcc = DB_query("DELETE FROM custcontacts @@ -925,20 +995,22 @@ echo '<table class=selection>'; if (isset($_GET['Modify'])) { echo '<tr> - <th>' . _('Name') . '</th> - <th>' . _('Role') . '</th> - <th>' . _('Phone Number') . '</th> - <th>' . _('Email') . '</th> - <th>' . _('Notes') . '</th></tr>'; + <th>' . _('Name') . '</th> + <th>' . _('Role') . '</th> + <th>' . _('Phone Number') . '</th> + <th>' . _('Email') . '</th> + <th>' . _('Notes') . '</th> + </tr>'; } else { echo '<tr> - <th>' . _('Name') . '</th> - <th>' . _('Role') . '</th> - <th>' . _('Phone Number') . '</th> - <th>' . _('Email') . '</th> - <th>' . _('Notes') . '</th> - <th>' . _('Edit') . '</th> - <th colspan=2><input type="Submit" name="AddContact" value="Add Contact"></th></tr>'; + <th>' . _('Name') . '</th> + <th>' . _('Role') . '</th> + <th>' . _('Phone Number') . '</th> + <th>' . _('Email') . '</th> + <th>' . _('Notes') . '</th> + <th>' . _('Edit') . '</th> + <th colspan="2"><input type="Submit" name="AddContact" value="' . _('Add Contact') . '" /></th> + </tr>'; } $k=0; //row colour counter @@ -953,51 +1025,54 @@ if (isset($_GET['Modify'])) { printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href=mailto:%s>%s</a></td> - <td>%s</td> - </tr>', - $myrow['contactname'], - $myrow['role'], - $myrow['phoneno'], - $myrow['email'], - $myrow['email'], - $myrow['notes']); + <td>%s</td> + <td>%s</td> + <td><a href=mailto:%s>%s</a></td> + <td>%s</td> + </tr>', + $myrow['contactname'], + $myrow['role'], + $myrow['phoneno'], + $myrow['email'], + $myrow['email'], + $myrow['notes']); } else { printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href=mailto:%s>%s</a></td> - <td>%s</td> - <td><a href="AddCustomerContacts.php?Id=%s&DebtorNo=%s">'. _('Edit'). '</a></td> - <td><a href="%sID=%s&DebtorNo=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this customer contact?') . '\');">'. _('Delete'). '</a></td> - </tr>', - $myrow['contactname'], - $myrow['role'], - $myrow['phoneno'], - $myrow['email'], - $myrow['email'], - $myrow['notes'], - $myrow['contid'], - $myrow['debtorno'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', - $myrow['contid'], - $myrow['debtorno']); + <td>%s</td> + <td>%s</td> + <td><a href=mailto:%s>%s</a></td> + <td>%s</td> + <td><a href="AddCustomerContacts.php?Id=%s&DebtorNo=%s">'. _('Edit'). '</a></td> + <td><a href="%sID=%s&DebtorNo=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this customer contact?') . '\');">'. _('Delete'). '</a></td> + </tr>', + $myrow['contactname'], + $myrow['role'], + $myrow['phoneno'], + $myrow['email'], + $myrow['email'], + $myrow['notes'], + $myrow['contid'], + $myrow['debtorno'], + htmlspecialchars($_SERVER['PHP_SELF']) . '?', + $myrow['contid'], + $myrow['debtorno']); } }//END WHILE LIST LOOP echo '</table>'; - - echo'</td></tr></table>'; if (isset($_POST['New']) and $_POST['New']) { - echo '<div class="centre"><input type="submit" name="submit" value="' . _('Add New Customer') . - '"> <input type=submit name="Reset" value="' . _('Reset') . '"></div></form>'; - } else if (!isset($_GET['Modify'])){ - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Update Customer') . '">'; - echo ' <input type="Submit" name="delete" value="' . _('Delete Customer') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">'; + echo '<div class="centre"> + <input type="submit" name="submit" value="' . _('Add New Customer') . '" /> + <input type=submit name="Reset" value="' . _('Reset') . '" /> + </div> + </form>'; + } elseif (!isset($_GET['Modify'])){ + echo '<br /> + <div class="centre"> + <input type="submit" name="submit" value="' . _('Update Customer') . '" /> + <input type="Submit" name="delete" value="' . _('Delete Customer') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');" />'; } echo '</div>'; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-10-30 05:50:51 UTC (rev 4737) +++ trunk/DailyBankTransactions.php 2011-10-30 09:17:27 UTC (rev 4738) @@ -6,14 +6,16 @@ $title = _('Bank Transactions Inquiry'); include('includes/header.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . - _('Search') . '" alt="" />' . ' ' . $title.'</p>'; +echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . + _('Search') . '" alt="" />' . ' ' . $title.' + </p>'; if (!isset($_POST['Show'])) { echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection>'; + echo '<table class="selection">'; $SQL = "SELECT bankaccountname, bankaccounts.accountcode, @@ -26,7 +28,8 @@ $DbgMsg = _('The SQL used to retrieve the bank accounts was'); $AccountsResults = DB_query($SQL,$db,$ErrMsg,$DbgMsg); - echo '<tr><td>' . _('Bank Account') . ':</td> + echo '<tr> + <td>' . _('Bank Account') . ':</td> <td><select name="BankAccount">'; if (DB_num_rows($AccountsResults)==0){ @@ -49,18 +52,21 @@ } echo '</select></td></tr>'; } - echo '<tr><td>' . _('Transactions Dated From') . ':</td> - <td><input type="text" name="FromTransDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength=10 size=11 onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . - date($_SESSION['DefaultDateFormat']) . '"></td></tr> - <tr><td>' . _('Transactions Dated To') . ':</td> - <td><input type="text" name="ToTransDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength=10 size=11 - onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . - date($_SESSION['DefaultDateFormat']) . '"></td> - </tr>'; - - echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="Show" value="' . _('Show transactions'). '"></div>'; - echo '</form>'; + echo '<tr> + <td>' . _('Transactions Dated From') . ':</td> + <td><input type="text" name="FromTransDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" size="11" onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . + date($_SESSION['DefaultDateFormat']) . '" /></td> + </tr> + <tr> + <td>' . _('Transactions Dated To') . ':</td> + <td><input type="text" name="ToTransDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" size="11" onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . date($_SESSION['DefaultDateFormat']) . '" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="Show" value="' . _('Show transactions'). '" /> + </div> + </form>'; } else { $SQL = "SELECT bankaccountname, bankaccounts.currcode, @@ -78,6 +84,7 @@ banktrans.exrate, banktrans.banktranstype, banktrans.transdate, + banktrans.ref, bankaccounts.bankaccountname, systypes.typename, systypes.typeid @@ -95,20 +102,20 @@ prnMsg(_('There are no transactions for this account in the date range selected'), 'info'); } else { $BankDetailRow = DB_fetch_array($BankResult); - echo '<table class=selection> + echo '<table class="selection"> <tr> - <th colspan=7><font size=3 color=blue>' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . '</font></th> + <th colspan="8"><font size="3" color="blue">' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . '</font></th> + </tr> + <tr> + <th>' . ('Date') . '</th> + <th>'._('Transaction type').'</th> + <th>'._('Type').'</th> + <th>'._('Reference').'</th> + <th>'._('Amount in').' '.$BankDetailRow['currcode'].'</th> + <th>'._('Running Total').' '.$BankDetailRow['currcode'].'</th> + <th>'._('Amount in').' '.$_SESSION['CompanyRecord']['currencydefault'].'</th> + <th>'._('Running Total').' '.$_SESSION['CompanyRecord']['currencydefault'].'</th> </tr>'; - echo '<tr> - <th>' . ('Date') . '</th> - <th>'._('Transaction type').'</th> - <th>'._('Type').'</th> - <th>'._('Reference').'</th> - <th>'._('Amount in').' '.$BankDetailRow['currcode'].'</th> - <th>'._('Running Total').' '.$BankDetailRow['currcode'].'</th> - <th>'._('Amount in').' '.$_SESSION['CompanyRecord']['currencydefault'].'</th> - <th>'._('Running Total').' '.$_SESSION['CompanyRecord']['currencydefault'].'</th> - </tr>'; $AccountCurrTotal=0; $LocalCurrTotal =0; @@ -123,10 +130,10 @@ <td>'.$myrow['typename'].'</td> <td>'.$myrow['banktranstype'].'</td> <td>'.$myrow['ref'].'</td> - <td class=number>'.locale_number_format($myrow['amount'],$BankDetailRow['decimalplaces']).'</td> - <td class=number>'.locale_number_format($AccountCurrTotal,$BankDetailRow['decimalplaces']).'</td> - <td class=number>'.locale_number_format($myrow['amount']/$myrow['functionalexrate']/$myrow['exrate'],$_SESSION['CompanyRecord']['decimalplaces']).'</td> - <td class=number>'.locale_number_format($LocalCurrTotal,$_SESSION['CompanyRecord']['decimalplaces']).'</td> + <td class="number">'.locale_number_format($myrow['amount'],$BankDetailRow['decimalplaces']).'</td> + <td class="number">'.locale_number_format($AccountCurrTotal,$BankDetailRow['decimalplaces']).'</td> + <td class="number">'.locale_number_format($myrow['amount']/$myrow['functionalexrate']/$myrow['exrate'],$_SESSION['CompanyRecord']['decimalplaces']).'</td> + <td class="number">'.locale_number_format($LocalCurrTotal,$_SESSION['CompanyRecord']['decimalplaces']).'</td> </tr>'; } echo '</table>'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-10-30 05:50:51 UTC (rev 4737) +++ trunk/DailySalesInquiry.php 2011-10-30 09:17:27 UTC (rev 4738) @@ -7,17 +7,21 @@ include('includes/header.inc'); include('includes/DefineCartClass.php'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Daily Sales') . '" alt="" />' . ' ' . _('Daily Sales') . '</p>'; -echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div><br />'; +echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Daily Sales') . '" alt="" />' . ' ' . _('Daily Sales') . ' + </p>'; +echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div> + <br />'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table cellpadding=2 class=selection><tr>'; +echo '<table class="selection"> + <tr> + <td>' . _('Month to Show') . ':</td> + <td><select tabindex="1" name="MonthToShow">'; -echo '<td>' . _('Month to Show') . ':</td><td><select tabindex=1 name="MonthToShow">'; - if (!isset($_POST['MonthToShow'])){ $_POST['MonthToShow'] = GetPeriod(Date($_SESSION['DefaultDateFormat']),$db); } @@ -29,11 +33,12 @@ echo '<option selected Value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; $EndDateSQL = $PeriodRow['lastdate_in_period']; } else { - echo '<option Value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; + echo '<option value="' . $PeriodRow['periodno'] . '">' . MonthAndYearFromSQLDate($PeriodRow['lastdate_in_period']) . '</option>'; } } -echo '</select></td>'; -echo '<td>' . _('Salesperson') . ':</td><td><select tabindex=2 name="Salesperson">'; +echo '</select></td> + <td>' . _('Salesperson') . ':</td> + <td><select tabindex="2" name="Salesperson">'; $SalespeopleResult = DB_query("SELECT salesmancode, salesmanname FROM salesman",$db); if (!isset($_POST['Salesperson'])){ @@ -55,9 +60,11 @@ echo '</tr> </table> <br /> - <div class="centre"><input tabindex=4 type=submit name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '">'; -echo '</form></div>'; -echo '<br />'; + <div class="centre"> + <input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '" /> + </div> + </form> + <br />'; /*Now get and display the sales data returned */ if (mb_strpos($EndDateSQL,'/')) { $Date_Array = explode('/',$EndDateSQL); @@ -92,9 +99,8 @@ $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg($db); $SalesResult = DB_query($sql, $db,$ErrMsg); -echo '<table cellpadding=2 class=selection>'; - -echo'<tr> +echo '<table class="selection"> + <tr> <th>' . _('Sunday') . '</th> <th>' . _('Monday') . '</th> <th>' . _('Tuesday') . '</th> @@ -176,7 +182,7 @@ $AverageDailySales = 0; } -echo '<th colspan=7>' . _('Total Sales for month') . ': ' . locale_number_format($CumulativeTotalSales,0) . ' ' . _('GP%') . ': ' . locale_number_format($AverageGPPercent,1) . '% ' . _('Avg Daily Sales') . ': ' . locale_number_format($AverageDailySales,0) . '</th></tr>'; +echo '<th colspan="7">' . _('Total Sales for month') . ': ' . locale_number_format($CumulativeTotalSales,0) . ' ' . _('GP%') . ': ' . locale_number_format($AverageGPPercent,1) . '% ' . _('Avg Daily Sales') . ': ' . locale_number_format($AverageDailySales,0) . '</th></tr>'; echo '</table>'; Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-10-30 05:50:51 UTC (rev 4737) +++ trunk/DebtorsAtPeriodEnd.php 2011-10-30 09:17:27 UTC (rev 4738) @@ -125,7 +125,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - if (!isset($_POST['FromCriteria']) || !isset($_POST['ToCriteria'])) { + if (!isset($_POST['FromCriteria']) OR !isset($_POST['ToCriteria'])) { /*if $FromCriteria is not set then show a form to allow input */ @@ -134,13 +134,13 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('From Customer Code') .':</font></td> - <td><input tabindex=1 Type=text maxlength=6 size=7 name="FromCriteria" value="1"></td> + <td><input tabindex="1" type="text" maxlength="6" size="7" name="FromCriteria" value="1" /></td> </tr>'; echo '<tr><td>' . _('To Customer Code') . ':</td> - <td><input tabindex=2 type="text" maxlength=6 size=7 name="ToCriteria" value="zzzzzz"></td></tr>'; + <td><input tabindex="2" type="text" maxlength="6" size="7" name="ToCriteria" value="zzzzzz" /></td></tr>'; echo '<tr><td>' . _('Balances As At') . ':</td> - <td><select tabindex=3 name="PeriodEnd">'; + <td><select tabindex="3" name="PeriodEnd">'; $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC"; $Periods = DB_query($sql,$db,_('Could not retrieve period data because'),_('The SQL that failed to get the period data was')); Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-10-30 05:50:51 UTC (rev 4737) +++ trunk/Stocks.php 2011-10-30 09:17:27 UTC (rev 4738) @@ -778,7 +778,10 @@ $_POST['TaxCat'] = $myrow['taxcatid']; $_POST['DecimalPlaces'] = $myrow['decimalplaces']; $_POST['NextSerialNo'] = $myrow['nextserialno']; + $_POST['Pansize'] = $myrow['pansize']; + $_POST['ShrinkFactor'] = $myrow['shrinkfactor']; + echo '<tr><td>' . _('Item Code') . ':</td> <td>'.$StockID.'</td> </tr>'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-10-30 05:50:51 UTC (rev 4737) +++ trunk/doc/Change.log 2011-10-30 09:17:27 UTC (rev 4738) @@ -1,5 +1,6 @@ webERP Change Log +30/10/11 Exson: Modification to Stocks.php to avoid losing PanSize and ShrinkFactor 30/10/11 Phil: Made it so a saleman cannot be deleted if a user is setup referring only to this salesperson 29/10/11 High-Tech Bridge SA Security Research Lab <adv...@ht...> - sanitising $_SERVER['PHP_SELF'] and unquoted sql in reportwriter/FormMaker.php and reportwriter/ReportMaker.php 15/10/11 Phil: Tried to get correct characters for each language's thousands separator and decimal point in includes/LanguagesArray.php @@ -88,8 +89,8 @@ 28/6/11 Exson: MRPDemands.php links missing ? now fixed - script fixed for quoting variable name CamelCasing 27/6/11 Exson: MRP.php fixed modulus arithmetic that prevented suggesting production quantities where the quantity was less than 1 - the calculation using PanSize should round up to the nearest whole unit to manufacture 26/6/11 Phil: Fixed reference to $_POST['StockID'] in WorkOrderCosting.php when updating the new weighted average cost -26/6/11 Phil: Went back to no locale_number_formatting on PurchData.php -26/6/11 Phil: Went back to no locale_number_formatting on PO_Items.php price and quantity - Brian May still reporting issues +26/6/11 Phil: Went back to no number_formatting on PurchData.php +26/6/11 Phil: Went back to no number_formatting on PO_Items.php price and quantity - Brian May still reporting issues 25/6/11 Phil: Made PO_PDFPurchOrder.php have the description of the order item run over several lines where it exceeds the width of the space allowed for it 22/6/11 Phil: Added message to AccountGroups.php to show that child account groups cannot have changes to their account section, their profit and loss or balance sheet and sequence in TB as these properties belong only to parent account groups and are inherited by the kids 23/6/11 Phil: SelectOrderItems.php includes/DefineCartClass.php repaired credit checks @@ -143,7 +144,6 @@ 28/5/11 Phil: Reported by Daniel Brewer Fix SelectSalesOrder.php creation of PO with excluding redundant fields in purchorderdetails that were taken out. 28/5/11 Exson: UpdateCurrencyRateDaily was set to 1 when the option to enable it was clicked - should have been set to today's date in SystemParameters - fixed. Now no error reported bu ConvertSQLDate function when user enables update currencies daily. - 26/5/11 Version 4.04 Release 26/5/11 Ricard: require securitytoken 9 to allow user to see purchasing data in SelectProduct.php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |