From: <dai...@us...> - 2013-06-16 03:14:27
|
Revision: 6025 http://sourceforge.net/p/web-erp/reponame/6025 Author: daintree Date: 2013-06-16 03:14:24 +0000 (Sun, 16 Jun 2013) Log Message: ----------- fix GLTransInquiry.php for exchange diff double ups of analysis Modified Paths: -------------- trunk/CustomerReceipt.php trunk/GLTransInquiry.php Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2013-06-16 02:37:05 UTC (rev 6024) +++ trunk/CustomerReceipt.php 2013-06-16 03:14:24 UTC (rev 6025) @@ -887,6 +887,9 @@ if (!isset($_SESSION['ReceiptBatch']->Narrative)) { $_SESSION['ReceiptBatch']->Narrative=''; } +if (!isset($_POST['Currency'])){ + $_POST['Currency'] = $_SESSION['CompanyRecord']['currencydefault']; +} echo '<tr> <td>' . _('Narrative') . ':</td> <td><input tabindex="7" type="text" name="BatchNarrative" maxlength="50" size="52" value="' . $_SESSION['ReceiptBatch']->Narrative . '" /></td> Modified: trunk/GLTransInquiry.php =================================================================== --- trunk/GLTransInquiry.php 2013-06-16 02:37:05 UTC (rev 6024) +++ trunk/GLTransInquiry.php 2013-06-16 03:14:24 UTC (rev 6025) @@ -69,6 +69,7 @@ $Posted = _('Yes'); $CreditTotal = 0; $DebitTotal = 0; + $AnalysisCompleted = 'Not Yet'; $j=1; while ( $TransRow = DB_fetch_array($TransResult) ) { $TranDate = ConvertSQLDate($TransRow['trandate']); @@ -86,7 +87,7 @@ if ( $TransRow['posted']==0 ){ $Posted = _('No'); } - if ( $TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact'] ) { + if ( $TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact'] AND $AnalysisCompleted == 'Not Yet') { $URL = $RootPath . '/CustomerInquiry.php?CustomerID='; $date = '&TransAfterDate=' . $TranDate; @@ -101,7 +102,8 @@ WHERE debtortrans.type = '" . $TransRow['type'] . "' AND debtortrans.transno = '" . $_GET['TransNo']. "'"; $DetailResult = DB_query($DetailSQL,$db); - } elseif ( $TransRow['account'] == $_SESSION['CompanyRecord']['creditorsact'] ) { + + } elseif ( $TransRow['account'] == $_SESSION['CompanyRecord']['creditorsact'] AND $AnalysisCompleted == 'Not Yet' ) { $URL = $RootPath . '/SupplierInquiry.php?SupplierID='; $date = '&FromDate=' . $TranDate; @@ -115,6 +117,7 @@ WHERE supptrans.type = '" . $TransRow['type'] . "' AND supptrans.transno = '" . $_GET['TransNo'] . "'"; $DetailResult = DB_query($DetailSQL,$db); + } else { $URL = $RootPath . '/GLAccountInquiry.php?Account=' . $TransRow['account']; @@ -139,14 +142,15 @@ </tr>'; } - if ($DetailResult) { + if ($DetailResult AND $AnalysisCompleted == 'Not Yet') { + while ( $DetailRow = DB_fetch_array($DetailResult) ) { if ( $TransRow['amount'] > 0){ if ($TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact']) { $Debit = locale_number_format(($DetailRow['ovamount'] + $DetailRow['ovgst']+ $DetailRow['ovfreight']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); $Credit = ' '; } else { - $Debit = locale_number_format((-$DetailRow['ovamount'] - $DetailRow['ovgst']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); + $Debit = locale_number_format(($DetailRow['ovamount'] + $DetailRow['ovgst']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); $Credit = ' '; } } else { @@ -154,7 +158,7 @@ $Credit = locale_number_format(-($DetailRow['ovamount'] + $DetailRow['ovgst'] + $DetailRow['ovfreight']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); $Debit = ' '; } else { - $Credit = locale_number_format(($DetailRow['ovamount'] + $DetailRow['ovgst']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); + $Credit = locale_number_format(-($DetailRow['ovamount'] + $DetailRow['ovgst']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); $Debit = ' '; } } @@ -176,6 +180,7 @@ </tr>'; } DB_free_result($DetailResult); + $AnalysisCompleted = 'Done'; } } DB_free_result($TransResult); |
From: <rc...@us...> - 2013-06-17 17:36:56
|
Revision: 6029 http://sourceforge.net/p/web-erp/reponame/6029 Author: rchacon Date: 2013-06-17 17:36:52 +0000 (Mon, 17 Jun 2013) Log Message: ----------- Adds company, delivery and supplier country. Modified Paths: -------------- trunk/PO_PDFPurchOrder.php trunk/companies/weberpdemo/FormDesigns/PurchaseOrder.xml trunk/includes/PO_PDFOrderPageHeader.inc Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2013-06-17 15:12:18 UTC (rev 6028) +++ trunk/PO_PDFPurchOrder.php 2013-06-17 17:36:52 UTC (rev 6029) @@ -83,6 +83,7 @@ suppliers.address3, suppliers.address4, suppliers.address5, + suppliers.address6, purchorders.comments, purchorders.orddate, purchorders.rate, @@ -167,8 +168,9 @@ $POHeader['address1'] = str_pad('', 40, 'x'); $POHeader['address2'] = str_pad('', 40, 'x'); $POHeader['address3'] = str_pad('', 40, 'x'); - $POHeader['address4'] = str_pad('', 30, 'x'); - $POHeader['address5'] = str_pad('', 30, 'x'); + $POHeader['address4'] = str_pad('', 40, 'x'); + $POHeader['address5'] = str_pad('', 20, 'x'); + $POHeader['address6'] = str_pad('', 15, 'x'); $POHeader['comments'] = str_pad('', 50, 'x'); $POHeader['orddate'] = '1900-01-01'; $POHeader['rate'] = '0.0000'; Modified: trunk/companies/weberpdemo/FormDesigns/PurchaseOrder.xml =================================================================== --- trunk/companies/weberpdemo/FormDesigns/PurchaseOrder.xml 2013-06-17 15:12:18 UTC (rev 6028) +++ trunk/companies/weberpdemo/FormDesigns/PurchaseOrder.xml 2013-06-17 17:36:52 UTC (rev 6029) @@ -3,10 +3,10 @@ <PaperSize name="Paper size">A4_Landscape</PaperSize> <LineHeight name="Line height">16</LineHeight> <logo type="image" name="Logo" id="Logo"> - <x>0</x> - <y>62</y> + <x>-5</x> + <y>124</y> <width>0</width> - <height>60</height> + <height>120</height> </logo> <OrderNumber type="SimpleText" name="Order Number" id="OrderNumber"> <FontSize>15</FontSize> @@ -23,16 +23,16 @@ <x>762</x> <y>30</y> </PageNumber> - <TaxAuthority type="SimpleText" name="Tax Authority" id="TaxAuthority"> + <CompanyName type="SimpleText" name="Company name" id="CompanyName"> <FontSize>10</FontSize> <x>40</x> - <y>106</y> - </TaxAuthority> - <CompanyName type="SimpleText" name="Company name" id="CompanyName"> + <y>112</y> + </CompanyName> + <TaxAuthority type="SimpleText" name="Tax Authority" id="TaxAuthority"> <FontSize>10</FontSize> <x>40</x> <y>122</y> - </CompanyName> + </TaxAuthority> <CompanyAddress type="ElementArray" name="Company address"> <Line1 type="SimpleText" name="Line 1" id="CompanyAddress1"> <FontSize>10</FontSize> @@ -106,18 +106,13 @@ <x>448</x> <y>202</y> </Line5> - <Line6 type="SimpleText" name="Line 6" id="DeliveryAddress6"> - <FontSize>12</FontSize> - <x>448</x> - <y>214</y> - </Line6> </DeliveryAddress> <DeliveryAddressBox type="CurvedRectangle" name="Delivery address box" id="DeliveryAddressBox"> - <x>446</x> - <y>145</y> + <x>436</x> + <y>142</y> <width>240</width> - <height>80</height> - <radius>10</radius> + <height>72</height> + <radius>12</radius> </DeliveryAddressBox> <SupplierName type="SimpleText" name="Supplier name" id="SupplierName"> <FontSize>12</FontSize> @@ -246,7 +241,7 @@ <Column3 type="DataText" name="Column 3" id="Data3"> <FontSize>10</FontSize> <x>441</x> - <Length>85</Length> + <Length>40</Length> </Column3> <Column4 type="DataText" name="Column 4" id="Data4"> <FontSize>10</FontSize> @@ -277,7 +272,7 @@ <OrderTotal type="MultiLineText" name="Order total" id="OrderTotal"> <FontSize>14</FontSize> <x>665</x> - <y>563</y> + <y>549</y> <Length>125</Length> </OrderTotal> </form> Modified: trunk/includes/PO_PDFOrderPageHeader.inc =================================================================== --- trunk/includes/PO_PDFOrderPageHeader.inc 2013-06-17 15:12:18 UTC (rev 6028) +++ trunk/includes/PO_PDFOrderPageHeader.inc 2013-06-17 17:36:52 UTC (rev 6029) @@ -23,7 +23,7 @@ $pdf->addText($FormDesign->CompanyAddress->Line2->x,$Page_Height - $FormDesign->CompanyAddress->Line2->y, $FormDesign->CompanyAddress->Line2->FontSize, $_SESSION['CompanyRecord']['regoffice2']); $pdf->addText($FormDesign->CompanyAddress->Line3->x,$Page_Height - $FormDesign->CompanyAddress->Line3->y, $FormDesign->CompanyAddress->Line3->FontSize, $_SESSION['CompanyRecord']['regoffice3']); $pdf->addText($FormDesign->CompanyAddress->Line4->x,$Page_Height - $FormDesign->CompanyAddress->Line4->y, $FormDesign->CompanyAddress->Line4->FontSize, $_SESSION['CompanyRecord']['regoffice4']); -$pdf->addText($FormDesign->CompanyAddress->Line5->x,$Page_Height - $FormDesign->CompanyAddress->Line5->y, $FormDesign->CompanyAddress->Line5->FontSize, $_SESSION['CompanyRecord']['regoffice5']); +$pdf->addText($FormDesign->CompanyAddress->Line5->x,$Page_Height - $FormDesign->CompanyAddress->Line5->y, $FormDesign->CompanyAddress->Line5->FontSize, $_SESSION['CompanyRecord']['regoffice5'] . ' ' . $_SESSION['CompanyRecord']['regoffice6']); // Includes company postal code and country. $pdf->addText($FormDesign->CompanyPhone->x,$Page_Height - $FormDesign->CompanyPhone->y, $FormDesign->CompanyPhone->FontSize, _('Tel'). ': ' . $_SESSION['CompanyRecord']['telephone']); $pdf->addText($FormDesign->CompanyFax->x,$Page_Height - $FormDesign->CompanyFax->y, $FormDesign->CompanyFax->FontSize, _('Fax').': ' . $_SESSION['CompanyRecord']['fax']); $pdf->addText($FormDesign->CompanyEmail->x,$Page_Height - $FormDesign->CompanyEmail->y, $FormDesign->CompanyEmail->FontSize, _('Email'). ': ' .$_SESSION['CompanyRecord']['email']); @@ -33,8 +33,7 @@ $pdf->addText($FormDesign->DeliveryAddress->Line2->x,$Page_Height - $FormDesign->DeliveryAddress->Line2->y, $FormDesign->DeliveryAddress->Line2->FontSize, $POHeader['deladd2']); $pdf->addText($FormDesign->DeliveryAddress->Line3->x,$Page_Height - $FormDesign->DeliveryAddress->Line3->y, $FormDesign->DeliveryAddress->Line3->FontSize, $POHeader['deladd3']); $pdf->addText($FormDesign->DeliveryAddress->Line4->x,$Page_Height - $FormDesign->DeliveryAddress->Line4->y, $FormDesign->DeliveryAddress->Line4->FontSize, $POHeader['deladd4']); -$pdf->addText($FormDesign->DeliveryAddress->Line5->x,$Page_Height - $FormDesign->DeliveryAddress->Line5->y, $FormDesign->DeliveryAddress->Line5->FontSize, $POHeader['deladd5']); -$pdf->addText($FormDesign->DeliveryAddress->Line6->x,$Page_Height - $FormDesign->DeliveryAddress->Line6->y, $FormDesign->DeliveryAddress->Line6->FontSize, $POHeader['deladd6']); +$pdf->addText($FormDesign->DeliveryAddress->Line5->x,$Page_Height - $FormDesign->DeliveryAddress->Line5->y, $FormDesign->DeliveryAddress->Line5->FontSize, $POHeader['deladd5'] . ' ' . $POHeader['deladd6']); // Includes delivery postal code and country. /*draw a nice curved corner box around the delivery to address */ $pdf->RoundRectangle($FormDesign->DeliveryAddressBox->x, $Page_Height - $FormDesign->DeliveryAddressBox->y,$FormDesign->DeliveryAddressBox->width, $FormDesign->DeliveryAddressBox->height, $FormDesign->DeliveryAddressBox->radius); /*Now the Supplier details */ @@ -44,7 +43,7 @@ $pdf->addText($FormDesign->SupplierAddress->Line2->x,$Page_Height - $FormDesign->SupplierAddress->Line2->y, $FormDesign->SupplierAddress->Line2->FontSize, $POHeader['address2']); $pdf->addText($FormDesign->SupplierAddress->Line3->x,$Page_Height - $FormDesign->SupplierAddress->Line3->y, $FormDesign->SupplierAddress->Line3->FontSize, $POHeader['address3']); $pdf->addText($FormDesign->SupplierAddress->Line4->x,$Page_Height - $FormDesign->SupplierAddress->Line4->y, $FormDesign->SupplierAddress->Line4->FontSize, $POHeader['address4']); -$pdf->addText($FormDesign->SupplierAddress->Line5->x,$Page_Height - $FormDesign->SupplierAddress->Line5->y, $FormDesign->SupplierAddress->Line5->FontSize, $POHeader['address5']); +$pdf->addText($FormDesign->SupplierAddress->Line5->x,$Page_Height - $FormDesign->SupplierAddress->Line5->y, $FormDesign->SupplierAddress->Line5->FontSize, $POHeader['address5'] . ' ' . $POHeader['address6']); // Includes supplier postal code and country. /*Now the Requisition Number */ $pdf->addText($FormDesign->RequisitionNumber->x,$Page_Height - $FormDesign->RequisitionNumber->y, $FormDesign->RequisitionNumber->FontSize, _('Requisition Number') . ':' ); $pdf->addText($FormDesign->RequisitionNumber->x+120,$Page_Height - $FormDesign->RequisitionNumber->y, $FormDesign->RequisitionNumber->FontSize, $POHeader['requisitionno']); |
From: <dai...@us...> - 2013-06-18 07:17:28
|
Revision: 6030 http://sourceforge.net/p/web-erp/reponame/6030 Author: daintree Date: 2013-06-18 07:17:20 +0000 (Tue, 18 Jun 2013) Log Message: ----------- Paul Harness fix to GoodsReceived.php Modified Paths: -------------- trunk/GLTransInquiry.php trunk/GoodsReceived.php trunk/doc/Change.log Modified: trunk/GLTransInquiry.php =================================================================== --- trunk/GLTransInquiry.php 2013-06-17 17:36:52 UTC (rev 6029) +++ trunk/GLTransInquiry.php 2013-06-18 07:17:20 UTC (rev 6030) @@ -89,14 +89,14 @@ } if ( $TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact'] AND $AnalysisCompleted == 'Not Yet') { $URL = $RootPath . '/CustomerInquiry.php?CustomerID='; - $date = '&TransAfterDate=' . $TranDate; + $FromDate = '&TransAfterDate=' . $TranDate; - $DetailSQL = "SELECT debtortrans.debtorno, + $DetailSQL = "SELECT debtortrans.debtorno AS otherpartycode, debtortrans.ovamount, debtortrans.ovgst, debtortrans.ovfreight, debtortrans.rate, - debtorsmaster.name + debtorsmaster.name AS otherparty FROM debtortrans INNER JOIN debtorsmaster ON debtortrans.debtorno = debtorsmaster.debtorno WHERE debtortrans.type = '" . $TransRow['type'] . "' @@ -105,13 +105,13 @@ } elseif ( $TransRow['account'] == $_SESSION['CompanyRecord']['creditorsact'] AND $AnalysisCompleted == 'Not Yet' ) { $URL = $RootPath . '/SupplierInquiry.php?SupplierID='; - $date = '&FromDate=' . $TranDate; + $FromDate = '&FromDate=' . $TranDate; - $DetailSQL = "SELECT supptrans.supplierno, + $DetailSQL = "SELECT supptrans.supplierno AS otherpartycode, supptrans.ovamount, supptrans.ovgst, supptrans.rate, - suppliers.suppname + suppliers.suppname AS otherparty FROM supptrans INNER JOIN suppliers ON supptrans.supplierno = suppliers.supplierid WHERE supptrans.type = '" . $TransRow['type'] . "' @@ -150,7 +150,7 @@ $Debit = locale_number_format(($DetailRow['ovamount'] + $DetailRow['ovgst']+ $DetailRow['ovfreight']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); $Credit = ' '; } else { - $Debit = locale_number_format(($DetailRow['ovamount'] + $DetailRow['ovgst']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); + $Debit = locale_number_format(-($DetailRow['ovamount'] + $DetailRow['ovgst']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); $Credit = ' '; } } else { @@ -158,7 +158,7 @@ $Credit = locale_number_format(-($DetailRow['ovamount'] + $DetailRow['ovgst'] + $DetailRow['ovfreight']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); $Debit = ' '; } else { - $Credit = locale_number_format(-($DetailRow['ovamount'] + $DetailRow['ovgst']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); + $Credit = locale_number_format(($DetailRow['ovamount'] + $DetailRow['ovgst']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); $Debit = ' '; } } @@ -172,7 +172,7 @@ } echo '<td>' . $TranDate . '</td> <td>' . MonthAndYearFromSQLDate($TransRow['lastdate_in_period']) . '</td> - <td><a href="' . $URL . $DetailRow[0] . $date . '">' . $TransRow['accountname'] . ' - ' . $DetailRow[5] . '</a></td> + <td><a href="' . $URL . $DetailRow['otherpartycode'] . $FromDate . '">' . $TransRow['accountname'] . ' - ' . $DetailRow['otherparty'] . '</a></td> <td class="number">' . $Debit . '</td> <td class="number">' . $Credit . '</td> <td>' . $TransRow['narrative'] . '</td> Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2013-06-17 17:36:52 UTC (rev 6029) +++ trunk/GoodsReceived.php 2013-06-18 07:17:20 UTC (rev 6030) @@ -543,7 +543,7 @@ if (trim($Item->BundleRef) != ''){ if ($AlreadyExistsRow[0]>0){ if ($OrderLine->Serialised == 1) { - $SQL = "UPDATE stockserialitems SET quantity = '" . $Item->BundleQty . " "; + $SQL = "UPDATE stockserialitems SET quantity = '" . $Item->BundleQty . "'"; } else { $SQL = "UPDATE stockserialitems SET quantity = quantity + '" . $Item->BundleQty . "'"; } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2013-06-17 17:36:52 UTC (rev 6029) +++ trunk/doc/Change.log 2013-06-18 07:17:20 UTC (rev 6030) @@ -1,5 +1,6 @@ OwebERP Change Log +17/6/13 Paul Harness: Fix sql query of goods received when a serial number is already present. GoodsReceived.php 12/6/13 tomglare: SelectSupplier - improve handling if single supplier selected 25/5/13 Phil: CountriesArray.php now uses the index as the ISO 2 character code for the country. 25/5/13 Phil: Currencies.php now takes advantage of Rafael's new CurrenciesArray - to ensure correct ISO 3 letter abbreviation is selected - also allows for translation of currency names |
From: <dai...@us...> - 2013-06-21 22:48:15
|
Revision: 6031 http://sourceforge.net/p/web-erp/reponame/6031 Author: daintree Date: 2013-06-21 22:48:11 +0000 (Fri, 21 Jun 2013) Log Message: ----------- 21/6/13 Phil: ContractCosting.php fix references to contract issues object which should just have been an array. 18/6/13 Phil: Reworked the display of stock category properties on the SelectProduct.php inquiry 18/6/13 Tim: Z_ImportGLTransactions.php new script for importing GL payments, receipts or journals from a CSV file 17/6/13 Paul Harness: Fix sql query of goods received when a serial number is already present. GoodsReceived.php Modified Paths: -------------- trunk/ContractCosting.php trunk/Contracts.php trunk/SelectProduct.php trunk/Z_poRebuildDefault.php trunk/doc/Change.log trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/ContractCosting.php =================================================================== --- trunk/ContractCosting.php 2013-06-18 07:17:20 UTC (rev 6030) +++ trunk/ContractCosting.php 2013-06-21 22:48:11 UTC (rev 6031) @@ -44,13 +44,13 @@ $InventoryIssuesResult = DB_query($sql,$db,$ErrMsg); $InventoryIssues = array(); while ($InventoryIssuesRow = DB_fetch_array($InventoryIssuesResult)){ - $InventoryIssues[$InventoryIssuesRow['stockid']]->StockID = $InventoryIssuesRow['stockid']; - $InventoryIssues[$InventoryIssuesRow['stockid']]->Description = $InventoryIssuesRow['description']; - $InventoryIssues[$InventoryIssuesRow['stockid']]->Quantity = $InventoryIssuesRow['quantity']; - $InventoryIssues[$InventoryIssuesRow['stockid']]->TotalCost = $InventoryIssuesRow['totalcost']; - $InventoryIssues[$InventoryIssuesRow['stockid']]->Units = $InventoryIssuesRow['units']; - $InventoryIssues[$InventoryIssuesRow['stockid']]->DecimalPlaces = $InventoryIssuesRow['decimalplaces']; - $InventoryIssues[$InventoryIssuesRow['stockid']]->Matched = 0; + $InventoryIssues[$InventoryIssuesRow['stockid']]['StockID'] = $InventoryIssuesRow['stockid']; + $InventoryIssues[$InventoryIssuesRow['stockid']]['Description'] = $InventoryIssuesRow['description']; + $InventoryIssues[$InventoryIssuesRow['stockid']]['Quantity'] = $InventoryIssuesRow['quantity']; + $InventoryIssues[$InventoryIssuesRow['stockid']]['TotalCost'] = $InventoryIssuesRow['totalcost']; + $InventoryIssues[$InventoryIssuesRow['stockid']]['Units'] = $InventoryIssuesRow['units']; + $InventoryIssues[$InventoryIssuesRow['stockid']]['DecimalPlaces'] = $InventoryIssuesRow['decimalplaces']; + $InventoryIssues[$InventoryIssuesRow['stockid']]['Matched'] = 0; } @@ -104,12 +104,12 @@ $ContractBOMBudget += ($Component->ItemCost * $Component->Quantity); if (isset($InventoryIssues[$Component->StockID])){ - $InventoryIssues[$Component->StockID]->Matched=1; + $InventoryIssues[$Component->StockID]['Matched']=1; echo '<td colspan="2" align="center">' . _('Actual usage') . '</td> - <td class="number">' . locale_number_format(-$InventoryIssues[$Component->StockID]->Quantity,$Component->DecimalPlaces) . '</td> - <td>' . $InventoryIssues[$Component->StockID]->Units . '</td> - <td class="number">' . locale_number_format($InventoryIssues[$Component->StockID]->TotalCost/$InventoryIssues[$Component->StockID]->Quantity,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td>' . locale_number_format(-$InventoryIssues[$Component->StockID]->TotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format(-$InventoryIssues[$Component->StockID]['Quantity'],$Component->DecimalPlaces) . '</td> + <td>' . $InventoryIssues[$Component->StockID]['Units'] . '</td> + <td class="number">' . locale_number_format($InventoryIssues[$Component->StockID]['TotalCost']/$InventoryIssues[$Component->StockID]['Quantity'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td>' . locale_number_format(-$InventoryIssues[$Component->StockID]['TotalCost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr>'; } else { echo '<td colspan="6"></td> @@ -118,18 +118,18 @@ } foreach ($InventoryIssues as $Component) { //actual inventory components used - $ContractBOMActual -=$Component->TotalCost; - if ($Component->Matched == 0) { //then its a component that wasn't budget for + $ContractBOMActual -=$Component['TotalCost']; + if ($Component['Matched'] == 0) { //then its a component that wasn't budget for echo '<tr> <td colspan="6"></td> - <td>' . $Component->StockID . '</td> - <td>' . $Component->Description . '</td> - <td class="number">' . locale_number_format(-$Component->Quantity,$Component->DecimalPlaces) . '</td> - <td>' . $Component->Units . '</td> - <td class="number">' . locale_number_format($Component->TotalCost/$Component->Quantity,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format(-$Component->TotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td>' . $Component['StockID'] . '</td> + <td>' . $Component['Description'] . '</td> + <td class="number">' . locale_number_format(-$Component['Quantity'],$Component['DecimalPlaces']) . '</td> + <td>' . $Component['Units'] . '</td> + <td class="number">' . locale_number_format($Component['TotalCost']/$Component['Quantity'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format(-$Component['TotalCost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr>'; - } //end if its a component not originally budget for + } //end if its a component not originally budgeted for } echo '<tr> @@ -162,13 +162,17 @@ </tr>'; $OtherReqtsBudget += ($Requirement->CostPerUnit * $Requirement->Quantity); } -echo '<tr><th colspan="3" align="right"><b>' . _('Budgeted Other Costs') . '</b></th><th class="number"><b>' . locale_number_format($OtherReqtsBudget,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></th></tr> +echo '<tr> + <th colspan="3" align="right"><b>' . _('Budgeted Other Costs') . '</b></th> + <th class="number"><b>' . locale_number_format($OtherReqtsBudget,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></th> + </tr> </table></td>'; //Now other requirements actual in a sub table echo '<td colspan="6"> <table class="selection"> - <tr><th>' . _('Supplier') . '</th> + <tr> + <th>' . _('Supplier') . '</th> <th>' . _('Reference') . '</th> <th>' . _('Date') . '</th> <th>' . _('Requirement') . '</th> @@ -197,25 +201,31 @@ } else { $Anticipated = _('Yes'); } - echo '<tr><td>' . $OtherChargesRow['supplierno'] . '</td> + echo '<tr> + <td>' . $OtherChargesRow['supplierno'] . '</td> <td>' . $OtherChargesRow['suppreference'] . '</td> <td>' .ConvertSQLDate($OtherChargesRow['trandate']) . '</td> <td>' . $OtherChargesRow['narrative'] . '</td> <td class="number">' . locale_number_format($OtherChargesRow['amount'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td>' . $Anticipated . '</td> - </tr>'; + </tr>'; $OtherReqtsActual +=$OtherChargesRow['amount']; } -echo '<tr><th colspan="4" align="right"><b>' . _('Actual Other Costs') . '</b></th><th class="number"><b>' . locale_number_format($OtherReqtsActual,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></th></tr> - </table></td></tr>'; -echo '<tr><td colspan="5"><b>' . _('Total Budget Contract Cost') . '</b></td> - <td class="number"><b>' . locale_number_format($OtherReqtsBudget+$ContractBOMBudget,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> - <td colspan="5"><b>' . _('Total Actual Contract Cost') . '</b></td> - <td class="number"><b>' . locale_number_format($OtherReqtsActual+$ContractBOMActual,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td></tr>'; +echo '<tr> + <th colspan="4" align="right"><b>' . _('Actual Other Costs') . '</b></th> + <th class="number"><b>' . locale_number_format($OtherReqtsActual,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></th> + </tr> + </table></td> + </tr> + <tr> + <td colspan="5"><b>' . _('Total Budget Contract Cost') . '</b></td> + <td class="number"><b>' . locale_number_format($OtherReqtsBudget+$ContractBOMBudget,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> + <td colspan="5"><b>' . _('Total Actual Contract Cost') . '</b></td> + <td class="number"><b>' . locale_number_format($OtherReqtsActual+$ContractBOMActual,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> + </tr> + </table>'; -echo '</table>'; - //Do the processing here after the variances are all calculated above if (isset($_POST['CloseContract']) AND $_SESSION['Contract'.$identifier]->Status==2){ Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2013-06-18 07:17:20 UTC (rev 6030) +++ trunk/Contracts.php 2013-06-21 22:48:11 UTC (rev 6031) @@ -793,16 +793,16 @@ $k=1; } if ($LastCustomer != $myrow['name']) { - echo '<td>'.htmlentities($myrow['name'], ENT_QUOTES,'UTF-8').'</td>'; + echo '<td>'. $myrow['name'] .'</td>'; } else { echo '<td></td>'; } - echo '<td><input type="submit" name="Submit'.$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>'.htmlentities($myrow['contactname'], ENT_QUOTES,'UTF-8').'</td> - <td>'.$myrow['phoneno'].'</td> - <td>'.$myrow['faxno'].'</td> + echo '<td><input type="submit" name="Submit'.$j.'" value="' . $myrow['brname'] . '" /></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> </tr>'; $LastCustomer=$myrow['name']; $j++; Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2013-06-18 07:17:20 UTC (rev 6030) +++ trunk/SelectProduct.php 2013-06-21 22:48:11 UTC (rev 6031) @@ -67,7 +67,8 @@ stockmaster.eoq, stockmaster.volume, stockmaster.kgs, - stockcategory.categorydescription + stockcategory.categorydescription, + stockmaster.categoryid FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid WHERE stockid='" . $StockID . "'", $db); @@ -173,22 +174,8 @@ } else { $GP = _('N/A'); } - echo $GP . '%' . '</td></tr>'; - while ($PriceRow = DB_fetch_row($PriceResult)) { - $Price = $PriceRow[1]; - echo '<tr><td></td> - <th>' . $PriceRow[0] . '</th> - <td class="select">' . locale_number_format($Price, $_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <th class="number">' . _('Gross Profit') . '</th> - <td class="select">'; - if ($Price > 0) { - $GP = locale_number_format(($Price - $Cost) * 100 / $Price, 1); - } else { - $GP = _('N/A'); - } - echo $GP . '%' . '</td></tr>'; - echo '</td></tr>'; - } + echo $GP . '%' . '</td> + </tr>'; } if ($myrow['mbflag'] == 'K' OR $myrow['mbflag'] == 'A') { $CostResult = DB_query("SELECT SUM(bom.quantity * (stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost)) AS cost @@ -203,23 +190,21 @@ } else { $Cost = $myrow['cost']; } - echo '<tr><th class="number">' . _('Cost') . '</th> - <td class="select">' . locale_number_format($Cost, $_SESSION['StandardCostDecimalPlaces']) . '</td></tr>'; + echo '<tr> + <th class="number">' . _('Cost') . '</th> + <td class="select">' . locale_number_format($Cost, $_SESSION['StandardCostDecimalPlaces']) . '</td> + </tr>'; } //end of if PricesSecuirty allows viewing of prices echo '</table>'; //end of first nested table // Item Category Property mod: display the item properties echo '<table>'; - $CatValResult = DB_query("SELECT categoryid - FROM stockmaster - WHERE stockid='" . $StockID . "'", $db); - $CatValRow = DB_fetch_row($CatValResult); - $CatValue = $CatValRow[0]; + $sql = "SELECT stkcatpropid, label, controltype, defaultvalue FROM stockcatproperties - WHERE categoryid ='" . $CatValue . "' + WHERE categoryid ='" . $myrow['categoryid'] . "' AND reqatsalesorder =0 ORDER BY stkcatpropid"; $PropertiesResult = DB_query($sql, $db); @@ -231,34 +216,31 @@ WHERE stockid='" . $StockID . "' AND stkcatpropid ='" . $PropertyRow['stkcatpropid']."'", $db); $PropValRow = DB_fetch_row($PropValResult); - $PropertyValue = $PropValRow[0]; - echo '<tr><th align="right">' . $PropertyRow['label'] . ':</th>'; + if (DB_num_rows($PropValResult)==0){ + $PropertyValue = _('Not Set'); + } else { + $PropertyValue = $PropValRow[0]; + } + echo '<tr> + <th align="right">' . $PropertyRow['label'] . ':</th>'; switch ($PropertyRow['controltype']) { - case 0; //textbox - echo '<td class="select" style="width:60px"><input type="text" name="PropValue' . $PropertyCounter . '" value="' . $PropertyValue . '" />'; - break; - case 1; //select box - $OptionValues = explode(',', $PropertyRow['defaultvalue']); - echo '<td align="left" style="width:60px"><select name="PropValue' . $PropertyCounter . '">'; - foreach($OptionValues as $PropertyOptionValue) { - if ($PropertyOptionValue == $PropertyValue) { - echo '<option selected="selected" value="' . $PropertyOptionValue . '">' . $PropertyOptionValue . '</option>'; - } else { - echo '<option value="' . $PropertyOptionValue . '">' . $PropertyOptionValue . '</option>'; - } - } - echo '</select>'; - break; - case 2; //checkbox - echo '<td align="left" style="width:60px"><input type="checkbox" name="PropValue' . $PropertyCounter . '"'; - if ($PropertyValue == 1) { - echo ' checked'; - } - echo ' />'; -break; -} //end switch -echo '</td></tr>'; -$PropertyCounter++; + case 0: + case 1: + echo '<td class="select" style="width:60px">' . $PropertyValue; + break; + case 2; //checkbox + echo '<td class="select" style="width:60px">'; + if ($PropertyValue == _('Not Set')){ + echo _('Not Set'); + } elseif ($PropertyValue == 1){ + echo _('Yes'); + } else { + echo _('No'); + } + break; + } //end switch + echo '</td></tr>'; + $PropertyCounter++; } //end loop round properties for the item category echo '</table></td>'; //end of Item Category Property mod echo '<td style="width:15%; vertical-align:top"> Modified: trunk/Z_poRebuildDefault.php =================================================================== --- trunk/Z_poRebuildDefault.php 2013-06-18 07:17:20 UTC (rev 6030) +++ trunk/Z_poRebuildDefault.php 2013-06-21 22:48:11 UTC (rev 6031) @@ -16,7 +16,7 @@ $PathToDefault = './locale/en_GB.utf8/LC_MESSAGES/messages.po'; $FilesToInclude = '*.php includes/*.inc includes/*.php api/*.php reportwriter/languages/en_US/reports.php'; -$xgettextCmd = 'xgettext --no-wrap -L php -o ' . $PathToDefault . ' ' . $FilesToInclude; +$xgettextCmd = 'xgettext --no-wrap --from-code=utf-8 -L php -o ' . $PathToDefault . ' ' . $FilesToInclude; echo "<br /> <a href='" . $RootPath . "/Z_poAdmin.php'>" . _('Back to the translation menu') . "</a>"; echo '<br /><br /> ' . _('Utility page to rebuild the system default language file'); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2013-06-18 07:17:20 UTC (rev 6030) +++ trunk/doc/Change.log 2013-06-21 22:48:11 UTC (rev 6031) @@ -1,5 +1,8 @@ OwebERP Change Log +21/6/13 Phil: ContractCosting.php fix references to contract issues object which should just have been an array. +18/6/13 Phil: Reworked the display of stock category properties on the SelectProduct.php inquiry +18/6/13 Tim: Z_ImportGLTransactions.php new script for importing GL payments, receipts or journals from a CSV file 17/6/13 Paul Harness: Fix sql query of goods received when a serial number is already present. GoodsReceived.php 12/6/13 tomglare: SelectSupplier - improve handling if single supplier selected 25/5/13 Phil: CountriesArray.php now uses the index as the ISO 2 character code for the country. Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2013-06-18 07:17:20 UTC (rev 6030) +++ trunk/includes/MainMenuLinksArray.php 2013-06-21 22:48:11 UTC (rev 6031) @@ -497,27 +497,29 @@ '/Departments.php', '/InternalStockCategoriesByRole.php' ); -$MenuItems['Utilities']['Transactions']['Caption'] = array (_('Change A Customer Code'), - _('Change A Customer Branch Code'), - _('Change A Supplier Code'), - _('Change An Inventory Item Code'), - _('Change A GL Account Code'), - _('Change A Location Code'), - _('Update costs for all BOM items, from the bottom up'), - _('Re-apply costs to Sales Analysis'), - _('Delete sales transactions'), - _('Reverse all supplier payments on a specified date')); +$MenuItems['Utilities']['Transactions']['Caption'] = array (_('Import GL Payments Receipts Or Journals From CSV'), + _('Change A Customer Code'), + _('Change A Customer Branch Code'), + _('Change A Supplier Code'), + _('Change An Inventory Item Code'), + _('Change A GL Account Code'), + _('Change A Location Code'), + _('Update costs for all BOM items, from the bottom up'), + _('Re-apply costs to Sales Analysis'), + _('Delete sales transactions'), + _('Reverse all supplier payments on a specified date')); -$MenuItems['Utilities']['Transactions']['URL'] = array ( '/Z_ChangeCustomerCode.php', - '/Z_ChangeBranchCode.php', - '/Z_ChangeSupplierCode.php', - '/Z_ChangeStockCode.php', - '/Z_ChangeGLAccountCode.php', - '/Z_ChangeLocationCode.php', - '/Z_BottomUpCosts.php', - '/Z_ReApplyCostToSA.php', - '/Z_DeleteSalesTransActions.php', - '/Z_ReverseSuppPaymentRun.php'); +$MenuItems['Utilities']['Transactions']['URL'] = array ('/Z_ImportGLTransactions.php', + '/Z_ChangeCustomerCode.php', + '/Z_ChangeBranchCode.php', + '/Z_ChangeSupplierCode.php', + '/Z_ChangeStockCode.php', + '/Z_ChangeGLAccountCode.php', + '/Z_ChangeLocationCode.php', + '/Z_BottomUpCosts.php', + '/Z_ReApplyCostToSA.php', + '/Z_DeleteSalesTransActions.php', + '/Z_ReverseSuppPaymentRun.php'); $MenuItems['Utilities']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), _('Show Local Currency Total Suppliers Balances'), Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-06-18 07:17:20 UTC (rev 6030) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-06-21 22:48:11 UTC (rev 6031) @@ -57,5 +57,6 @@ INSERT INTO mailgroups VALUES(4,'InventoryValuationRecipients'); ALTER TABLE stockrequestitems DROP PRIMARY KEY; ALTER TABLE stockrequestitems ADD PRIMARY KEY (`dispatchitemsid`,`dispatchid`); +INSERT INTO scripts VALUES('Z_ImportGLTransactions.php', 15, 'Import General Ledger Transactions'); |
From: <dai...@us...> - 2013-06-24 07:36:33
|
Revision: 6033 http://sourceforge.net/p/web-erp/reponame/6033 Author: daintree Date: 2013-06-24 07:36:26 +0000 (Mon, 24 Jun 2013) Log Message: ----------- webSHOP changes Modified Paths: -------------- trunk/AccountGroups.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMListing.php trunk/ConfirmDispatch_Invoice.php trunk/CounterReturns.php trunk/CounterSales.php trunk/Credit_Invoice.php trunk/CustomerBranches.php trunk/Customers.php trunk/DeliveryDetails.php trunk/GetStockImage.php trunk/MRP.php trunk/MailSalesReport.php trunk/OffersReceived.php trunk/PDFOrdersInvoiced.php trunk/PDFStockTransfer.php trunk/PO_Items.php trunk/PageSecurity.php trunk/PcTabs.php trunk/Prices.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/SalesCategories.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/StockAdjustments.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockStatus.php trunk/Stocks.php trunk/SupplierTenders.php trunk/SystemParameters.php trunk/UserSettings.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/Z_DeleteSalesTransActions.php trunk/api/api_debtortransactions.php trunk/api/api_php.php trunk/api/api_salesorders.php trunk/config.distrib.php trunk/css/aguapop/images/help.png trunk/doc/Change.log trunk/doc/Manual/ManualAPIFunctions.php trunk/doc/Manual/ManualAPITutorial.html trunk/doc/Manual/ManualContents.php trunk/doc/Manual/ManualGeneralLedger.html trunk/doc/Manual/ManualGettingStarted.html trunk/doc/Manual/ManualOutline.php trunk/doc/Manual/ManualPrices.html trunk/includes/ConnectDB_mysql.inc trunk/includes/DateFunctions.inc trunk/includes/DefineStockAdjustment.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/MainMenuLinksArray.php trunk/includes/PDFSalesAnalysis.inc trunk/includes/SelectOrderItems_IntoCart.inc trunk/includes/session.inc trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.mo trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po 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.po 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_CA.utf8/LC_MESSAGES/messages.po 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/locale/zh_TW.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_TW.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/upgrade4.10-4.11.sql trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Added Paths: ----------- trunk/css/default/images/help.png trunk/css/fluid/images/help.png trunk/css/fresh/images/help.png trunk/css/professional/images/help.png trunk/css/professional-rtl/images/help.png trunk/css/silverwolf/images/help.png trunk/css/wood/images/help.png trunk/doc/Manual/ManualCreditNotes.html trunk/doc/Manual/images/CreateCreditNoteSelectType.png trunk/doc/Manual/images/CreditInvoiceDeleteLines.png trunk/doc/Manual/images/CreditInvoiceSelectInvoice.png trunk/doc/Manual/images/MenuCreateCreditNote.png trunk/doc/Manual/images/MenuOptionAllocateCredits.png trunk/doc/Manual/images/SelectCreditToAllocate.png Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2013-06-22 11:12:08 UTC (rev 6032) +++ trunk/AccountGroups.php 2013-06-24 07:36:26 UTC (rev 6033) @@ -18,8 +18,8 @@ jQuery('.noSpecialChars').bind('input', function() { jQuery(this).val($(this).val().replace(/[^a-z0-9_\-]/gi, '')); }); - $('.number').bind('input', function() { - $(this).val($(this).val().replace(/[^0-9]/gi, '')); + jQuery('.number').bind('input', function() { + jQuery(this).val($(this).val().replace(/[^0-9]/gi, '')); }); jQuery('#AccountGroups').validate({ rules: { Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2013-06-22 11:12:08 UTC (rev 6032) +++ trunk/BOMIndented.php 2013-06-24 07:36:26 UTC (rev 6033) @@ -49,8 +49,8 @@ CONCAT(bom.parent,bom.component) AS sortpart FROM bom WHERE bom.parent ='" . $_POST['Part'] . "' - AND bom.effectiveto >= NOW() - AND bom.effectiveafter <= NOW()"; + AND bom.effectiveto >= '" . date('Y-m-d') . "' + AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; $result = DB_query($sql,$db); $LevelCounter = 2; @@ -76,8 +76,8 @@ bom.quantity FROM bom WHERE bom.parent ='" . $_POST['Part'] . "' - AND bom.effectiveto >= NOW() - AND bom.effectiveafter <= NOW()"; + AND bom.effectiveto >= '" . date('Y-m-d') . "' + AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; $result = DB_query($sql,$db); //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $ComponentCounter - the @@ -109,7 +109,7 @@ bom.quantity FROM bom, passbom WHERE bom.parent = passbom.part - AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; + AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; $result = DB_query($sql,$db); $sql = "DROP TABLE IF EXISTS passbom2"; @@ -132,8 +132,8 @@ CONCAT(passbom2.sortpart,bom.component) AS sortpart FROM bom,passbom2 WHERE bom.parent = passbom2.part - AND bom.effectiveto >= NOW() - AND bom.effectiveafter <= NOW()"; + AND bom.effectiveto >= '" . date('Y-m-d') . "' + AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; $result = DB_query($sql,$db); Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2013-06-22 11:12:08 UTC (rev 6032) +++ trunk/BOMIndentedReverse.php 2013-06-24 07:36:26 UTC (rev 6033) @@ -48,8 +48,8 @@ CONCAT(bom.component,bom.parent) AS sortpart FROM bom WHERE bom.component ='" . $_POST['Part'] . "' - AND bom.effectiveto >= NOW() - AND bom.effectiveafter <= NOW()"; + AND bom.effectiveto >= '" . date('Y-m-d') . "' + AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; $result = DB_query($sql,$db); $LevelCounter = 2; @@ -75,8 +75,8 @@ bom.quantity FROM bom WHERE bom.component ='" . $_POST['Part'] . "' - AND bom.effectiveto >= NOW() - AND bom.effectiveafter <= NOW()"; + AND bom.effectiveto >= '" . date('Y-m-d') . "' + AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; $result = DB_query($sql,$db); // This while routine finds the other levels as long as $ComponentCounter - the @@ -106,8 +106,8 @@ bom.quantity FROM bom,passbom WHERE bom.component = passbom.part - AND bom.effectiveto >= NOW() - AND bom.effectiveafter <= NOW()"; + AND bom.effectiveto >= '" . date('Y-m-d') . "' + AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; $result = DB_query($sql,$db); $result = DB_query("DROP TABLE IF EXISTS passbom2",$db); @@ -126,8 +126,8 @@ CONCAT(passbom2.sortpart,bom.parent) AS sortpart FROM bom,passbom2 WHERE bom.component = passbom2.part - AND bom.effectiveto >= NOW() - AND bom.effectiveafter <= NOW()"; + AND bom.effectiveto >= '" . date('Y-m-d') . "' + AND bom.effectiveafter <= '" . date('Y-m-d') . "'"; $result = DB_query($sql,$db); $result = DB_query("SELECT COUNT(*) FROM bom,passbom WHERE bom.component = passbom.part",$db); Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2013-06-22 11:12:08 UTC (rev 6032) +++ trunk/BOMListing.php 2013-06-24 07:36:26 UTC (rev 6033) @@ -31,7 +31,7 @@ ON stockmaster.stockid=bom.component WHERE bom.parent >= '" . $_POST['FromCriteria'] . "' AND bom.parent <= '" . $_POST['ToCriteria'] . "' - AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW() + AND bom.effectiveto >= '" . date('Y-m-d') . "' AND bom.effectiveafter <= '" . date('Y-m-d') . "' ORDER BY bom.parent, bom.component"; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2013-06-22 11:12:08 UTC (rev 6032) +++ trunk/ConfirmDispatch_Invoice.php 2013-06-24 07:36:26 UTC (rev 6033) @@ -782,7 +782,8 @@ invtext, shipvia, consignment, - packages ) + packages, + salesperson ) VALUES ( '". $InvoiceNo . "', 10, @@ -801,7 +802,8 @@ '" . $_POST['InvoiceText'] . "', '" . $_SESSION['Items'.$identifier]->ShipVia . "', '" . $_POST['Consignment'] . "', - '" . $_POST['Packages'] . "')"; + '" . $_POST['Packages'] . "', + '" . $_SESSION['Items'.$identifier]->SalesPerson . "' )"; $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'); Modified: trunk/CounterReturns.php =================================================================== --- trunk/CounterReturns.php 2013-06-22 11:12:08 UTC (rev 6032) +++ trunk/CounterReturns.php 2013-06-24 07:36:26 UTC (rev 6033) @@ -20,14 +20,14 @@ } else { $identifier=$_GET['identifier']; } -if (isset($_SESSION['Items'.$identifier]) AND isset($_POST['CustRef'])){ +if (isset($_SESSION['Items' . $identifier]) AND isset($_POST['CustRef'])){ //update the Items object variable with the data posted from the form - $_SESSION['Items'.$identifier]->CustRef = $_POST['CustRef']; - $_SESSION['Items'.$identifier]->Comments = $_POST['Comments']; - $_SESSION['Items'.$identifier]->DeliverTo = $_POST['DeliverTo']; - $_SESSION['Items'.$identifier]->PhoneNo = $_POST['PhoneNo']; - $_SESSION['Items'.$identifier]->Email = $_POST['Email']; - $_SESSION['Items'.$identifier]->SalesPerson = $_POST['SalesPerson']; + $_SESSION['Items' . $identifier]->CustRef = $_POST['CustRef']; + $_SESSION['Items' . $identifier]->Comments = $_POST['Comments']; + $_SESSION['Items' . $identifier]->DeliverTo = $_POST['DeliverTo']; + $_SESSION['Items' . $identifier]->PhoneNo = $_POST['PhoneNo']; + $_SESSION['Items' . $identifier]->Email = $_POST['Email']; + $_SESSION['Items' . $identifier]->SalesPerson = $_POST['SalesPerson']; } if (isset($_POST['QuickEntry'])){ @@ -48,22 +48,22 @@ if (isset($_GET['NewReturn'])){ /*New return entry - clear any existing return details from the ReturnItems object and initiate a newy*/ - if (isset($_SESSION['Items'.$identifier])){ - unset ($_SESSION['Items'.$identifier]->LineItems); - $_SESSION['Items'.$identifier]->ItemsOrdered=0; - unset ($_SESSION['Items'.$identifier]); + if (isset($_SESSION['Items' . $identifier])){ + unset ($_SESSION['Items' . $identifier]->LineItems); + $_SESSION['Items' . $identifier]->ItemsOrdered=0; + unset ($_SESSION['Items' . $identifier]); } } $AlreadyWarnedAboutCredit = true; //no point testing credit limits for a return!! -if (!isset($_SESSION['Items'.$identifier])){ - /* It must be a new return being created $_SESSION['Items'.$identifier] would be set up from the +if (!isset($_SESSION['Items' . $identifier])){ + /* It must be a new return being created $_SESSION['Items' . $identifier] would be set up from the modification code above if a modification to an existing retur. Also $ExistingOrder would be set to 1. */ $_SESSION['ExistingOrder'. $identifier] = 0; - $_SESSION['Items'.$identifier] = new cart; + $_SESSION['Items' . $identifier] = new cart; /*Get the default customer-branch combo from the user's default location record */ $sql = "SELECT cashsalecustomer, @@ -86,16 +86,16 @@ exit; } if (isset($_GET['DebtorNo'])) { - $_SESSION['Items'.$identifier]->DebtorNo = $_GET['DebtorNo']; - $_SESSION['Items'.$identifier]->Branch = $_GET['BranchNo']; + $_SESSION['Items' . $identifier]->DebtorNo = $_GET['DebtorNo']; + $_SESSION['Items' . $identifier]->Branch = $_GET['BranchNo']; } else { - $_SESSION['Items'.$identifier]->DebtorNo = $myrow['cashsalecustomer']; - $_SESSION['Items'.$identifier]->Branch = $myrow['cashsalebranch']; + $_SESSION['Items' . $identifier]->DebtorNo = $myrow['cashsalecustomer']; + $_SESSION['Items' . $identifier]->Branch = $myrow['cashsalebranch']; } - $_SESSION['Items'.$identifier]->LocationName = $myrow['locationname']; - $_SESSION['Items'.$identifier]->Location = $_SESSION['UserStockLocation']; - $_SESSION['Items'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid']; + $_SESSION['Items' . $identifier]->LocationName = $myrow['locationname']; + $_SESSION['Items' . $identifier]->Location = $_SESSION['UserStockLocation']; + $_SESSION['Items' . $identifier]->DispatchTaxProvince = $myrow['taxprovinceid']; // Now check to ensure this account exists and set defaults */ $sql = "SELECT debtorsmaster.name, @@ -114,23 +114,23 @@ ON debtorsmaster.paymentterms=paymentterms.termsindicator INNER JOIN currencies ON debtorsmaster.currcode=currencies.currabrev - WHERE debtorsmaster.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; + WHERE debtorsmaster.debtorno = '" . $_SESSION['Items' . $identifier]->DebtorNo . "'"; - $ErrMsg = _('The details of the customer selected') . ': ' . $_SESSION['Items'.$identifier]->DebtorNo . ' ' . _('cannot be retrieved because'); + $ErrMsg = _('The details of the customer selected') . ': ' . $_SESSION['Items' . $identifier]->DebtorNo . ' ' . _('cannot be retrieved because'); $DbgMsg = _('The SQL used to retrieve the customer details and failed was') . ':'; // echo $sql; $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); $myrow = DB_fetch_array($result); $_SESSION['RequireCustomerSelection']=0; - $_SESSION['Items'.$identifier]->CustomerName = $myrow['name']; + $_SESSION['Items' . $identifier]->CustomerName = $myrow['name']; // the sales type is the price list to be used for this sale - $_SESSION['Items'.$identifier]->DefaultSalesType = $myrow['salestype']; - $_SESSION['Items'.$identifier]->SalesTypeName = $myrow['sales_type']; - $_SESSION['Items'.$identifier]->DefaultCurrency = $myrow['currcode']; - $_SESSION['Items'.$identifier]->DefaultPOLine = $myrow['customerpoline']; - $_SESSION['Items'.$identifier]->PaymentTerms = $myrow['terms']; - $_SESSION['Items'.$identifier]->CurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['Items' . $identifier]->DefaultSalesType = $myrow['salestype']; + $_SESSION['Items' . $identifier]->SalesTypeName = $myrow['sales_type']; + $_SESSION['Items' . $identifier]->DefaultCurrency = $myrow['currcode']; + $_SESSION['Items' . $identifier]->DefaultPOLine = $myrow['customerpoline']; + $_SESSION['Items' . $identifier]->PaymentTerms = $myrow['terms']; + $_SESSION['Items' . $identifier]->CurrDecimalPlaces = $myrow['decimalplaces']; /* now get the branch defaults from the customer branches table CustBranch. */ $sql = "SELECT custbranch.brname, @@ -143,15 +143,15 @@ custbranch.taxgroupid, custbranch.defaultshipvia FROM custbranch - WHERE custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "' - AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; - $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $_SESSION['Items'.$identifier]->Branch . ' ' . _('cannot be retrieved because'); + WHERE custbranch.branchcode='" . $_SESSION['Items' . $identifier]->Branch . "' + AND custbranch.debtorno = '" . $_SESSION['Items' . $identifier]->DebtorNo . "'"; + $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $_SESSION['Items' . $identifier]->Branch . ' ' . _('cannot be retrieved because'); $DbgMsg = _('SQL used to retrieve the branch details was') . ':'; $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); if (DB_num_rows($result)==0){ - prnMsg(_('The branch details for branch code') . ': ' . $_SESSION['Items'.$identifier]->Branch . ' ' . _('against customer code') . ': ' . $_SESSION['Items'.$identifier]->DebtorNo . ' ' . _('could not be retrieved') . '. ' . _('Check the set up of the customer and branch'),'error'); + prnMsg(_('The branch details for branch code') . ': ' . $_SESSION['Items' . $identifier]->Branch . ' ' . _('against customer code') . ': ' . $_SESSION['Items' . $identifier]->DebtorNo . ' ' . _('could not be retrieved') . '. ' . _('Check the set up of the customer and branch'),'error'); if ($debug==1){ echo '<br />' . _('The SQL that failed to get the branch details was') . ':<br />' . $sql; @@ -163,27 +163,27 @@ echo '<br />'; $myrow = DB_fetch_array($result); - $_SESSION['Items'.$identifier]->DeliverTo = ''; - $_SESSION['Items'.$identifier]->DelAdd1 = $myrow['braddress1']; - $_SESSION['Items'.$identifier]->ShipVia = $myrow['defaultshipvia']; - $_SESSION['Items'.$identifier]->DeliverBlind = $myrow['deliverblind']; - $_SESSION['Items'.$identifier]->SpecialInstructions = $myrow['specialinstructions']; - $_SESSION['Items'.$identifier]->DeliveryDays = $myrow['estdeliverydays']; - $_SESSION['Items'.$identifier]->TaxGroup = $myrow['taxgroupid']; - $_SESSION['Items'.$identifier]->TaxGroup = $myrow['taxgroupid']; - $_SESSION['Items'.$identifier]->SalesPerson = $myrow['salesman']; - if ($_SESSION['Items'.$identifier]->SpecialInstructions) { - prnMsg($_SESSION['Items'.$identifier]->SpecialInstructions,'warn'); + $_SESSION['Items' . $identifier]->DeliverTo = ''; + $_SESSION['Items' . $identifier]->DelAdd1 = $myrow['braddress1']; + $_SESSION['Items' . $identifier]->ShipVia = $myrow['defaultshipvia']; + $_SESSION['Items' . $identifier]->DeliverBlind = $myrow['deliverblind']; + $_SESSION['Items' . $identifier]->SpecialInstructions = $myrow['specialinstructions']; + $_SESSION['Items' . $identifier]->DeliveryDays = $myrow['estdeliverydays']; + $_SESSION['Items' . $identifier]->TaxGroup = $myrow['taxgroupid']; + $_SESSION['Items' . $identifier]->TaxGroup = $myrow['taxgroupid']; + $_SESSION['Items' . $identifier]->SalesPerson = $myrow['salesman']; + if ($_SESSION['Items' . $identifier]->SpecialInstructions) { + prnMsg($_SESSION['Items' . $identifier]->SpecialInstructions,'warn'); } } // user does not have valid inventory location } // end if its a new return to be set up if (isset($_POST['CancelReturn'])) { - unset($_SESSION['Items'.$identifier]->LineItems); - $_SESSION['Items'.$identifier]->ItemsOrdered = 0; - unset($_SESSION['Items'.$identifier]); - $_SESSION['Items'.$identifier] = new cart; + unset($_SESSION['Items' . $identifier]->LineItems); + $_SESSION['Items' . $identifier]->ItemsOrdered = 0; + unset($_SESSION['Items' . $identifier]); + $_SESSION['Items' . $identifier] = new cart; echo '<br /><br />'; prnMsg(_('This return has been cancelled as requested'),'success'); @@ -194,7 +194,7 @@ } else { /*Not cancelling the return */ echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/inventory.png" title="' . _('Counter Return') . '" alt="" />' . ' '; - echo '<font color="red" size="5">' . $_SESSION['Items'.$identifier]->CustomerName . '<br /> ' . _('Counter Return') . ' ' . _('to') . ' ' . $_SESSION['Items'.$identifier]->LocationName . ' ' . _('inventory') . ' (' . _('all amounts in') . ' ' . $_SESSION['Items'.$identifier]->DefaultCurrency . ')'; + echo '<font color="red" size="5">' . $_SESSION['Items' . $identifier]->CustomerName . '<br /> ' . _('Counter Return') . ' ' . _('to') . ' ' . $_SESSION['Items' . $identifier]->LocationName . ' ' . _('inventory') . ' (' . _('all amounts in') . ' ' . $_SESSION['Items' . $identifier]->DefaultCurrency . ')'; echo '</font></p>'; } @@ -346,8 +346,8 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; //Get The exchange rate used for GPPercent calculations on adding or amending items -if ($_SESSION['Items'.$identifier]->DefaultCurrency != $_SESSION['CompanyRecord']['currencydefault']){ - $ExRateResult = DB_query("SELECT rate FROM currencies WHERE currabrev='" . $_SESSION['Items'.$identifier]->DefaultCurrency . "'",$db); +if ($_SESSION['Items' . $identifier]->DefaultCurrency != $_SESSION['CompanyRecord']['currencydefault']){ + $ExRateResult = DB_query("SELECT rate FROM currencies WHERE currabrev='" . $_SESSION['Items' . $identifier]->DefaultCurrency . "'",$db); if (DB_num_rows($ExRateResult)>0){ $ExRateRow = DB_fetch_row($ExRateResult); $ExRate = $ExRateRow[0]; @@ -425,7 +425,7 @@ $NewItemQty = $KitParts['quantity'] * $ParentQty; $NewPOLine = 0; include('includes/SelectOrderItems_IntoCart.inc'); - $_SESSION['Items'.$identifier]->GetTaxes(($_SESSION['Items'.$identifier]->LineCounter - 1)); + $_SESSION['Items' . $identifier]->GetTaxes(($_SESSION['Items' . $identifier]->LineCounter - 1)); } } else if ($myrow['mbflag']=='G'){ @@ -436,7 +436,7 @@ prnMsg(_('Only items entered with a positive quantity can be added to the return'),'warn'); } else { /*Its not a kit set item*/ include('includes/SelectOrderItems_IntoCart.inc'); - $_SESSION['Items'.$identifier]->GetTaxes(($_SESSION['Items'.$identifier]->LineCounter - 1)); + $_SESSION['Items' . $identifier]->GetTaxes(($_SESSION['Items' . $identifier]->LineCounter - 1)); } } } @@ -445,13 +445,13 @@ /*Now do non-quick entry delete/edits/adds */ -if ((isset($_SESSION['Items'.$identifier])) OR isset($NewItem)) { +if ((isset($_SESSION['Items' . $identifier])) OR isset($NewItem)) { if (isset($_GET['Delete'])){ - $_SESSION['Items'.$identifier]->remove_from_cart($_GET['Delete']); /*Don't do any DB updates*/ + $_SESSION['Items' . $identifier]->remove_from_cart($_GET['Delete']); /*Don't do any DB updates*/ } - foreach ($_SESSION['Items'.$identifier]->LineItems as $ReturnItemLine) { + foreach ($_SESSION['Items' . $identifier]->LineItems as $ReturnItemLine) { if (isset($_POST['Quantity_' . $ReturnItemLine->LineNumber])){ @@ -494,7 +494,7 @@ OR $ReturnItemLine->ItemDue != $_POST['ItemDue_' . $ReturnItemLine->LineNumber] OR $ReturnItemLine->POLine != $_POST['POLine_' . $ReturnItemLine->LineNumber]) { - $_SESSION['Items'.$identifier]->update_cart_item($ReturnItemLine->LineNumber, + $_SESSION['Items' . $identifier]->update_cart_item($ReturnItemLine->LineNumber, $Quantity, $Price, $DiscountPercentage/100, @@ -510,7 +510,7 @@ } if (isset($_POST['Recalculate'])) { - foreach ($_SESSION['Items'.$identifier]->LineItems as $ReturnItemLine) { + foreach ($_SESSION['Items' . $identifier]->LineItems as $ReturnItemLine) { $NewItem=$ReturnItemLine->StockID; $sql = "SELECT stockmaster.mbflag, stockmaster.controlled @@ -538,13 +538,13 @@ $NewItemQty = $KitParts['quantity'] * $ParentQty; $NewPOLine = 0; $NewItemDue = date($_SESSION['DefaultDateFormat']); - $_SESSION['Items'.$identifier]->GetTaxes($ReturnItemLine->LineNumber); + $_SESSION['Items' . $identifier]->GetTaxes($ReturnItemLine->LineNumber); } } else { /*Its not a kit set item*/ $NewItemDue = date($_SESSION['DefaultDateFormat']); $NewPOLine = 0; - $_SESSION['Items'.$identifier]->GetTaxes($ReturnItemLine->LineNumber); + $_SESSION['Items' . $identifier]->GetTaxes($ReturnItemLine->LineNumber); } } unset($NewItem); @@ -588,7 +588,7 @@ $NewPOLine = 0; $NewItemDue = date($_SESSION['DefaultDateFormat']); include('includes/SelectOrderItems_IntoCart.inc'); - $_SESSION['Items'.$identifier]->GetTaxes(($_SESSION['Items'.$identifier]->LineCounter - 1)); + $_SESSION['Items' . $identifier]->GetTaxes(($_SESSION['Items' . $identifier]->LineCounter - 1)); } } else { /*Its not a kit set item*/ @@ -596,7 +596,7 @@ $NewPOLine = 0; include('includes/SelectOrderItems_IntoCart.inc'); - $_SESSION['Items'.$identifier]->GetTaxes(($_SESSION['Items'.$identifier]->LineCounter - 1)); + $_SESSION['Items' . $identifier]->GetTaxes(($_SESSION['Items' . $identifier]->LineCounter - 1)); } } /* end of if its a new item */ @@ -639,14 +639,14 @@ $NewItemDue = date($_SESSION['DefaultDateFormat']); $NewPOLine = 0; include('includes/SelectOrderItems_IntoCart.inc'); - $_SESSION['Items'.$identifier]->GetTaxes(($_SESSION['Items'.$identifier]->LineCounter - 1)); + $_SESSION['Items' . $identifier]->GetTaxes(($_SESSION['Items' . $identifier]->LineCounter - 1)); } } else { /*Its not a kit set item*/ $NewItemDue = date($_SESSION['DefaultDateFormat']); $NewPOLine = 0; include('includes/SelectOrderItems_IntoCart.inc'); - $_SESSION['Items'.$identifier]->GetTaxes(($_SESSION['Items'.$identifier]->LineCounter - 1)); + $_SESSION['Items' . $identifier]->GetTaxes(($_SESSION['Items' . $identifier]->LineCounter - 1)); } } /* end of if its a new item */ } /*end of if its a new item */ @@ -654,7 +654,7 @@ } -if (count($_SESSION['Items'.$identifier]->LineItems)>0){ /*only show return lines if there are any */ +if (count($_SESSION['Items' . $identifier]->LineItems)>0){ /*only show return lines if there are any */ /* // ************************************************************************* // T H I S W H E R E T H E R E T U R N I S D I S P L A Y E D @@ -676,14 +676,14 @@ <th>' . _('Total') . '<br />' . _('Incl Tax') . '</th> </tr>'; - $_SESSION['Items'.$identifier]->total = 0; - $_SESSION['Items'.$identifier]->totalVolume = 0; - $_SESSION['Items'.$identifier]->totalWeight = 0; + $_SESSION['Items' . $identifier]->total = 0; + $_SESSION['Items' . $identifier]->totalVolume = 0; + $_SESSION['Items' . $identifier]->totalWeight = 0; $TaxTotals = array(); $TaxGLCodes = array(); $TaxTotal =0; $k =0; //row colour counter - foreach ($_SESSION['Items'.$identifier]->LineItems as $ReturnItemLine) { + foreach ($_SESSION['Items' . $identifier]->LineItems as $ReturnItemLine) { $SubTotal = $ReturnItemLine->Quantity * $ReturnItemLine->Price * (1 - $ReturnItemLine->DiscountPercent); $DisplayDiscount = locale_number_format(($ReturnItemLine->DiscountPercent * 100),2); @@ -701,19 +701,19 @@ echo '<input type="hidden" name="POLine_' . $ReturnItemLine->LineNumber . '" value="" />'; echo '<input type="hidden" name="ItemDue_' . $ReturnItemLine->LineNumber . '" value="'.$ReturnItemLine->ItemDue.'" />'; - echo '<td><a target="_blank" href="' . $RootPath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $ReturnItemLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $ReturnItemLine->StockID . '</a></td> + echo '<td><a target="_blank" href="' . $RootPath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $ReturnItemLine->StockID . '&DebtorNo=' . $_SESSION['Items' . $identifier]->DebtorNo . '">' . $ReturnItemLine->StockID . '</a></td> <td title="' . $ReturnItemLine->LongDescription . '">' . $ReturnItemLine->ItemDescription . '</td>'; echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . $ReturnItemLine->LineNumber . '" size="6" maxlength="6" value="' . locale_number_format($ReturnItemLine->Quantity,$ReturnItemLine->DecimalPlaces) . '" />'; echo '</td> <td>' . $ReturnItemLine->Units . '</td> - <td><input class="number" type="text" name="Price_' . $ReturnItemLine->LineNumber . '" size="16" maxlength="16" value="' . locale_number_format($ReturnItemLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td> + <td><input class="number" type="text" name="Price_' . $ReturnItemLine->LineNumber . '" size="16" maxlength="16" value="' . locale_number_format($ReturnItemLine->Price,$_SESSION['Items' . $identifier]->CurrDecimalPlaces) . '" /></td> <td><input class="number" type="text" name="Discount_' . $ReturnItemLine->LineNumber . '" size="5" maxlength="4" value="' . locale_number_format(($ReturnItemLine->DiscountPercent * 100),2) . '" /></td> <td><input class="number" type="text" name="GPPercent_' . $ReturnItemLine->LineNumber . '" size="3" maxlength="40" value="' . locale_number_format($ReturnItemLine->GPPercent,2) . '" /></td> - <td class="number">' . locale_number_format($SubTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; + <td class="number">' . locale_number_format($SubTotal,$_SESSION['Items' . $identifier]->CurrDecimalPlaces) . '</td>'; $LineDueDate = $ReturnItemLine->ItemDue; - $_SESSION['Items'.$identifier]->LineItems[$ReturnItemLine->LineNumber]->ItemDue= $LineDueDate; + $_SESSION['Items' . $identifier]->LineItems[$ReturnItemLine->LineNumber]->ItemDue= $LineDueDate; $i=0; // initialise the number of taxes iterated through $TaxLineTotal =0; //initialise tax total for the line @@ -733,10 +733,10 @@ } $TaxTotal += $TaxLineTotal; - $_SESSION['Items'.$identifier]->TaxTotals=$TaxTotals; - $_SESSION['Items'.$identifier]->TaxGLCodes=$TaxGLCodes; - echo '<td class="number">' . locale_number_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; - echo '<td class="number">' . locale_number_format($SubTotal + $TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; + $_SESSION['Items' . $identifier]->TaxTotals=$TaxTotals; + $_SESSION['Items' . $identifier]->TaxGLCodes=$TaxGLCodes; + echo '<td class="number">' . locale_number_format($TaxLineTotal ,$_SESSION['Items' . $identifier]->CurrDecimalPlaces) . '</td>'; + echo '<td class="number">' . locale_number_format($SubTotal + $TaxLineTotal ,$_SESSION['Items' . $identifier]->CurrDecimalPlaces) . '</td>'; echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '&Delete=' . $ReturnItemLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>'; if ($_SESSION['AllowOrderLineItemNarrative'] == 1){ @@ -746,21 +746,21 @@ echo '<input type="hidden" name="Narrative" value="" />'; } - $_SESSION['Items'.$identifier]->total += $SubTotal; - $_SESSION['Items'.$identifier]->totalVolume += $ReturnItemLine->Quantity * $ReturnItemLine->Volume; - $_SESSION['Items'.$identifier]->totalWeight += $ReturnItemLine->Quantity * $ReturnItemLine->Weight; + $_SESSION['Items' . $identifier]->total += $SubTotal; + $_SESSION['Items' . $identifier]->totalVolume += $ReturnItemLine->Quantity * $ReturnItemLine->Volume; + $_SESSION['Items' . $identifier]->totalWeight += $ReturnItemLine->Quantity * $ReturnItemLine->Weight; } /* end of loop around items */ echo '<tr class="EvenTableRows">'; echo '<td colspan="8" class="number"><b>' . _('Total') . '</b></td>'; - echo '<td class="number">' . locale_number_format(($_SESSION['Items'.$identifier]->total),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> - <td class="number">' . locale_number_format($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> - <td class="number">' . locale_number_format(($_SESSION['Items'.$identifier]->total+$TaxTotal),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> + echo '<td class="number">' . locale_number_format(($_SESSION['Items' . $identifier]->total),$_SESSION['Items' . $identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($TaxTotal,$_SESSION['Items' . $identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format(($_SESSION['Items' . $identifier]->total+$TaxTotal),$_SESSION['Items' . $identifier]->CurrDecimalPlaces) . '</td> </tr> <tr class="EvenTableRows">'; echo '<td colspan="10" class="number"><b>' . _('Rounded Total') . '</b></td> - <td class="number">' . locale_number_format(round($_SESSION['Items'.$identifier]->total+$TaxTotal,0), $_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format(round($_SESSION['Items' . $identifier]->total+$TaxTotal,0), $_SESSION['Items' . $identifier]->CurrDecimalPlaces) . '</td> </tr> </table>'; echo '<input type="hidden" name="TaxTotal" value="'.$TaxTotal.'" />'; @@ -768,28 +768,28 @@ //nested table echo '<table><tr> <td style="color:red">'. _('Returned By') .':</td> - <td><input type="text" size="25" maxlength="25" name="DeliverTo" value="' . stripslashes($_SESSION['Items'.$identifier]->DeliverTo) . '" /></td> + <td><input type="text" size="25" maxlength="25" name="DeliverTo" value="' . stripslashes($_SESSION['Items' . $identifier]->DeliverTo) . '" /></td> </tr>'; echo '<tr> <td style="color:red">'. _('Contact Phone Number') .':</td> - <td><input type="text" size="25" maxlength="25" name="PhoneNo" value="' . stripslashes($_SESSION['Items'.$identifier]->PhoneNo) . '" /></td> + <td><input type="text" size="25" maxlength="25" name="PhoneNo" value="' . stripslashes($_SESSION['Items' . $identifier]->PhoneNo) . '" /></td> </tr>'; - echo '<tr><td style="color:red">' . _('Contact Email') . ':</td><td><input type="text" size="25" maxlength="30" name="Email" value="' . stripslashes($_SESSION['Items'.$identifier]->Email) . '" /></td></tr>'; + echo '<tr><td style="color:red">' . _('Contact Email') . ':</td><td><input type="text" size="25" maxlength="30" name="Email" value="' . stripslashes($_SESSION['Items' . $identifier]->Email) . '" /></td></tr>'; echo '<tr> <td style="color:red">'. _('Customer Reference') .':</td> - <td><input type="text" size="25" maxlength="25" name="CustRef" value="' . stripcslashes($_SESSION['Items'.$identifier]->CustRef) . '" /></td> + <td><input type="text" size="25" maxlength="25" name="CustRef" value="' . stripcslashes($_SESSION['Items' . $identifier]->CustRef) . '" /></td> </tr>'; echo '<tr> <td style="color:red">' . _('Sales person'). ':</td> <td><select name="SalesPerson">'; $SalesPeopleResult = DB_query("SELECT salesmancode, salesmanname FROM salesman WHERE current=1",$db); if (!isset($_POST['SalesPerson']) AND $_SESSION['SalesmanLogin']!=NULL ){ - $_SESSION['Items'.$identifier]->SalesPerson = $_SESSION['SalesmanLogin']; + $_SESSION['Items' . $identifier]->SalesPerson = $_SESSION['SalesmanLogin']; } while ($SalesPersonRow = DB_fetch_array($SalesPeopleResult)){ - if ($SalesPersonRow['salesmancode']==$_SESSION['Items'.$identifier]->SalesPerson){ + if ($SalesPersonRow['salesmancode']==$_SESSION['Items' . $identifier]->SalesPerson){ echo '<option selected="selected" value="' . $SalesPersonRow['salesmancode'] . '">' . $SalesPersonRow['salesmanname'] . '</option>'; } else { echo '<option value="' . $SalesPersonRow['salesmancode'] . '">' . $SalesPersonRow['salesmanname'] . '</option>'; @@ -800,7 +800,7 @@ </tr>'; echo '<tr> <td style="color:red">'. _('Reason for Return') .':</td> - <td><textarea name="Comments" cols="23" rows="5">' . stripcslashes($_SESSION['Items'.$identifier]->Comments) .'</textarea></td> + <td><textarea name="Comments" cols="23" rows="5">' . stripcslashes($_SESSION['Items' . $identifier]->Comments) .'</textarea></td> </tr>'; echo '</table>'; //end the sub table in the first column of master table echo '</td><th valign="bottom">'; //for the master table @@ -855,11 +855,11 @@ $InputError = false; //always assume the best //but check for the worst - if ($_SESSION['Items'.$identifier]->LineCounter == 0){ + if ($_SESSION['Items' . $identifier]->LineCounter == 0){ prnMsg(_('There are no lines on this return. Please enter lines to return first'),'error'); $InputError = true; } - if (abs(filter_number_format($_POST['AmountPaid']) -round($_SESSION['Items'.$identifier]->total+filter_number_format($_POST['TaxTotal']),$_SESSION['Items'.$identifier]->CurrDecimalPlaces))>=0.01) { + if (abs(filter_number_format($_POST['AmountPaid']) -round($_SESSION['Items' . $identifier]->total+filter_number_format($_POST['TaxTotal']),$_SESSION['Items' . $identifier]->CurrDecimalPlaces))>=0.01) { prnMsg(_('The amount entered as payment to the customer does not equal the amount of the return. Please correct amount and re-enter'),'error'); $InputError = true; } @@ -871,8 +871,8 @@ $SQL = "SELECT area, defaultshipvia FROM custbranch - WHERE custbranch.debtorno ='". $_SESSION['Items'.$identifier]->DebtorNo . "' - AND custbranch.branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "'"; + WHERE custbranch.debtorno ='". $_SESSION['Items' . $identifier]->DebtorNo . "' + AND custbranch.branchcode = '" . $_SESSION['Items' . $identifier]->Branch . "'"; $ErrMsg = _('We were unable to load the area where the sale is to from the custbranch table'); $Result = DB_query($SQL,$db, $ErrMsg); @@ -919,22 +919,24 @@ rate, invtext, shipvia, - alloc ) + alloc, + salesperson ) VALUES ('". $CreditNoteNo . "', 11, - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . $_SESSION['Items'.$identifier]->Branch . "', + '" . $_SESSION['Items' . $identifier]->DebtorNo . "', + '" . $_SESSION['Items' . $identifier]->Branch . "', '" . $ReturnDate . "', '" . date('Y-m-d H-i-s') . "', '" . $PeriodNo . "', - '" . $_SESSION['Items'.$identifier]->CustRef . "', - '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', - '" . -$_SESSION['Items'.$identifier]->total . "', + '" . $_SESSION['Items' . $identifier]->CustRef . "', + '" . $_SESSION['Items' . $identifier]->DefaultSalesType . "', + '" . -$_SESSION['Items' . $identifier]->total . "', '" . filter_number_format(-$_POST['TaxTotal']) . "', '" . $ExRate . "', - '" . $_SESSION['Items'.$identifier]->Comments . "', - '" . $_SESSION['Items'.$identifier]->ShipVia . "', - '" . (-$_SESSION['Items'.$identifier]->total - filter_number_format($_POST['TaxTotal'])) . "')"; + '" . $_SESSION['Items' . $identifier]->Comments . "', + '" . $_SESSION['Items' . $identifier]->ShipVia . "', + '" . (-$_SESSION['Items' . $identifier]->total - filter_number_format($_POST['TaxTotal'])) . "', + '" . $_SESSION['Items' . $identifier]->SalesPerson . "' )"; $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'); @@ -943,7 +945,7 @@ $DebtorTransID = DB_Last_Insert_ID($db,'debtortrans','id'); /* Insert the tax totals for each tax authority where tax was charged on the invoice */ - foreach ($_SESSION['Items'.$identifier]->TaxTotals AS $TaxAuthID => $TaxAmount) { + foreach ($_SESSION['Items' . $identifier]->TaxTotals AS $TaxAuthID => $TaxAmount) { $SQL = "INSERT INTO debtortranstaxes (debtortransid, taxauthid, @@ -958,7 +960,7 @@ } //Loop around each item on the sale and process each in turn - foreach ($_SESSION['Items'.$identifier]->LineItems as $ReturnItemLine) { + foreach ($_SESSION['Items' . $identifier]->LineItems as $ReturnItemLine) { /* Update location stock records if not a dummy stock item need the MBFlag later too so save it to $MBFlag */ $Result = DB_query("SELECT mbflag FROM stockmaster WHERE stockid = '" . $ReturnItemLine->StockID . "'",$db); @@ -972,7 +974,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $ReturnItemLine->StockID . "' - AND loccode= '" . $_SESSION['Items'.$identifier]->Location . "'"; + AND loccode= '" . $_SESSION['Items' . $identifier]->Location . "'"; $ErrMsg = _('WARNING') . ': ' . _('Could not retrieve current location stock'); $Result = DB_query($SQL, $db, $ErrMsg); @@ -987,7 +989,7 @@ $SQL = "UPDATE locstock SET quantity = locstock.quantity + " . $ReturnItemLine->Quantity . " WHERE locstock.stockid = '" . $ReturnItemLine->StockID . "' - AND loccode = '" . $_SESSION['Items'.$identifier]->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'); @@ -1020,7 +1022,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $AssParts['component'] . "' - AND loccode= '" . $_SESSION['Items'.$identifier]->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'); @@ -1052,10 +1054,10 @@ '" . $AssParts['component'] . "', 11, '" . $CreditNoteNo . "', - '" . $_SESSION['Items'.$identifier]->Location . "', + '" . $_SESSION['Items' . $identifier]->Location . "', '" . $ReturnDate . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . $_SESSION['Items'.$identifier]->Branch . "', + '" . $_SESSION['Items' . $identifier]->DebtorNo . "', + '" . $_SESSION['Items' . $identifier]->Branch . "', '" . $PeriodNo . "', '" . _('Assembly') . ': ' . $ReturnItemLine->StockID . "', '" . $AssParts['quantity'] * $ReturnItemLine->Quantity . "', @@ -1071,7 +1073,7 @@ $SQL = "UPDATE locstock SET quantity = locstock.quantity + " . ($AssParts['quantity'] * $ReturnItemLine->Quantity) . " WHERE locstock.stockid = '" . $AssParts['component'] . "' - AND loccode = '" . $_SESSION['Items'.$identifier]->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'); @@ -1079,7 +1081,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'.$identifier]->LineItems[$ReturnItemLine->LineNumber]->StandardCost = $StandardCost; + $_SESSION['Items' . $identifier]->LineItems[$ReturnItemLine->LineNumber]->StandardCost = $StandardCost; $ReturnItemLine->StandardCost = $StandardCost; } /* end of its an assembly */ @@ -1108,10 +1110,10 @@ VALUES ('" . $ReturnItemLine->StockID . "', 11, '" . $CreditNoteNo . "', - '" . $_SESSION['Items'.$identifier]->Location . "', + '" . $_SESSION['Items' . $identifier]->Location . "', '" . $ReturnDate . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . $_SESSION['Items'.$identifier]->Branch . "', + '" . $_SESSION['Items' . $identifier]->DebtorNo . "', + '" . $_SESSION['Items' . $identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $OrderNo . "', @@ -1141,10 +1143,10 @@ VALUES ('" . $ReturnItemLine->StockID . "', '11', '" . $CreditNoteNo . "', - '" . $_SESSION['Items'.$identifier]->Location . "', + '" . $_SESSION['Items' . $identifier]->Location . "', '" . $ReturnDate . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . $_SESSION['Items'.$identifier]->Branch . "', + '" . $_SESSION['Items' . $identifier]->DebtorNo . "', + '" . $_SESSION['Items' . $identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $ReturnItemLine->Quantity . "', @@ -1183,37 +1185,37 @@ /*Insert Sales Analysis records */ $SQL="SELECT COUNT(*), - salesanalysis.stockid, - salesanalysis.stkcategory, - salesanalysis.cust, - salesanalysis.custbranch, - salesanalysis.area, - salesanalysis.periodno, - salesanalysis.typeabbrev, - salesanalysis.salesperson - FROM salesanalysis, - custbranch, - stockmaster - WHERE salesanalysis.stkcategory=stockmaster.categoryid - AND salesanalysis.stockid=stockmaster.stockid - AND salesanalysis.cust=custbranch.debtorno - AND salesanalysis.custbranch=custbranch.branchcode - AND salesanalysis.area=custbranch.area - AND salesanalysis.salesperson='" . $_SESSION['Items'.$identifier]->SalesPerson . "' - AND salesanalysis.typeabbrev ='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' - AND salesanalysis.periodno='" . $PeriodNo . "' - AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items'.$identifier]->DebtorNo . "' - AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items'.$identifier]->Branch . "' - AND salesanalysis.stockid " . LIKE . " '" . $ReturnItemLine->StockID . "' - AND salesanalysis.budgetoractual=1 - GROUP BY salesanalysis.stockid, - salesanalysis.stkcategory, - salesanalysis.cust, - salesanalysis.custbranch, - salesanalysis.area, - salesanalysis.periodno, - salesanalysis.typeabbrev, - salesanalysis.salesperson"; + salesanalysis.stockid, + salesanalysis.stkcategory, + salesanalysis.cust, + salesanalysis.custbranch, + salesanalysis.area, + salesanalysis.periodno, + salesanalysis.typeabbrev, + salesanalysis.salesperson + FROM salesanalysis, + custbranch, + stockmaster + WHERE salesanalysis.stkcategory=stockmaster.categoryid + AND salesanalysis.stockid=stockmaster.stockid + AND salesanalysis.cust=custbranch.debtorno + AND salesanalysis.custbranch=custbranch.branchcode + AND salesanalysis.area=custbranch.area + AND salesanalysis.salesperson='" . $_SESSION['Items' . $identifier]->SalesPerson . "' + AND salesanalysis.typeabbrev ='" . $_SESSION['Items' . $identifier]->DefaultSalesType . "' + AND salesanalysis.periodno='" . $PeriodNo . "' + AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items' . $identifier]->DebtorNo . "' + AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items' . $identifier]->Branch . "' + AND salesanalysis.stockid " . LIKE . " '" . $ReturnItemLine->StockID . "' + AND salesanalysis.budgetoractual=1 + GROUP BY salesanalysis.stockid, + salesanalysis.stkcategory, + salesanalysis.cust, + salesanalysis.custbranch, + salesanalysis.area, + salesanalysis.periodno, + salesanalysis.typeabbrev, + salesanalysis.salesperson"; $ErrMsg = _('The count of existing Sales analysis records could not run because'); $DbgMsg = _('SQL to count the no of sales analysis records'); @@ -1229,11 +1231,11 @@ qty=qty -" . $ReturnItemLine->Quantity . ", disc=disc-" . ($ReturnItemLine->DiscountPercent * $ReturnItemLine->Price * $ReturnItemLine->Quantity / $ExRate) . " WHERE salesanalysis.area='" . $myrow[5] . "' - AND salesanalysis.salesperson='" . $_SESSION['Items'.$identifier]->SalesPerson . "' - AND typeabbrev ='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' + AND salesanalysis.salesperson='" . $_SESSION['Items' . $identifier]->SalesPerson . "' + AND typeabbrev ='" . $_SESSION['Items' . $identifier]->DefaultSalesType . "' AND periodno = '" . $PeriodNo . "' - AND cust " . LIKE . " '" . $_SESSION['Items'.$identifier]->DebtorNo . "' - AND custbranch " . LIKE . " '" . $_SESSION['Items'.$identifier]->Branch . "' + AND cust " . LIKE . " '" . $_SESSION['Items' . $identifier]->DebtorNo . "' + AND custbranch " . LIKE . " '" . $_SESSION['Items' . $identifier]->Branch . "' AND stockid " . LIKE . " '" . $ReturnItemLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[2] . "' AND budgetoractual=1"; @@ -1253,24 +1255,24 @@ budgetoractual, salesperson, stkcategory ) - SELECT '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', + SELECT '" . $_SESSION['Items' . $identifier]->DefaultSalesType . "', '" . $PeriodNo . "', '" . -($ReturnItemLine->Price * $ReturnItemLine->Quantity / $ExRate) . "', '" . -($ReturnItemLine->StandardCost * $ReturnItemLine->Quantity) . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . $_SESSION['Items'.$identifier]->Branch . "', + '" . $_SESSION['Items' . $identifier]->DebtorNo . "', + '" . $_SESSION['Items' . $identifier]->Branch . "', '" . -$ReturnItemLine->Quantity . "', '" . -($ReturnItemLine->DiscountPercent * $ReturnItemLine->Price * $ReturnItemLine->Quantity / $ExRate) . "', '" . $ReturnItemLine->StockID . "', custbranch.area, 1, - '" . $_SESSION['Items'.$identifier]->SalesPerson . "', + '" . $_SESSION['Items' . $identifier]->SalesPerson . "', stockmaster.categoryid FROM stockmaster, custbranch WHERE stockmaster.stockid = '" . $ReturnItemLine->StockID . "' - AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "' - AND custbranch.branchcode='" . $_SESSION['Items'.$identifier]->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'); @@ -1294,8 +1296,8 @@ '" . $CreditNoteNo . "', '" . $ReturnDate . "', '" . $PeriodNo . "', - '" . GetCOGSGLAccount($Area, $ReturnItemLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db) . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $ReturnItemLine->StockID . " x " . -$ReturnItemLine->Quantity . " @ " . $ReturnItemLine->StandardCost . "', + '" . GetCOGSGLAccount($Area, $ReturnItemLine->StockID, $_SESSION['Items' . $identifier]->DefaultSalesType, $db) . "', + '" . $_SESSION['Items' . $identifier]->DebtorNo . " - " . $ReturnItemLine->StockID . " x " . -$ReturnItemLine->Quantity . " @ " . $ReturnItemLine->StandardCost . "', '" . $ReturnItemLine->StandardCost * -$ReturnItemLine->Quantity . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because'); @@ -1317,7 +1319,7 @@ '" . $ReturnDate . "', '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $ReturnItemLine->StockID . " x " . -$ReturnItemLine->Quantity . " @ " . $ReturnItemLine->StandardCost . "', + '" . $_SESSION['Items' . $identifier]->DebtorNo . " - " . $ReturnItemLine->StockID . " x " . -$ReturnItemLine->Quantity . " @ " . $ReturnItemLine->StandardCost . "', '" . ($ReturnItemLine->StandardCost * $ReturnItemLine->Quantity) . "')"; $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'); @@ -1328,7 +1330,7 @@ if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $ReturnItemLine->Price !=0){ //Post sales transaction to GL credit sales - $SalesGLAccounts = GetSalesGLAccount($Area, $ReturnItemLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db); + $SalesGLAccounts = GetSalesGLAccount($Area, $ReturnItemLine->StockID, $_SESSION['Items' . $identifier]->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -1342,7 +1344,7 @@ '" . $ReturnDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $ReturnItemLine->StockID . " x " . -$ReturnItemLine->Quantity . " @ " . $ReturnItemLine->Price . "', + '" . $_SESSION['Items' . $identifier]->DebtorNo . " - " . $ReturnItemLine->StockID . " x " . -$ReturnItemLine->Quantity . " @ " . $ReturnItemLine->Price . "', '" . ($ReturnItemLine->Price * $ReturnItemLine->Quantity/$ExRate) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales GL posting could not be inserted because'); @@ -1363,7 +1365,7 @@ '" . $ReturnDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $ReturnItemLine->StockID . " @ " . ($ReturnItemLine->DiscountPercent * 100) . "%', + '" . $_SESSION['Items' . $identifier]->DebtorNo . " - " . $ReturnItemLine->StockID . " @ " . ($ReturnItemLine->DiscountPercent * 100) . "%', '" . -($ReturnItemLine->Price * $ReturnItemLine->Quantity * $ReturnItemLine->DiscountPercent/$ExRate) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales discount GL posting could not be inserted because'); @@ -1376,7 +1378,7 @@ if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /*Post debtors transaction to GL debit debtors, credit freight re-charged and credit sales */ - if (($_SESSION['Items'.$identifier]->total + filter_number_format($_POST['TaxTotal'])) !=0) { + if (($_SESSION['Items' . $identifier]->total + filter_number_format($_POST['TaxTotal'])) !=0) { $SQL = "INSERT INTO gltrans ( type, typeno, trandate, @@ -1389,8 +1391,8 @@ '" . $ReturnDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . -(($_SESSION['Items'.$identifier]->total + filter_number_format($_POST['TaxTotal']))/$ExRate) . "')"; + '" . $_SESSION['Items' . $identifier]->DebtorNo . "', + '" . -(($_SESSION['Items' . $identifier]->total + filter_number_format($_POST['TaxTotal']))/$ExRate) . "')"; $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'); @@ -1398,7 +1400,7 @@ } - foreach ( $_SESSION['Items'.$identifier]->TaxTotals as $TaxAuthID => $TaxAmount){ + foreach ( $_SESSION['Items' . $identifier]->TaxTotals as $TaxAuthID => $TaxAmount){ if ($TaxAmount !=0 ){ $SQL = "INSERT INTO gltrans ( type, typeno, @@ -1411,8 +1413,8 @@ '" . $CreditNoteNo . "', '" . $ReturnDate . "', '" . $PeriodNo . "', - '" . $_SESSION['Items'.$identifier]->TaxGLCodes[$TaxAuthID] . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items' . $identifier]->TaxGLCodes[$TaxAuthID] . "', + '" . $_SESSION['Items' . $identifier]->DebtorNo . "', '" . ($TaxAmount/$ExRate) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); @@ -1440,7 +1442,7 @@ '" . $ReturnDate . "', '" . $PeriodNo . "', '" . $_POST['BankAccount'] . "', - '" . $_SESSION['Items'.$identifier]->LocationName . ' ' . _('Counter Return') . ' ' . $CreditNoteNo . "', + '" . $_SESSION['Items' . $identifier]->LocationName . ' ' . _('Counter Return') . ' ' . $CreditNoteNo . "', '" . -(filter_number_format($_POST['AmountPaid'])/$ExRate) . "')"; $DbgMsg = _('The SQL that failed to insert the GL transaction for the bank account debit was'); $ErrMsg = _('Cannot insert a GL transaction for the bank account debit'); @@ -1448,19 +1450,19 @@ /* Now Debit Debtors account with negative receipt/payment to customer */ $SQL="INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (12, - '" . $PaymentNumber . "', - '" . $ReturnDate . "', - '" . $PeriodNo . "', - '" . $_SESSION['CompanyRecord']['debtorsact'] . "', - '" . $_SESSION['Items'.$identifier]->LocationName . ' ' . _('Counter Return') . ' ' . $CreditNoteNo . "', - '" . (filter_number_format($_POST['AmountPaid'])/$ExRate) . "')"; + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (12, + '" . $PaymentNumber . "', + '" . $ReturnDate . "', + '" . $PeriodNo . "', + '" . $_SESSION['CompanyRecord']['debtorsact'] . "', + '" . $_SESSION['Items' . $identifier]->LocationName . ' ' . _('Counter Return') . ' ' . $CreditNoteNo . "', + '" . (filter_number_format($_POST['AmountPaid'])/$ExRate) . "')"; $DbgMsg = _('The SQL that failed to insert the GL transaction for the debtors account credit was'); $ErrMsg = _('Cannot insert a GL transaction for the debtors account credit'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); @@ -1498,25 +1500,25 @@ ... [truncated message content] |
From: <dai...@us...> - 2013-06-25 08:53:06
|
Revision: 6036 http://sourceforge.net/p/web-erp/reponame/6036 Author: daintree Date: 2013-06-25 08:53:03 +0000 (Tue, 25 Jun 2013) Log Message: ----------- New maintenance module and bank transactions importation Added Paths: ----------- trunk/ImportBankTrans.php trunk/ImportBankTransAnalysis.php trunk/MaintenanceReminders.php trunk/MaintenanceTasks.php trunk/MaintenanceUserSchedule.php trunk/includes/DefineImportBankTransClass.php Added: trunk/ImportBankTrans.php =================================================================== --- trunk/ImportBankTrans.php (rev 0) +++ trunk/ImportBankTrans.php 2013-06-25 08:53:03 UTC (rev 6036) @@ -0,0 +1,611 @@ +<?php + +/* $Id: ImportBankTrans.php 4213 2010-12-22 14:33:20Z tim_schofield $*/ +include('includes/DefineImportBankTransClass.php'); +include ('includes/session.inc'); + +$Title = _('Import Bank Transactions'); + +include ('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +/* +Read in the flat file one line at a time +parse the data in the line of text from the flat file to read the bank transaction into an SESSION array of banktransactions objects +*/ + +if (!isset($_FILES['ImportFile']) AND !isset($_SESSION['Statement'])) { + echo '<form name="ImportForm" enctype="multipart/form-data" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table> + <tr> + <td>'. _('MT940 format Bank Statement File to import').'</td> + <td><input type="file" id="ImportFile" name="ImportFile"></td> + </tr> + </table>'; + echo '<div class="centre"><input type="submit" name="Import" value="Process"></div>'; + echo '</form>'; + +} elseif (isset($_POST['Import'])){ + + $result = $_FILES['ImportFile']['error']; + $ReadTheFile = 'Yes'; //Assume all is well to start off with + + //But check for the worst + if ($_FILES['ImportFile']['size'] > (1024*1024)) { //File Size Check + prnMsg(_('The file size is over the maximum allowed. The maximum size allowed is 1 megabyte'),'warn'); + $ReadTheFile ='No'; + } + + /*elseif ( $_FILES['ImportFile']['type'] != 'text/plain' ) { //File Type Check + prnMsg( _('A plain text file is expected, this file is a') . ' ' . $_FILES['ImportFile']['type'],'warn'); + $ReadTheFile ='No'; + } */ + + if ($ReadTheFile=='No'){ + prnMsg(_('The MT940 bank statement file cannot be imported and processed'),'error'); + include('includes/footer.inc'); + exit; + } + $fp = fopen($_FILES['ImportFile']['tmp_name'], 'r'); + + $TransactionLine = false; + $i=0; + $_SESSION['Statement'] = new BankStatement; + $_SESSION['Trans'] = array(); + + $_SESSION['Statement']->FileName = $_FILES['ImportFile']['tmp_name']; + + while ($LineText = fgets($fp)){ /* get each line of the order file */ + /* + * This block of code could be in an include and different includes included depending on which type of transaction file is being imported + * */ + + if (substr($LineText,0,4)==':20:'){ //Timestamp of report MT940 generation + $_SESSION['Statement']->ReportCreated = substr($LineText,4); //in format DDDHHMM where DDD is the number of day in year and HHMM is the time + $TransactionLine = false; + } + if (substr($LineText,0,4)==':25:'){//The account number in IBAN format + $_SESSION['Statement']->AccountNumber = trim(substr($LineText,4)); + $TransactionLine = false; + } + if (substr($LineText,0,5)==':28C:'){//The statement number + $_SESSION['Statement']->StatementNumber = trim(substr($LineText,5)); + $TransactionLine = false; + } + if (substr($LineText,0,6)==':NS:22'){//The account owner name + $_SESSION['Statement']->AccountOwner = trim(substr($LineText,6)); + $TransactionLine = false; + } + if (substr($LineText,0,6)==':NS:23'){//The account name + $_SESSION['Statement']->AccountName = trim(substr($LineText,6)); + $TransactionLine = false; + } + if (substr($LineText,0,5)==':60F:'){//The account opening balance + $DebitOrCredit = substr($LineText,5,1); //D or C + $_SESSION['Statement']->OpeningDate = ConvertSQLDate('20' . substr($LineText,6,2) . '-' . substr($LineText,8,2) . '-' . substr($LineText,10,2)); + $_SESSION['Statement']->CurrCode = substr($LineText,12,3); + if ($DebitOrCredit =='D'){ + $_SESSION['Statement']->OpeningBalance = doubleval(str_replace(',','.',substr($LineText,15))); + } else { + $_SESSION['Statement']->OpeningBalance = doubleval('-' . str_replace(',','.',substr($LineText,15))); + } + $TransactionLine = false; + } + if (substr($LineText,0,4)==':61:'){//It's a transaction line + $TransactionLine = true; + $TransDate = ConvertSQLDate('20' . substr($LineText,4,2) . '-' . substr($LineText,6,2) . '-' . substr($LineText,8,2)); + $DebitOrCredit = substr($LineText,10,1); //D or C or R + if ($DebitOrCredit =='R'){ //then it is a 2 character reversal + if (substr($LineText,10,2)=='RC'){ + $DebitOrCredit ='D'; + } else { + $DebitOrCredit ='C'; + } + if ($DebitOrCredit =='D'){ + $TransAmount = doubleval(str_replace(',','.',substr($LineText,12,-10))); + } else { + $TransAmount = doubleval('-' . str_replace(',','.',substr($LineText,12,-10))); + } + } else { // it will be either D or C + if ($DebitOrCredit =='D'){ + $TransAmount = doubleval(str_replace(',','.',substr($LineText,11,-10))); + } else { + $TransAmount = doubleval('-' . str_replace(',','.',substr($LineText,11,-10))); + } + } + $i++; + $_SESSION['Trans'][$i] = new BankTrans($TransDate,$TransAmount) ; + } + if (substr($LineText,0,4)==':86:'){ + if ($TransactionLine) { + $_SESSION['Trans'][$i]->Code = substr($LineText,4,3); + $_SESSION['Trans'][$i]->Description = substr($LineText,7); + } + } + + if (substr($LineText,0,1)!=':' AND $TransactionLine){ + //then it is the continuation of an :86: line + $_SESSION['Trans'][$i]->Description .= $LineText; + } + + if (substr($LineText,0,5)==':62F:'){ + $DebitOrCredit = substr($LineText,5,1); //D or C + $_SESSION['Statement']->ClosingDate = ConvertSQLDate('20' . substr($LineText,6,2) . '-' . substr($LineText,8,2) . '-' . substr($LineText,10,2)); + $CurrCode = substr($LineText,12,3); + if ($DebitOrCredit =='D'){ + $_SESSION['Statement']->ClosingBalance = doubleval(str_replace(',','.',substr($LineText,15))); + } else { + $_SESSION['Statement']->ClosingBalance = doubleval('-' . str_replace(',','.',substr($LineText,15))); + } + $TransactionLine = false; + } + /* end of MT940 specific import code - that could be in an include if we get other file formats + * */ + } /*end while get next line of message */ + + /* Look to match up the account for which transactions are being imported with a bank account in webERP */ + $sql = "SELECT accountcode, + bankaccountname, + decimalplaces, + rate + FROM bankaccounts INNER JOIN currencies + ON bankaccounts.currcode=currencies.currabrev + WHERE bankaccountnumber " . LIKE . " '" . $_SESSION['Statement']->AccountNumber ."' + AND currcode = '" . $_SESSION['Statement']->CurrCode . "'"; + + $ErrMsg = _('Could not retrieve bank accounts that match with the statement being imported'); + + $result = DB_query($sql,$db,$ErrMsg); + if (DB_num_rows($result)==0){ //but check for the worst! + //there is no bank account set up for the bank account being imported + prnMsg(_('The account') . ' ' . $_SESSION['Statement']->AccountNumber . ' ' . _('is not defined as a bank account of the business. No imports can be processed'), 'warn'); + } else { + $BankAccountRow = DB_fetch_array($result); + $_SESSION['Statement']->BankGLAccount = $BankAccountRow['accountcode']; + $_SESSION['Statement']->BankAccountName = $BankAccountRow['bankaccountname']; + $_SESSION['Statement']->CurrDecimalPlaces = $BankAccountRow['decimalplaces']; + $_SESSION['Statement']->ExchangeRate = $BankAccountRow['rate']; + + /* Now check to see if each transaction has already been entered */ + for($i=1;$i<=count($_SESSION['Trans']);$i++){ + + $SQL = "SELECT banktransid FROM banktrans + WHERE transdate='" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "' + AND amount='" . $_SESSION['Trans'][$i]->Amount . "' + AND bankact='" . $_SESSION['Statement']->BankGLAccount . "'"; + $result = DB_query($SQL,$db,_('There was a problem identifying a matching bank transaction')); + if (DB_num_rows($result)>0){ + $myrow = DB_fetch_array($result); + $_SESSION['Trans'][$i]->BankTransID = $myrow['banktransid']; + } + } + } //end if there is a matching bank account in the system +} //end if read in transaction/statement + +if (isset($_POST['ProcessBankTrans'])){ + $InputError = false; //assume the best + if ($_SESSION['Statement']->CurrCode != $_SESSION['CompanyRecord']['currencydefault'] + AND $_POST['ExchangeRate']==1){ + prnMsg(_('It is necessary to enter the exchange rate to convert the bank receipts and payments into local currency for the purposes of calculating the general ledger entries necessary. The currency of this bank account is not the same as the company functional currency so an exchange rate of 1 is inappropriate'),'error'); + $InputError = true; + } + if (!is_numeric($_POST['ExchangeRate'])){ + prnMsg(_('The exchange rate is expected to be the number of the bank account currency that would purchase one unit of the company functional currency. A number is expected'),'error'); + $InputError = true; + } + if ($InputError == false){ + /*This is it - process the data into the DB + * First check to see if the item is flagged as matching an existing bank transaction - if it does and there is no analysis of the transaction then we need to flag the existing bank transaction as matched off the bank statement for reconciliation purposes. + * Then, if the transaction is analysed: + * 1. create the bank transaction + * 2. if it is a debtor receipt create a debtortrans systype 12 against the selected customer + * 3. if it is a supplier payment create a supptrans systype 22 against the selected supplier + * 4. create the gltrans for either the gl analysis or the debtor/supplier receipt/payment created + */ + + for($i=1;$i<=count($_SESSION['Trans']);$i++){ + DB_Txn_Begin($db); + if ($_SESSION['Trans'][$i]->DebtorNo!='' OR + $_SESSION['Trans'][$i]->SupplierID!='' OR + $_SESSION['Trans'][$i]->GLTotal == $_SESSION['Trans'][$i]->Amount){ + /*A Debtor or Supplier is entered or there is GL analysis for the bank trans + */ + $PeriodNo = GetPeriod($_SESSION['Trans'][$i]->ValueDate,$db); + $InsertBankTrans = true; + } elseif ($_SESSION['Trans'][$i]->BankTransID!=0) { + //Update the banktrans to show it has cleared the bank + $result = DB_query("UPDATE banktrans SET amountcleared=amount + WHERE banktransid = '" . $_SESSION['Trans'][$i]->BankTransID . "'", + $db, + _('Could not update the bank transaction as cleared'), + _('The SQL that failed to update the bank transaction as cleared was'), + true); + $InsertBankTrans = false; + } else { + $InsertBankTrans = false; + } + + if ($_SESSION['Trans'][$i]->Amount >0){ //its a receipt + + if ($_SESSION['Trans'][$i]->DebtorNo!='') { + $TransType = 12; + $TransNo = GetNextTransNo(12,$db); //debtors receipt + /* First insert the debtortrans record */ + $result = DB_query("INSERT INTO debtortrans (transno, + type, + debtorno, + trandate, + inputdate, + prd, + rate, + reference, + invtext, + ovamount) + VALUES ('" . $TransNo . "', + '" . $TransType . "', + '" . $_SESSION['Trans'][$i]->DebtorNo . "', + '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + '" . Date('Y-m-d h:m:s') . "', + '" . $PeriodNo . "', + '" . $_POST['ExchangeRate'] . "', + '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', + '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', + '" . -$_SESSION['Trans'][$i]->Amount . "')", + $db, + _('Could not insert the customer transaction'), + _('The SQL used to insert the debtortrans was'), + true); + /*Now update the debtors master for the last payment date */ + $result = DB_query("UPDATE debtorsmaster + SET lastpaiddate = '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + lastpaid='" . $_SESSION['Trans'][$i]->Amount ."' + WHERE debtorno='" . $_SESSION['Trans'][$i]->DebtorNo . "'", + $db, + _('Could not update the last payment date and amount paid'), + _('The SQL that failed to update the debtorsmaster was'), + true); + + /* Now insert the gl trans to credit debtors control and debit bank account */ + /*First credit debtors control from CompanyRecord */ + $result = DB_query("INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (12, + '" . $TransNo . "', + '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + '" . $PeriodNo . "', + '" . $_SESSION['CompanyRecord']['debtorsact'] . "', + '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', + '" . -round($_SESSION['Trans'][$i]->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", + $db, + _('Cannot insert a GL entry for the receipt because'), + _('The SQL that failed to insert the receipt GL entry was'), + true); + /*Now debit the bank account from $_SESSION['Statement']->BankGLAccount */ + $result = DB_query("INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (12, + '" . $TransNo . "', + '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + '" . $PeriodNo . "', + '" . $_SESSION['Statement']->BankGLAccount . "', + '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', + '" . round($_SESSION['Trans'][$i]->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", + $db, + _('Cannot insert a GL entry for the receipt because'), + _('The SQL that failed to insert the receipt GL entry was'), + true); + + } elseif ($_SESSION['Trans'][$i]->GLTotal == $_SESSION['Trans'][$i]->Amount){ + $TransType=2; //gl receipt + $TransNo = GetNextTransNo(2,$db); + foreach ($_SESSION['Trans'][$i]->GLEntries as $GLAnalysis){ + /*Credit each analysis account */ + $result = DB_query("INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (2, + '" . $TransNo . "', + '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + '" . $PeriodNo . "', + '" . $GLAnalysis->GLCode . "', + '" . DB_escape_string($GLAnalysis->Narrative . ' ' . $_SESSION['Trans'][$i]->Description) . "', + '" . -round($GLAnalysis->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", + $db, + _('Cannot insert a GL entry for the receipt gl analysis because'), + _('The SQL that failed to insert the gl analysis of this receipt was'), + true); + + } //end loop around GLAnalysis + /*Now debit the bank account from $_SESSION['Statement']->BankGLAccount */ + $result = DB_query("INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (2, + '" . $TransNo . "', + '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + '" . $PeriodNo . "', + '" . $_SESSION['Statement']->BankGLAccount . "', + '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', + '" . round($_SESSION['Trans'][$i]->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", + $db, + _('Cannot insert a GL entry for the receipt because'), + _('The SQL that failed to insert the receipt GL entry was'), + true); + } + } else { //its a payment + if ($_SESSION['Trans'][$i]->SupplierID!='') { //its a supplier payment + $TransType = 22; + $TransNo = GetNextTransNo(22,$db); + $result = DB_query("INSERT INTO supptrans (transno, + type, + supplierno, + trandate, + inputdate, + duedate, + rate, + suppreference, + transtext, + ovamount) + VALUES ('" . $TransNo . "', + '" . $TransType . "', + '" . $_SESSION['Trans'][$i]->SupplierID . "', + '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + '" . Date('Y-m-d h:m:s') . "', + '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + '" . $_POST['ExchangeRate'] . "', + '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', + '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', + '" . $_SESSION['Trans'][$i]->Amount . "')", + $db, + _('Could not insert the supplier transaction'), + _('The SQL used to insert the supptrans was'), + true); + /*Now update the suppliers master for the last payment date */ + $result = DB_query("UPDATE suppliers + SET lastpaiddate = '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + lastpaid='" . $_SESSION['Trans'][$i]->Amount ."' + WHERE supplierid='" . $_SESSION['Trans'][$i]->SupplierID . "'", + $db, + _('Could not update the supplier last payment date and amount paid'), + _('The SQL that failed to update the supplier with the last payment amount and date was'), + true); + /* Now insert the gl trans to debit creditors control and credit bank account */ + /*First debit creditors control from CompanyRecord */ + $result = DB_query("INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (22, + '" . $TransNo . "', + '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + '" . $PeriodNo . "', + '" . $_SESSION['CompanyRecord']['creditorsact'] . "', + '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', + '" . round(-$_SESSION['Trans'][$i]->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", + $db, + _('Cannot insert a GL entry for the supplier payment to creditors control because'), + _('The SQL that failed to insert the creditors control GL entry was'), + true); + /*Now credit the bank account from $_SESSION['Statement']->BankGLAccount + * note payments are recorded as negatives in the import */ + $result = DB_query("INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (22, + '" . $TransNo . "', + '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + '" . $PeriodNo . "', + '" . $_SESSION['Statement']->BankGLAccount . "', + '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', + '" . round($_SESSION['Trans'][$i]->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", + $db, + _('Cannot insert a GL entry for the supplier payment because'), + _('The SQL that failed to insert the supplier payment GL entry to the bank account was'), + true); + + } elseif($_SESSION['Trans'][$i]->GLTotal == $_SESSION['Trans'][$i]->Amount){ + //its a GL payment + $TransType = 1; //gl payment + $TransNo = GetNextTransNo(1,$db); + foreach ($_SESSION['Trans'][$i]->GLEntries as $GLAnalysis){ + /*Debit each analysis account note payments are recorded as negative so need negative negative to make a debit (positive)*/ + $result = DB_query("INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (1, + '" . $TransNo . "', + '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + '" . $PeriodNo . "', + '" . $GLAnalysis->GLCode . "', + '" . DB_escape_string($GLAnalysis->Narrative . ' ' . $_SESSION['Trans'][$i]->Description) . "', + '" . -round($GLAnalysis->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", + $db, + _('Cannot insert a GL entry for the payment gl analysis because'), + _('The SQL that failed to insert the gl analysis of this payment was'), + true); + + } //end loop around GLAnalysis + /*Now credit the gl account from $_SESSION['Statement']->BankGLAccount + * Note payments are negatives*/ + $result = DB_query("INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (1, + '" . $TransNo . "', + '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + '" . $PeriodNo . "', + '" . $_SESSION['Statement']->BankGLAccount . "', + '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', + '" . round($_SESSION['Trans'][$i]->Amount/$_POST['ExchangeRate'],$_SESSION['CompanyRecord']['decimalplaces']+1) . "')", + $db, + _('Cannot insert a GL entry for the payment because'), + _('The SQL that failed to insert the payment GL entry was'), + true); + } + + } //end if its a payment + if ($InsertBankTrans==true){ + /* Now insert the bank transaction if necessary */ + /* it is not possible to import transaction that were originally in another currency converted to the currency of the bank account by the bank - these entries would need to be done through the usual method */ + + $result=DB_query("INSERT INTO banktrans (transno, + type, + bankact, + ref, + exrate, + functionalexrate, + transdate, + banktranstype, + amount, + currcode, + amountcleared) + VALUES ( + '" . $TransNo . "', + '" . $TransType . "', + '" . $_SESSION['Statement']->BankGLAccount . "', + '" . DB_escape_string($_SESSION['Trans'][$i]->Description) . "', + '1', + '" . $_POST['ExchangeRate'] . "', + '" . FormatDateForSQL($_SESSION['Trans'][$i]->ValueDate) . "', + '" . _('Imported') . "', + '" . $_SESSION['Trans'][$i]->Amount . "', + '" . $_SESSION['Statement']->CurrCode . "', + '" . $_SESSION['Trans'][$i]->Amount . "')", + $db, + _('Could not insert the bank transaction'), + _('The SQL that failed to insert the bank transaction was'), + true); + } + DB_Txn_Commit($db); // complete this bank transactions posting + } //end loop around the transactions + echo '<p />'; + prnMsg(_('Completed the importing of analysed bank transactions'),'info'); + unset($_SESSION['Trans']->GLEntries); + unset($_SESSION['Trans']); + unset($_SESSION['Statement']); + } // there were no input errors - the exchange rate was entered +} + + + +if (isset($_SESSION['Statement'])){ + + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post" >'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + if (!isset($_SESSION['Statement']->BankGLAccount)){ + $AllowImport = false; + } else { + $AllowImport = true; + } + /* show the statement in any event - just don't have links to process transactions if NOT $AllowImport + */ + echo '<table class="selection"> + <tr> + <th colspan="5">' . _('Bank Statement No') . ' ' . $_SESSION['Statement']->StatementNumber . ' ' . _('for') . ' ' . $_SESSION['Statement']->BankAccountName . ' ' . _('Number') . ' ' . $_SESSION['Statement']->AccountNumber . '</th> + </tr> + <tr> + <th colspan ="3">' . _('Opening Balance as at') . ' ' . $_SESSION['Statement']->OpeningDate . ' ' . _('in') . ' ' .$_SESSION['Statement']->CurrCode . '</th>'; + if ($_SESSION['Statement']->OpeningBalance >=0){ + echo '<th class="number">' . number_format($_SESSION['Statement']->OpeningBalance,$_SESSION['Statement']->CurrDecimalPlaces) . '</th><th></th></tr>'; + } else { + echo '<th></th><th class="number">' . number_format($_SESSION['Statement']->OpeningBalance,$_SESSION['Statement']->CurrDecimalPlaces) . '</th></tr>'; + } + for ($i=1; $i<=count($_SESSION['Trans']); $i++){ + + if ($_SESSION['Trans'][$i]->Amount >0){ + if ($_SESSION['Trans'][$i]->DebtorNo!='' + OR $_SESSION['Trans'][$i]->GLTotal == $_SESSION['Trans'][$i]->Amount){ + echo '<tr style="background-color: #FFFCCC;">'; + } elseif ($_SESSION['Trans'][$i]->BankTransID!=0) { + echo '<tr style="background-color: #FFF222;">'; + } else { + echo '<tr>'; + } + } else { //its a payment + if ($_SESSION['Trans'][$i]->SupplierID!='' + OR $_SESSION['Trans'][$i]->GLTotal == $_SESSION['Trans'][$i]->Amount){ + echo '<tr style="background-color: #FFFCCC;">'; + } elseif ($_SESSION['Trans'][$i]->BankTransID!=0) { + echo '<tr style="background-color: #FFF222;">'; + } else { + echo '<tr>'; + } + } + echo '<td>' . $_SESSION['Trans'][$i]->Code . '</td> + <td>' . $_SESSION['Trans'][$i]->ValueDate . '</td> + <td>' . $_SESSION['Trans'][$i]->Description . '</td>'; + + if ($_SESSION['Trans'][$i]->Amount>=0){ + echo '<td class="number">' . number_format($_SESSION['Trans'][$i]->Amount,$_SESSION['Statement']->CurrDecimalPlaces) . '</td><td></td>'; + } else { + echo '<td></td><td class="number">' . number_format($_SESSION['Trans'][$i]->Amount,$_SESSION['Statement']->CurrDecimalPlaces) . '</td>'; + } + if ($AllowImport==true) { + echo '<td><a href="' . $RootPath . '/ImportBankTransAnalysis.php?TransID=' . $i .'">' . _('Analysis') .'</a></td>'; + } + echo '</tr>'; + } + echo '<tr> + <th colspan="3">' . _('Closing Balance as at') . ' ' . $_SESSION['Statement']->ClosingDate . ' ' . _('in') . ' ' .$_SESSION['Statement']->CurrCode . '</th>'; + if ($_SESSION['Statement']->ClosingBalance>=0){ + echo '<th class="number">' . number_format($_SESSION['Statement']->ClosingBalance,$_SESSION['Statement']->CurrDecimalPlaces) . '</th><th></th> + </tr>'; + } else { + echo '<th></th><th class="number">' . number_format($_SESSION['Statement']->ClosingBalance,$_SESSION['Statement']->CurrDecimalPlaces) . '</th> + </tr>'; + } + echo '</table>'; + echo '<br /> + <table class="selection">'; + if ($_SESSION['Statement']->CurrCode!=$_SESSION['CompanyRecord']['currencydefault']){ + + echo '<tr> + <td>' . _('Exchange Rate to Use When Processing Transactions') . '</td> + <td><input type="text" class="number" name="ExchangeRate" value="' . $_SESSION['Statement']->ExchangeRate . '" /></td> + </tr>'; + } else { + echo '<input type="hidden" name="ExchangeRate" value="1" />'; + } + echo '<tr> + <th colspan="2"><input type="submit" name="ProcessBankTrans" value="' . _('Process Bank Transactions') . '" onclick="return confirm(\'' . _('This process will create bank transactions for ONLY THE ANALYSED transactions shown in yellow above together with the necessary general ledger journals and customer or supplier transactions. Are You Sure?') . '\');" /></th> + </tr> + </table>'; +} + + +include ('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/ImportBankTransAnalysis.php =================================================================== --- trunk/ImportBankTransAnalysis.php (rev 0) +++ trunk/ImportBankTransAnalysis.php 2013-06-25 08:53:03 UTC (rev 6036) @@ -0,0 +1,326 @@ +<?php + +/* $Id: SuppTransGLAnalysis.php 4578 2011-05-28 11:01:00Z daintree $*/ + +/*The ImportBankTransClass contains the structure ofinformation about the transactions +An array of class BankTrans objects - containing details of the bank transactions has an array of +GLEntries objects to hold the GL analysis for each transaction */ + +include('includes/DefineImportBankTransClass.php'); + +/* Session started in header.inc for password checking and authorisation level check */ +include('includes/session.inc'); + +$Title = _('Imported Bank Transaction General Ledger Analysis'); + +include('includes/header.inc'); + +if (!isset($_SESSION['Trans'])){ + prnMsg(_('This page can only be called from the importation of bank transactions page which sets up the data to receive the analysed general ledger entries'),'info'); + echo '<br /><a href="' . $RootPath . '/ImportBankTrans.php">' . _('Import Bank Transactions') . '</a>'; + include('includes/footer.inc'); + exit; + /*It all stops here if there aint no bank transactions being imported i.e. $_SESSION['Trans'] has not been initiated + * */ +} + +if (isset($_GET['TransID'])){ + $TransID = $_GET['TransID']; +} else { + $TransID = $_POST['TransID']; +} +if (!isset($TransID)){ + prnMsg(_('This page can only be called from the importation of bank transactions page which sets up the data to receive the analysed general ledger entries'),'info'); + echo '<br /><a href="' . $RootPath . '/ImportBankTrans.php">' . _('Import Bank Transactions') . '</a>'; + include('includes/footer.inc'); + exit; +} + +if ($_SESSION['Trans'][$TransID]->BankTransID != 0) { + prnMsg(_('This transaction appears to be already entered against this bank account. By entering values in this analysis form the transaction will be entered again. Only proceed to analyse this transaction if you are sure it has not already been processed'),'warn'); + echo '<br /><div class="centre"><a href="' . $RootPath . '/ImportBankTrans.php">' . _('Back to Main Import Screen - Recommended') . '</a></div>'; + +} + +if (isset($_POST['DebtorNo'])){ + $_SESSION['Trans'][$TransID]->DebtorNo = $_POST['DebtorNo']; +} +if (isset($_POST['SupplierID'])){ + $_SESSION['Trans'][$TransID]->SupplierID = $_POST['SupplierID']; +} +/*If the user hit the Add to transaction button then process this first before showing all GL codes on the transaction otherwise it wouldnt show the latest addition*/ + +if (isset($_POST['AddGLCodeToTrans']) AND $_POST['AddGLCodeToTrans'] == _('Enter GL Line')){ + + $InputError = False; + if ($_POST['GLCode'] == ''){ + $_POST['GLCode'] = $_POST['AcctSelection']; + } + + if ($_POST['GLCode'] == ''){ + prnMsg( _('You must select a general ledger code from the list below') ,'warn'); + $InputError = True; + } + + $sql = "SELECT accountcode, + accountname + FROM chartmaster + WHERE accountcode='" . $_POST['GLCode'] . "'"; + $result = DB_query($sql, $db); + if (DB_num_rows($result) == 0 AND $_POST['GLCode'] != ''){ + prnMsg(_('The account code entered is not a valid code') . '. ' . _('This line cannot be added to the transaction') . '.<br />' . _('You can use the selection box to select the account you want'),'error'); + $InputError = True; + } else if ($_POST['GLCode'] != '') { + $myrow = DB_fetch_row($result); + $GLActName = $myrow[1]; + if (!is_numeric($_POST['Amount'])){ + prnMsg( _('The amount entered is not numeric') . '. ' . _('This line cannot be added to the transaction'),'error'); + $InputError = True; + } + } + + if ($InputError == False){ + + $_SESSION['Trans'][$TransID]->Add_To_GLAnalysis($_POST['Amount'], + $_POST['Narrative'], + $_POST['GLCode'], + $GLActName, + $_POST['GLTag'] ); + unset($_POST['GLCode']); + unset($_POST['Amount']); + unset($_POST['Narrative']); + unset($_POST['AcctSelection']); + unset($_POST['GLTag']); + } +} + +if (isset($_GET['Delete'])){ + $_SESSION['Trans'][$TransID]->Remove_GLEntry($_GET['Delete']); +} + +if (isset($_GET['Edit'])){ + $_POST['GLCode'] = $_SESSION['Trans'][$TransID]->GLEntries[$_GET['Edit']]->GLCode; + $_POST['AcctSelection']= $_SESSION['Trans'][$TransID]->GLEntries[$_GET['Edit']]->GLCode; + $_POST['Amount'] = $_SESSION['Trans'][$TransID]->GLEntries[$_GET['Edit']]->Amount; + $_POST['GLTag'] = $_SESSION['Trans'][$TransID]->GLEntries[$_GET['Edit']]->Tag; + $_POST['Narrative'] = $_SESSION['Trans'][$TransID]->GLEntries[$_GET['Edit']]->Narrative; + $_SESSION['Trans'][$TransID]->Remove_GLEntry($_GET['Edit']); +} + +/*Show all the selected GLEntries so far from the $_SESSION['Trans'][$TransID]->GLEntries array */ +if ($_SESSION['Trans'][$TransID]->Amount >= 0){ //its a receipt + echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/transactions.png" title="' . _('Bank Account Transaction Analysis') . '" alt="" />' . ' ' + . _('Imported Bank Receipt of') . ' ' . $_SESSION['Trans'][$TransID]->Amount . ' ' . $_SESSION['Statement']->CurrCode . ' ' . _('dated:') . ' ' . $_SESSION['Trans'][$TransID]->ValueDate . '<br /> ' . $_SESSION['Trans'][$TransID]->Description; +} else { + echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/transactions.png" title="' . _('Bank Account Transaction Analysis') . '" alt="" />' . ' ' + . _('Imported Bank Payment of') . ' ' . $_SESSION['Trans'][$TransID]->Amount . ' ' . $_SESSION['Statement']->CurrCode . ' ' ._('dated:') . ' ' . $_SESSION['Trans'][$TransID]->ValueDate . '<br /> ' . $_SESSION['Trans'][$TransID]->Description; +} + +/*Set up a form to allow input of new GL entries */ +echo '</p><form name="form1" action="' . $_SERVER['PHP_SELF'] . '" method="post">'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + +echo '<input type="hidden" name="TransID" value=' . $TransID . ' />'; + +echo '<div class="centre"><a href="' . $RootPath . '/ImportBankTrans.php" onclick="return confirm(\'' . _('If you have entered a GL analysis check that the sum of GL Entries agrees to the total bank transaction. If it does not then the bank transaction import will not be processed.') . '\');">' . _('Back to Main Import Screen') . '</a></div>'; + +echo '<br /><table cellpadding="2" class="selection">'; + +$AllowGLAnalysis = true; + +if ($_SESSION['Trans'][$TransID]->Amount<0){ //its a payment + echo '<tr> + <td>' . _('Payment to Supplier Account') . ':</td> + <td><select name="SupplierID" onChange="ReloadForm(form1.Update)">'; + + $result = DB_query("SELECT supplierid, + suppname + FROM suppliers + WHERE currcode='" . $_SESSION['Statement']->CurrCode . "' + ORDER BY suppname",$db); + if ($_SESSION['Trans'][$TransID]->SupplierID ==''){ + echo '<option selected value="">' . _('GL Payment') . '</option>'; + } else { + echo '<option value="">' . _('GL Payment') . '</option>'; + } + while ($myrow = DB_fetch_array($result)){ + if ($myrow['supplierid']==$_SESSION['Trans'][$TransID]->SupplierID){ + echo '<option selected value="' . $myrow['supplierid'] . '">' . $myrow['supplierid'] . ' - ' . $myrow['suppname'] . '</option>'; + } else { + echo '<option value="' . $myrow['supplierid'] . '">' . $myrow['supplierid'] .' - ' . $myrow['suppname'] . '</option>'; + } + } + echo '</select></td> + <td><input type="submit" name="Update" value="' . _('Update') . '" /></td> + </tr>'; + if ($_SESSION['Trans'][$TransID]->SupplierID==''){ + $AllowGLAnalysis = true; + } else { + $AllowGLAnalysis = false; + } + echo '</table>'; +} else { //its a receipt + echo '<tr> + <td>' . _('Receipt to Customer Account') . ':</td> + <td><select name="DebtorNo" onChange="ReloadForm(form1.Update)">'; + + $result = DB_query("SELECT debtorno, + name + FROM debtorsmaster + WHERE currcode='" . $_SESSION['Statement']->CurrCode . "' + ORDER BY name",$db); + if ($_SESSION['Trans'][$TransID]->DebtorNo ==''){ + echo '<option selected value="">' . _('GL Receipt') . '</option>'; + } else { + echo '<option value="">' . _('GL Receipt') . '</option>'; + } + while ($myrow = DB_fetch_array($result)){ + if ($myrow['debtorno']==$_SESSION['Trans'][$TransID]->DebtorNo){ + echo '<option selected value="' . $myrow['debtorno'] . '">' . $myrow['debtorno'] . ' - ' . $myrow['name'] . '</option>'; + } else { + echo '<option value="' . $myrow['debtorno'] . '">' . $myrow['debtorno'] . ' - ' . $myrow['name'] . '</option>'; + } + } + echo '</select></td> + <td><input type="submit" name="Update" value="' . _('Update') . '" /></td> + </tr>'; + if ($_SESSION['Trans'][$TransID]->DebtorNo==''){ + $AllowGLAnalysis = true; + } else { + $AllowGLAnalysis = false; + } + echo '</table>'; +} + +if ($AllowGLAnalysis==false){ + /*clear any existing GLEntries */ + foreach ($_SESSION['Trans'][$TransID]->GLEntries AS $GLAnalysisLine) { + $_SESSION['Trans'][$TransID]->Remove_GLEntry($GLAnalysisLine->ID); + } +} else { /*Allow GL Analysis == true */ + echo '</p><table cellpadding="2" class="selection">'; + $TableHeader = '<tr> + <th colspan="5">' . _('General ledger Analysis') . '</th> + </tr> + <tr> + <th>' . _('Account') . '</th> + <th>' . _('Name') . '</th> + <th>' . _('Amount') . '<br />' . _('in') . ' ' . $_SESSION['Statement']->CurrCode . '</th> + <th>' . _('Narrative') . '</th> + <th>' . _('Tag') . '</th> + </tr>'; + echo $TableHeader; + $TotalGLValue=0; + $i=0; + + foreach ( $_SESSION['Trans'][$TransID]->GLEntries AS $EnteredGLCode){ + + echo '<tr> + <td>' . $EnteredGLCode->GLCode . '</td> + <td>' . $EnteredGLCode->GLAccountName . '</td> + <td class=number>' . locale_number_format($EnteredGLCode->Amount,$_SESSION['Statement']->CurrDecimalPlaces) . '</td> + <td>' . $EnteredGLCode->Narrative . '</td> + <td>' . $EnteredGLCode->Tag . '</td> + <td><a href="' . $_SERVER['PHP_SELF'] . '?Edit=' . $EnteredGLCode->ID . '&TransID=' . $TransID . '">' . _('Edit') . '</a></td> + <td><a href="' . $_SERVER['PHP_SELF'] . '?Delete=' . $EnteredGLCode->ID . '&TransID=' . $TransID . '">' . _('Delete') . '</a></td> + </tr>'; + + $TotalGLValue += $EnteredGLCode->Amount; + + $i++; + if ($i>15){ + $i = 0; + echo $TableHeader; + } + } + + echo '<tr> + <td colspan="2" class="number"><font size=4 color=blue>' . _('Total of GL Entries') . ':</font></td> + <td class="number"><font size=2 color=navy>' . locale_number_format($TotalGLValue,$_SESSION['Statement']->CurrDecimalPlaces) . '</font></td> + </tr> + <tr> + <td colspan="2" class="number"><font size=4 color=blue>' . _('Total Bank Transaction') . ':</font></td> + <td class="number">' . locale_number_format($_SESSION['Trans'][$TransID]->Amount,$_SESSION['Statement']->CurrDecimalPlaces) . '</font></td> + </tr> + <tr>'; + + if (($_SESSION['Trans'][$TransID]->Amount - $TotalGLValue)!=0) { + echo '<td colspan="2" class="number"><font size=4 color=blue>' . _('Yet To Enter') . ':</font></td> + <td class="number"><font size="4" color="red">' . locale_number_format($_SESSION['Trans'][$TransID]->Amount-$TotalGLValue,$_SESSION['Statement']->CurrDecimalPlaces) . '</td>'; + } else { + echo '<th colspan="5"><font size="4" color="green">' . _('Reconciled') . '</th>'; + } + echo '</tr> + </table>'; + + + echo '<br /> + <table class="selection">'; + if (!isset($_POST['GLCode'])) { + $_POST['GLCode']=''; + } + echo '<tr> + <td>' . _('Account Code') . ':</td> + <td><input type="text" name="GLCode" size=12 maxlength=11 value="' . $_POST['GLCode'] . '"></td> + </tr>'; + echo '<tr> + <td>' . _('Account Selection') . ':<br />(' . _('If you know the code enter it above') . '<br />' . _('otherwise select the account from the list') . ')</td> + <td><select name="AcctSelection">'; + + $result = DB_query("SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode", $db); + echo '<option value=""></option>'; + while ($myrow = DB_fetch_array($result)) { + if ($myrow['accountcode'] == $_POST['AcctSelection']) { + echo '<option selected value="'; + } else { + echo '<option value="'; + } + echo $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + } + + echo '</select> + </td> + </tr>'; + if (!isset($_POST['Amount'])) { + $_POST['Amount']=0; + } + echo '<tr> + <td>' . _('Amount') . ':</td> + <td><input type="text" class="number" name="Amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '"></td> + </tr>'; + + if (!isset($_POST['Narrative'])) { + $_POST['Narrative']=''; + } + echo '<tr> + <td>' . _('Narrative') . ':</td> + <td><textarea name="Narrative" cols=40 rows=2>' . $_POST['Narrative'] . '</textarea></td> + </tr>'; + + //Select the tag + echo '<tr><td>' . _('Tag') . '</td> + <td><select name="GLTag">'; + + $SQL = "SELECT tagref, + tagdescription + FROM tags + ORDER BY tagref"; + + $result=DB_query($SQL,$db); + echo '<option value="0">0 - ' . _('None') . '</option>'; + while ($myrow=DB_fetch_array($result)){ + 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>'; + } + } + echo '</select></td> + </tr> + </table><br />'; + + echo '<div class="centre"><input type="submit" name="AddGLCodeToTrans" value="' . _('Enter GL Line') . '"></div>'; +} +echo '</form>'; +include('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/MaintenanceReminders.php =================================================================== --- trunk/MaintenanceReminders.php (rev 0) +++ trunk/MaintenanceReminders.php 2013-06-25 08:53:03 UTC (rev 6036) @@ -0,0 +1,84 @@ +<?php +/* $Id: MaintenaceReminders.php 4551 2011-04-16 06:20:56Z daintree $*/ +//this script can be set to run from cron +$AllowAnyone = true; +include('includes/session.inc'); +include('includes/htmlMimeMail.php'); + +$sql="SELECT description, + taskdescription, + ADDDATE(lastcompleted,frequencydays) AS duedate, + userresponsible, + email + FROM fixedassettasks + INNER JOIN fixedassets + ON fixedassettasks.assetid=fixedassets.assetid + INNER JOIN www_users + ON fixedassettasks.personresponsible=www_users.userid + WHERE ADDDATE(lastcompleted,frequencydays-10)> CURDATE() + ORDER BY userresponsible"; + +$result = DB_query($sql,$db); +$LastUserResponsible = ''; +while ($myrow = DB_fetch_array($result)){ + if (!isset($('Mail' . $myrow['userresponsible'])) AND IsEmailAddress($myrow['email'])){ + if ($LastUserResponsible!=''){ + $('Mail' . $myrow['userresponsible'])->setText($MailText); + $SendResult = $('Mail' . $myrow['userresponsible'])->send(array($LastUserEmail)); + $MailText = "You have the following maintenance task(s) falling due or over-due:\n"; + } + $LastUserResponsible = $myrow['userresponsible']; + $LastUserEmail = $myrow['email']; + $('Mail' . $myrow['userresponsible']) = new htmlMimeMail(); + $('Mail' . $myrow['userresponsible'])->setSubject('Maintenance Tasks Reminder'); + $('Mail' . $myrow['userresponsible'])->setFrom('Do_not_reply <>'); + } + $MailText .= "Asset: " . $myrow['description'] . "\nTask: " . $myrow['taskdescription'] . "\nDue: " . ConvertSQLDate($myrow['duedate']); + if (Date1GreaterThanDate2(ConvertSQLDate($myrow['duedate']),Date($_SESSION['DefaultDateFormat'])){ + $MailText .= _('NB: THIS JOB IS OVERDUE'); + } + $MailText . "\n\n"; +} +if (DB_num_rows($result)>0){ + $('Mail' . $LastUserResponsible)->setText($MailText); + $SendResult = $('Mail' . $LastUserResponsible)->send(array($('Mail' . $LastUserResponsible))); +} + +/* Now do manager emails for overdue jobs */ +$sql="SELECT description, + taskdescription, + ADDDATE(lastcompleted,frequencydays) AS duedate, + realname, + manager + FROM fixedassettasks + INNER JOIN fixedassets + ON fixedassettasks.assetid=fixedassets.assetid + INNER JOIN www_users + ON fixedassettasks.personresponsible=www_users.userid + WHERE ADDDATE(lastcompleted,frequencydays)> CURDATE() + ORDER BY manager"; + +$result = DB_query($sql,$db); +$LastManager = ''; +while ($myrow = DB_fetch_array($result)){ + if (!isset($('Mail' . $myrow['userresponsible'])){ + if ($LastUserResponsible!=''){ + $('Mail' . $myrow['userresponsible'])->setText($MailText); + $SendResult = $('Mail' . $myrow['manager'])->send(array($LastManagerEmail)); + $MailText = "Your staff have failed to complete the following tasks by the due date:\n"; + } + $LastManager = $myrow['manager']; + $LastManagerEmail = $myrow['email']; + $('Mail' . $myrow['manager']) = new htmlMimeMail(); + $('Mail' . $myrow['manager'])->setSubject('Overdue Maintenance Tasks Reminder'); + $('Mail' . $myrow['manager'])->setFrom('Do_not_reply <>'); + } + $MailText .= "Asset: " . $myrow['description'] . "\nTask: " . $myrow['taskdescription'] . "\nDue: " . ConvertSQLDate($myrow['duedate']); + $MailText . "\n\n"; +} +if (DB_num_rows($result)>0){ + $('Mail' . $LastManager)->setText($MailText); + $SendResult = $('Mail' . $LastManager)->send(array($LastManagerEmail)); +} + +?> \ No newline at end of file Added: trunk/MaintenanceTasks.php =================================================================== --- trunk/MaintenanceTasks.php (rev 0) +++ trunk/MaintenanceTasks.php 2013-06-25 08:53:03 UTC (rev 6036) @@ -0,0 +1,241 @@ +<?php + +/* $Id: MaintenanceTasks.php 5231 2012-04-07 18:10:09Z daitnree $*/ + +include('includes/session.inc'); + +$Title = _('Maintenance Tasks'); +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/group_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title.'</p><br />'; + + +if (isset($_POST['Submit'])) { + if (!is_numeric(filter_number_format($_POST['FrequencyDays'])) OR filter_number_format($_POST['FrequencyDays']) < 0){ + prnMsg(_('The days before a task falls due is expected to be a postive'),'error'); + } else { + $sql="INSERT INTO fixedassettasks (assetid, + taskdescription, + frequencydays, + userresponsible, + manager, + lastcompleted) + VALUES( '" . $_POST['AssetID'] . "', + '" . $_POST['TaskDescription'] . "', + '" . filter_number_format($_POST['FrequencyDays']) . "', + '" . $_POST['UserResponsible'] . "', + '" . $_POST['Manager'] . "', + '" . Date('Y-m-d') . "' )"; + $ErrMsg = _('The authentication details cannot be inserted because'); + $Result=DB_query($sql,$db,$ErrMsg); + unset($_POST['AssetID']); + unset($_POST['TaskDescription']); + unset($_POST['FrequencyDays']); + unset($_POST['Manager']); + unset($_POST['UserResponsible']); + } +} + +if (isset($_POST['Update'])) { + if (!is_numeric(filter_number_format($_POST['FrequencyDays'])) OR filter_number_format($_POST['FrequencyDays']) < 0){ + prnMsg(_('The days before a task falls due is expected to be a postive'),'error'); + } else { + $sql="UPDATE fixedassettasks SET + assetid = '" . $_POST['AssetID'] . "', + taskdescription='".$_POST['TaskDescription'] ."', + frequencydays='" . filter_number_format($_POST['FrequencyDays'])."', + userresponsible='" . $_POST['UserResponsible'] . "', + manager='" . $_POST['Manager'] . "' + WHERE taskid='".$_POST['TaskID']."'"; + + $ErrMsg = _('The task details cannot be updated because'); + $Result=DB_query($sql,$db,$ErrMsg); + unset($_POST['AssetID']); + unset($_POST['TaskDescription']); + unset($_POST['FrequencyDays']); + unset($_POST['Manager']); + unset($_POST['UserResponsible']); + } +} + +if (isset($_GET['Delete'])) { + $sql="DELETE FROM fixedassettasks + WHERE taskid='".$_GET['TaskID']."'"; + + $ErrMsg = _('The maintenance task cannot be deleted because'); + $Result=DB_query($sql,$db,$ErrMsg); +} + +$sql="SELECT taskid, + fixedassettasks.assetid, + description, + taskdescription, + frequencydays, + lastcompleted, + userresponsible, + realname, + manager + FROM fixedassettasks + INNER JOIN fixedassets + ON fixedassettasks.assetid=fixedassets.assetid + INNER JOIN www_users + ON fixedassettasks.userresponsible=www_users.userid"; + +$ErrMsg = _('The maintenance task details cannot be retrieved because'); +$Result=DB_query($sql,$db,$ErrMsg); + +echo '<table class="selection"> + <tr> + <th>' . _('Task ID') . '</th> + <th>' . _('Asset') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Last Completed') . '</th> + <th>' . _('Person') . '</th> + <th>' . _('Manager') . '</th> + </tr>'; + +while ($myrow=DB_fetch_array($Result)) { + + if ($myrow['manager']!=''){ + $ManagerResult = DB_query("SELECT realname FROM www_users WHERE userid='" . $myrow['manager'] . "'",$db); + $ManagerRow = DB_fetch_array($ManagerResult); + $ManagerName = $ManagerRow['realname']; + } else { + $ManagerName = _('No Manager Set'); + } + + echo '<tr> + <td>' . $myrow['taskid'] . '</td> + <td>' . $myrow['description'] . '</td> + <td>' . $myrow['taskdescription'] . '</td> + <td>' . ConvertSQLDate($myrow['lastcompleted']) . '</td> + <td>' . $myrow['realname'] . '</td> + <td>' . $ManagerName . '</td> + <td><a href="'.$RootPath.'/MaintenanceTasks.php?Edit=Yes&TaskID=' . $myrow['taskid'] .'">'._('Edit').'</a></td> + <td><a href="'.$RootPath.'/MaintenanceTasks.php?Delete=Yes&TaskID=' . $myrow['taskid'] .'" onclick="return confirm(\'' . _('Are you sure you wish to delete this maintenance task?') . '\');">'._('Delete').'</a></td> + </tr>'; +} + +echo '</table><br /><br />'; + + +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" id="form1">'; +echo '<div>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<table class="selection">'; + +if (isset($_GET['Edit'])) { + echo '<tr> + <td>'._('Task ID').'</td><td>'.$_GET['TaskID'].'</td> + </tr>'; + echo '<input type="hidden" name="TaskID" value="'.$_GET['TaskID'].'" />'; + $sql="SELECT assetid, + taskdescription, + frequencydays, + lastcompleted, + userresponsible, + manager + FROM fixedassettasks + WHERE taskid='".$_GET['TaskID']."'"; + $ErrMsg = _('The maintenance task details cannot be retrieved because'); + $result=DB_query($sql,$db,$ErrMsg); + $myrow=DB_fetch_array($result); + $_POST['TaskDescription'] = $myrow['taskdescription']; + $_POST['FrequencyDays'] = $myrow['frequencydays']; + $_POST['UserResponsible'] = $myrow['userresponsible']; + $_POST['Manager'] = $myrow['manager']; + $_POST['AssetID'] = $myrow['assetid']; +} + +if (!isset($_POST['TaskDescription'])){ + $_POST['TaskDescription']=''; +} +if (!isset($_POST['FrequencyDays'])){ + $_POST['FrequencyDays']=''; +} +if (!isset($_POST['UserResponsible'])){ + $_POST['UserResponsible']= ''; +} +if (!isset($_POST['Manager'])){ + $_POST['Manager']=''; +} +if (!isset($_POST['AssetID'])){ + $_POST['AssetID']=''; +} + +echo '<tr> + <td>'._('Asset to Maintain').':</td> + <td><select name="AssetID">'; +$AssetSQL="SELECT assetid, description FROM fixedassets"; +$AssetResult=DB_query($AssetSQL,$db); +while ($myrow=DB_fetch_array($AssetResult)) { + if ($myrow['assetid']==$_POST['AssetID']) { + echo '<option selected="selected" value="'.$myrow['assetid'].'">'.$myrow['assetid'] . ' - ' . $myrow['description'] .'</option>'; + } else { + echo '<option value="'.$myrow['assetid'].'">'.$myrow['assetid'] . ' - ' . $myrow['description'] .'</option>'; + } +} +echo '</select></td> + </tr>'; + +echo '<tr> + <td>'._('Task Description').':</td> + <td><textarea name="TaskDescription" cols="40" rows="3">' . $_POST['TaskDescription'] . '</textarea></td> + </tr>'; + +echo '<tr> + <td>'._('Days Before Task Due').':</td> + <td><input type="text" class="number" name="FrequencyDays" size="5" maxlength="5" value="' . $_POST['FrequencyDays'] . '" /></td> + </tr>'; + +echo '<tr> + <td>'._('Responsible').':</td> + <td><select name="UserResponsible">'; +$UserSQL="SELECT userid FROM www_users"; +$UserResult=DB_query($UserSQL,$db); +while ($myrow=DB_fetch_array($UserResult)) { + if ($myrow['userid']==$_POST['UserResponsible']) { + echo '<option selected="selected" value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; + } else { + echo '<option value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; + } +} +echo '</select></td> + </tr>'; + +echo '<tr> + <td>'._('Manager').':</td> + <td><select name="Manager">'; +if ($_POST['Manager']==''){ + echo '<option selected="selected" value="">' . _('No Manager') . '</option>'; +} else { + echo '<option value="">' . _('No Manager') . '</option>'; +} +$ManagerSQL="SELECT userid FROM www_users"; +$ManagerResult=DB_query($UserSQL,$db); +while ($myrow=DB_fetch_array($ManagerResult)) { + if ($myrow['userid']==$_POST['Manager']) { + echo '<option selected="selected" value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; + } else { + echo '<option value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; + } +} +echo '</select></td> + </tr> + </table>'; + +if (isset($_GET['Edit'])) { + echo '<br /> + <div class="centre"> + <input type="submit" name="Update" value="'._('Update Task').'" /> + </div>'; +} else { + echo '<br /> + <div class="centre"> + <input type="submit" name="Submit" value="'._('Enter New Task').'" /> + </div>'; +} +echo '</div> + </form>'; +include('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/MaintenanceUserSchedule.php =================================================================== --- trunk/MaintenanceUserSchedule.php (rev 0) +++ trunk/MaintenanceUserSchedule.php 2013-06-25 08:53:03 UTC (rev 6036) @@ -0,0 +1,77 @@ +<?php + +/* $Id: MaintenanceTasks.php 5231 2012-04-07 18:10:09Z daitnree $*/ + +include('includes/session.inc'); + +$Title = _('My Maintenance Jobs'); +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/group_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title.'</p><br />'; + + +if (isset($_GET['Complete'])) { + $result = DB_query("UPDATE fixedassettasks SET lastcompleted='" . Date('Y-m-d') . "' WHERE taskid='" . $_GET['TaskID'] . "'",$db); +} + + +$sql="SELECT taskid, + fixedassettasks.assetid, + description, + taskdescription, + frequencydays, + lastcompleted, + ADDDATE(lastcompleted,frequencydays) AS duedate, + userresponsible, + realname, + manager + FROM fixedassettasks + INNER JOIN fixedassets + ON fixedassettasks.assetid=fixedassets.assetid + INNER JOIN www_users + ON fixedassettasks.userresponsible=www_users.userid + WHERE userresponsible='" . $_SESSION['UserID'] . "' + OR manager = '" . $_SESSION['UserID'] . "' + ORDER BY ADDDATE(lastcompleted,frequencydays) DESC"; + +$ErrMsg = _('The maintenance schedule cannot be retrieved because'); +$Result=DB_query($sql,$db,$ErrMsg); + +echo '<table class="selection"> + <tr> + <th>' . _('Task ID') . '</th> + <th>' . _('Asset') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Last Completed') . '</th> + <th>' . _('Due By') . '</td> + <th>' . _('Person') . '</th> + <th>' . _('Manager') . '</th> + <th>' . _('Now Complete') . '</th> + </tr>'; + +while ($myrow=DB_fetch_array($Result)) { + + if ($myrow['manager']!=''){ + $ManagerResult = DB_query("SELECT realname FROM www_users WHERE userid='" . $myrow['manager'] . "'",$db); + $ManagerRow = DB_fetch_array($ManagerResult); + $ManagerName = $ManagerRow['realname']; + } else { + $ManagerName = _('No Manager Set'); + } + + echo '<tr> + <td>' . $myrow['taskid'] . '</td> + <td>' . $myrow['description'] . '</td> + <td>' . $myrow['taskdescription'] . '</td> + <td>' . ConvertSQLDate($myrow['lastcompleted']) . '</td> + <td>' . ConvertSQLDate($myrow['duedate']) . '</td> + <td>' . $myrow['realname'] . '</td> + <td>' . $ManagerName . '</td> + <td><a href="'.$RootPath.'/MaintenanceUserSchedule.php?Complete=Yes&TaskID=' . $myrow['taskid'] .'" onclick="return confirm(\'' . _('Are you sure you wish to mark this maintenance task as completed?') . '\');">'._('Mark Completed').'</a></td> + </tr>'; +} + +echo '</table><br /><br />'; + +include('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/includes/DefineImportBankTransClass.php =================================================================== --- trunk/includes/DefineImportBankTransClass.php (rev 0) +++ trunk/includes/DefineImportBankTransClass.php 2013-06-25 08:53:03 UTC (rev 6036) @@ -0,0 +1,100 @@ +<?php +/* $Id: DefineImportBankTransClass.php 3242 2009-12-16 22:06:53Z tim_schofield $*/ + +class BankStatement { + var $ReportCreated; + var $AccountNumber; + var $AccountName; + var $StatementNumber; + var $AccountOwner; + var $CurrCode; + var $OpeningDate; + var $OpeningBalance; + var $ClosingDate; + var $ClosingBalance; + var $BankGLAccount; + var $BankAccountName; + var $CurrDecimalPlaces; + var $ExchangeRate; + var $Trans; + + function BankStatement () { + $this->ReportCreated = ''; + $this->AccountNumber = ''; + $this->AccountName = ''; + $this->StatementNumber = ''; + $this->AccountOwner = ''; + $this->CurrCode = ''; + $this->ClosingBalance = 0; + $this->OpeningBalance = 0; + $this->BankGLAccount = ''; + $this->BankAccountName = ''; + $this->CurrDecimalPlaces = 2; + $this->ExchangeRate = 1; + } +} + +class BankTrans { + var $ValueDate; + var $Amount; + var $Code; + var $Description; + var $BankTransID; + var $GLEntries; + var $DebtorNo; + var $SupplierID; + var $GLItemID; + var $GLTotal; + + function BankTrans ($ValueDate, $Amount) { + $this->ValueDate = $ValueDate; + $this->Amount = $Amount; + $this->GLEntries = array(); + $this->DebtorNo = ''; + $this->SupplierID = ''; + $this->GLItemID = 0; + $this->GLTotal = 0; + $this->BankTransID = 0; + } + + function Add_To_GLAnalysis($Amount, $Narrative, $GLCode, $GLAccountName, $Tag){ + if (isset($GLCode) AND $Amount!=0){ + $this->GLEntries[$this->GLItemID] = new GLAnalysis($Amount, $Narrative, $this->GLItemID, $GLCode, $GLAccountName, $Tag); + $this->GLItemID++; + $this->GLTotal += $Amount; + + Return 1; + } + Return 0; + } + + function Remove_GLEntry($GL_ID){ + $this->GLTotal -= $this->GLEntries[$GL_ID]->Amount; + unset($this->GLEntries[$GL_ID]); + $this->GLItemCounter--; + } +} + + +Class GLAnalysis { + + Var $Amount; + Var $Narrative; + Var $GLCode; + var $GLAccountName; + Var $ID; + var $Tag; + + function GLAnalysis ($Amount, $Narrative, $ID, $GLCode, $GLAccountName, $Tag){ + +/* Constructor function to add a new JournalGLAnalysis object with passed params */ + $this->Amount =$Amount; + $this->Narrative = $Narrative; + $this->GLCode = $GLCode; + $this->GLAccountName = $GLAccountName; + $this->ID = $ID; + $this->Tag = $Tag;... [truncated message content] |
From: <dai...@us...> - 2013-06-29 07:13:26
|
Revision: 6040 http://sourceforge.net/p/web-erp/reponame/6040 Author: daintree Date: 2013-06-29 07:13:22 +0000 (Sat, 29 Jun 2013) Log Message: ----------- missing Manufacturers.php script for setting up brands for salescategories Modified Paths: -------------- trunk/CustWhereAlloc.php trunk/Customers.php trunk/UpgradeDatabase.php trunk/includes/ConnectDB.inc trunk/sql/mysql/upgrade4.10-4.11.sql Added Paths: ----------- trunk/Manufacturers.php Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2013-06-29 06:21:41 UTC (rev 6039) +++ trunk/CustWhereAlloc.php 2013-06-29 07:13:22 UTC (rev 6040) @@ -28,9 +28,9 @@ } if ($_POST['TransType']==10){ echo '<option selected="selected" value="10">' . _('Invoices') . '</option> - <option value="12">' . _('Receipts') . '</option>'; + <option value="12">' . _('Negative Receipts (Payments)') . '</option>'; } else { - echo '<option selected="selected" value="12">' . _('Receipts') . '</option> + echo '<option selected="selected" value="12">' . _('Negative Receipts (Payments)') . '</option> <option selected="selected" value="10">' . _('Invoices') . '</option>'; } @@ -91,7 +91,12 @@ $TransResult = DB_query($sql, $db, $ErrMsg); if (DB_num_rows($TransResult)==0){ - prnMsg(_('There are no allocations made against this transaction'),'info'); + + if ($myrow['totamt']<0 AND $_POST['TransType']==12){ + prnMsg(_('This transaction was a receipt of funds and there can be no allocations of receipts or credits to a receipt. This inquiry is meant to be used to see how a payment which is entered as a negative receipt is settled against credit notes or receipts'),'info'); + } else { + prnMsg(_('There are no allocations made against this transaction'),'info'); + } } else { echo '<br /> <table class="selection">'; Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2013-06-29 06:21:41 UTC (rev 6039) +++ trunk/Customers.php 2013-06-29 07:13:22 UTC (rev 6040) @@ -374,11 +374,6 @@ } else { $ID=''; } -if (isset($_POST['ws'])){ //ws??? wtf??? - $ws = $_POST['ws']; -} elseif (isset($_GET['ws'])){ - $ws = $_GET['ws']; -} if (isset($_POST['Edit'])){ $Edit = $_POST['Edit']; } elseif (isset($_GET['Edit'])){ Added: trunk/Manufacturers.php =================================================================== --- trunk/Manufacturers.php (rev 0) +++ trunk/Manufacturers.php 2013-06-29 07:13:22 UTC (rev 6040) @@ -0,0 +1,320 @@ +<?php + + +/* $Id: Manufacturers.php 5498 2012-07-13 08:35:54Z tehonu $*/ + +include('includes/session.inc'); + +$Title = _('Brands Maintenance'); + +include('includes/header.inc'); + +if (isset($_GET['SelectedManufacturer'])){ + $SelectedManufacturer = $_GET['SelectedManufacturer']; +} elseif (isset($_POST['SelectedManufacturer'])){ + $SelectedManufacturer = $_POST['SelectedManufacturer']; +} + +if (isset($_POST['submit'])) { + + + //initialise no input errors assumed initially before we test + $InputError = 0; + + /* actions to take once the user has clicked the submit button + ie the page has called itself with some user input */ + + if (isset($SelectedManufacturer) AND $InputError !=1) { + + if (isset($_FILES['BrandPicture']) AND $_FILES['BrandPicture']['name'] !='') { + + $result = $_FILES['BrandPicture']['error']; + $UploadTheFile = 'Yes'; //Assume all is well to start off with + $FileName = $_SESSION['part_pics_dir'] . '/BRAND-' . $SelectedManufacturer . '.jpg'; + + //But check for the worst + if (mb_strtoupper(mb_substr(trim($_FILES['BrandPicture']['name']),mb_strlen($_FILES['BrandPicture']['name'])-3))!='JPG'){ + prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); + $UploadTheFile ='No'; + } elseif ( $_FILES['BrandPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check + prnMsg(_('The file size is over the maximum allowed. The maximum size allowed in KB is') . ' ' . $_SESSION['MaxImageSize'],'warn'); + $UploadTheFile ='No'; + } elseif ( $_FILES['BrandPicture']['type'] == 'text/plain' ) { //File Type Check + prnMsg( _('Only graphics files can be uploaded'),'warn'); + $UploadTheFile ='No'; + } elseif (file_exists($FileName)){ + prnMsg(_('Attempting to overwrite an existing item image'),'warn'); + $result = unlink($FileName); + if (!$result){ + prnMsg(_('The existing image could not be removed'),'error'); + $UploadTheFile ='No'; + } + } + + if ($UploadTheFile=='Yes'){ + $result = move_uploaded_file($_FILES['BrandPicture']['tmp_name'], $FileName); + $message = ($result)?_('File url') .'<a href="' . $FileName .'">' . $FileName . '</a>' : _('Something is wrong with uploading a file'); + $_POST['ManufacturersImage'] = 'BRAND-' . $SelectedManufacturer; + } else { + $_POST['ManufacturersImage'] = ''; + } + } + if( isset($_POST['ManufacturersImage'])){ + if (file_exists($_SESSION['part_pics_dir'] . '/' .'BRAND-' . $SelectedManufacturer . '.jpg') ) { + $_POST['ManufacturersImage'] = 'BRAND-' . $SelectedManufacturer . '.jpg'; + } else { + $_POST['ManufacturersImage'] = ''; + } + } + + $sql = "UPDATE manufacturers SET manufacturers_name='" . $_POST['ManufacturersName'] . "', + manufacturers_url='" . $_POST['ManufacturersURL'] . "'"; + if (isset($_POST['ManufacturersImage'])){ + $sql .= ", manufacturers_image='" . $_POST['ManufacturersImage'] . "'"; + } + $sql .= " WHERE manufacturers_id = '" . $SelectedManufacturer . "'"; + + $ErrMsg = _('An error occurred updating the') . ' ' . $SelectedManufacturer . ' ' . _('manufacturer record because'); + $DbgMsg = _('The SQL used to update the manufacturer record was'); + + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + + prnMsg( _('The manufacturer record has been updated'),'success'); + unset($_POST['ManufacturersName']); + unset($_POST['ManufacturersURL']); + unset($_POST['ManufacturersImage']); + unset($SelectedManufacturer); + + } elseif ($InputError !=1) { + + /*SelectedManufacturer is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new Location form */ + + $sql = "INSERT INTO manufacturers (manufacturers_name, + manufacturers_url) + VALUES ('" . $_POST['ManufacturersName'] . "', + '" . $_POST['ManufacturersURL'] . "')"; + + $ErrMsg = _('An error occurred inserting the new manufacturer record because'); + $DbgMsg = _('The SQL used to insert the manufacturer record was'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + + if (isset($_FILES['BrandPicture']) AND $_FILES['BrandPicture']['name'] !='') { + + $result = $_FILES['BrandPicture']['error']; + $UploadTheFile = 'Yes'; //Assume all is well to start off with + $FileName = $_SESSION['part_pics_dir'] . '/BRAND-' . $_SESSION['LastInsertId'] . '.jpg'; + + //But check for the worst + if (mb_strtoupper(mb_substr(trim($_FILES['BrandPicture']['name']),mb_strlen($_FILES['BrandPicture']['name'])-3))!='JPG'){ + prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); + $UploadTheFile ='No'; + } elseif ( $_FILES['BrandPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check + prnMsg(_('The file size is over the maximum allowed. The maximum size allowed in KB is') . ' ' . $_SESSION['MaxImageSize'],'warn'); + $UploadTheFile ='No'; + } elseif ( $_FILES['BrandPicture']['type'] == 'text/plain' ) { //File Type Check + prnMsg( _('Only graphics files can be uploaded'),'warn'); + $UploadTheFile ='No'; + } elseif (file_exists($FileName)){ + prnMsg(_('Attempting to overwrite an existing item image'),'warn'); + $result = unlink($FileName); + if (!$result){ + prnMsg(_('The existing image could not be removed'),'error'); + $UploadTheFile ='No'; + } + } + + if ($UploadTheFile=='Yes'){ + $result = move_uploaded_file($_FILES['BrandPicture']['tmp_name'], $FileName); + $message = ($result)?_('File url') .'<a href="' . $FileName .'">' . $FileName . '</a>' : _('Something is wrong with uploading a file'); + DB_query("UPDATE manufacturers SET manufacturers_image='" . $FileName . "'",$db); + } + } + + prnMsg( _('The new manufacturer record has been added'),'success'); + + unset($_POST['ManufacturersName']); + unset($_POST['ManufacturersURL']); + unset($_POST['ManufacturersImage']); + unset($SelectedManufacturer); + } + + +} elseif (isset($_GET['delete'])) { +//the link to delete a selected record was clicked instead of the submit button + + $CancelDelete = false; + +// PREVENT DELETES IF DEPENDENT RECORDS + $sql= "SELECT COUNT(*) FROM salescatprod WHERE manufacturers_id='". $SelectedManufacturer . "'"; + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + if ($myrow[0]>0) { + $CancelDelete = true; + prnMsg( _('Cannot delete this manufacturer because products have been defined as from this manufacturer'),'warn'); + echo _('There are') . ' ' . $myrow[0] . ' ' . _('items with this manufacturer code'); + } + + if (!$CancelDelete) { + + $result = DB_query("DELETE FROM manufacturers WHERE manufacturers_id='" . $SelectedManufacturer . "'",$db); + if( file_exists($_SESSION['part_pics_dir'] . '/BRAND-' . $SelectedManufacturer . '.jpg') ) { + unlink($_SESSION['part_pics_dir'] . '/BRAND-' . $SelectedManufacturer . '.jpg'); + } + prnMsg( _('Manufacturer') . ' ' . $SelectedManufacturer . ' ' . _('has been deleted') . '!', 'success'); + unset ($SelectedManufacturer); + } //end if Delete Manufacturer + unset($SelectedManufacturer); + unset($_GET['delete']); +} + +if (!isset($SelectedManufacturer)) { + +/* It could still be the second time the page has been run and a record has been selected for modification - SelectedManufacturer will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters +then none of the above are true and the list of Manufacturers will be displayed with +links to delete or edit each. These will call the same page again and allow update/input +or deletion of the records*/ + + $sql = "SELECT manufacturers_id, + manufacturers_name, + manufacturers_url, + manufacturers_image + FROM manufacturers"; + $result = DB_query($sql,$db); + + if (DB_num_rows($result)==0){ + prnMsg (_('There are no manufacturers to display'),'error'); + } + echo '<p class="page_Title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" Title="' . + _('Manufacturers') . '" alt="" />' . ' ' . $Title . '</p>'; + + echo '<table class="selection">'; + echo '<tr> + <th>' . _('Brand Code') . '</th> + <th>' . _('Brand Name') . '</th> + <th>' . _('Brand URL') . '</th> + <th>' . _('Brands Image') . '</th> + </tr>'; + +$k=0; //row colour counter +while ($myrow = DB_fetch_array($result)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + + if( file_exists($_SESSION['part_pics_dir'] . '/BRAND-' . $myrow['manufacturers_id'] . '.jpg') ) { + $BrandImgLink = '<img width="120" height="120" src="' . $_SESSION['part_pics_dir'] . '/BRAND-' . $myrow['manufacturers_id'] . '.jpg" />'; + } else { + $BrandImgLink = _('No Image'); + } + printf('<td>%s</td> + <td>%s</td> + <td><a target="_blank" href="%s">%s</a></td> + <td>%s</td> + <td><a href="%sSelectedManufacturer=%s">' . _('Edit') . '</a></td> + <td><a href="%sSelectedManufacturer=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this brand?') . '\');">' . _('Delete') . '</a></td> + </tr>', + $myrow['manufacturers_id'], + $myrow['manufacturers_name'], + $myrow['manufacturers_url'], + $myrow['manufacturers_url'], + $BrandImgLink, + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', + $myrow['manufacturers_id'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', + $myrow['manufacturers_id']); + + } + //END WHILE LIST LOOP + echo '</table>'; +} + +//end of ifs and buts! + +echo '<br />'; +if (isset($SelectedManufacturer)) { + echo '<a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Review Records') . '</a>'; +} +echo '<br />'; + +if (!isset($_GET['delete'])) { + + echo '<form enctype="multipart/form-data" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + if (isset($SelectedManufacturer)) { + //editing an existing Brand + echo '<p class="page_Title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" Title="' . + _('Brand') . '" alt="" />' . ' ' . $Title . '</p>'; + + $sql = "SELECT manufacturers_id, + manufacturers_name, + manufacturers_url, + manufacturers_image + FROM manufacturers + WHERE manufacturers_id='" . $SelectedManufacturer . "'"; + + $result = DB_query($sql, $db); + $myrow = DB_fetch_array($result); + + $_POST['ManufacturersName'] = $myrow['manufacturers_name']; + $_POST['ManufacturersURL'] = $myrow['manufacturers_url']; + $_POST['ManufacturersImage'] = $myrow['manufacturers_image']; + + + echo '<input type="hidden" name="SelectedManufacturer" value="' . $SelectedManufacturer . '" />'; + echo '<table class="selection">'; + echo '<tr> + <th colspan="2">'._('Amend Brand Details').'</th> + </tr>'; + } else { //end of if $SelectedManufacturer only do the else when a new record is being entered + + echo '<table class="selection"> + <tr> + <th colspan="2"><h3>'._('New Brand/Manufacturer Details').'</h3></th> + </tr>'; + } + if (!isset($_POST['ManufacturersName'])) { + $_POST['ManufacturersName'] = ''; + } + if (!isset($_POST['ManufacturersURL'])) { + $_POST['ManufacturersURL'] = ' '; + } + if (!isset($_POST['ManufacturersImage'])) { + $_POST['ManufacturersImage'] = ''; + } + + echo '<tr> + <td>' . _('Brand Name') . ':' . '</td> + <td><input type="text" name="ManufacturersName" value="'. $_POST['ManufacturersName'] . '" size="32" maxlength="32" /></td> + </tr> + <tr> + <td>' . _('Brand URL') . ':' . '</td> + <td><input type="text" name="ManufacturersURL" value="' . $_POST['ManufacturersURL'] . '" size="50" maxlength="50" /></td> + </tr> + <tr> + <td>'. _('Brand Image File (.jpg)') . ':</td> + <td><input type="file" id="BrandPicture" name="BrandPicture" /></td> + </tr>'; + if (isset($SelectedManufacturer)){ + if(file_exists($_SESSION['part_pics_dir'] . '/' .'BRAND-' . $SelectedManufacturer . '.jpg') ) { + echo '</tr><td colspan="2"><img width="100" height="100" src="' . $_SESSION['part_pics_dir'] . '/' .'BRAND-' . $SelectedManufacturer . '.jpg" /></tr></tr>'; + } + } + + echo '</table> + <br /> + <div class="centre"> + <input type="submit" name="submit" value="' . _('Enter Information') . '" /> + </div> + </div> + </form>'; + +} //end if record deleted no point displaying form to add record + +include('includes/footer.inc'); +?> \ No newline at end of file Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2013-06-29 06:21:41 UTC (rev 6039) +++ trunk/UpgradeDatabase.php 2013-06-29 07:13:22 UTC (rev 6040) @@ -175,6 +175,8 @@ } $SQLScripts[] = './sql/mysql/upgrade4.09-4.10.sql'; case '4.10.1': + $SQLScripts[] = './sql/mysql/upgrade4.10-4.11.sql'; + case '4.11.0': break; } //end switch } Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2013-06-29 06:21:41 UTC (rev 6039) +++ trunk/includes/ConnectDB.inc 2013-06-29 07:13:22 UTC (rev 6040) @@ -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.10.1'; //must update manually every time there is a DB change +$Version='4.11.0'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-06-29 06:21:41 UTC (rev 6039) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-06-29 07:13:22 UTC (rev 6040) @@ -1,162 +1,163 @@ -INSERT INTO config VALUES('SmtpSetting',0); -ALTER TABLE `companies` CHANGE `debtorsact` `debtorsact` VARCHAR( 20 ) NOT NULL DEFAULT '70000', -CHANGE `pytdiscountact` `pytdiscountact` VARCHAR( 20 ) NOT NULL DEFAULT '55000', -CHANGE `creditorsact` `creditorsact` VARCHAR( 20 ) NOT NULL DEFAULT '80000', -CHANGE `payrollact` `payrollact` VARCHAR( 20 ) NOT NULL DEFAULT '84000', -CHANGE `grnact` `grnact` VARCHAR( 20 ) NOT NULL DEFAULT '72000', -CHANGE `exchangediffact` `exchangediffact` VARCHAR( 20 ) NOT NULL DEFAULT '65000', -CHANGE `purchasesexchangediffact` `purchasesexchangediffact` VARCHAR( 20 ) NOT NULL DEFAULT '0', -CHANGE `retainedearnings` `retainedearnings` VARCHAR( 20 ) NOT NULL DEFAULT '90000', -CHANGE `freightact` `freightact` VARCHAR( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `lastcostrollup` CHANGE `stockact` `stockact` VARCHAR( 20 ) NOT NULL DEFAULT '0', -CHANGE `adjglact` `adjglact` VARCHAR( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `salesglpostings` CHANGE `discountglcode` `discountglcode` VARCHAR( 20 ) NOT NULL DEFAULT '0', -CHANGE `salesglcode` `salesglcode` VARCHAR( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `cogsglpostings` CHANGE `glcode` `glcode` VARCHAR( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `fixedassetcategories` CHANGE `costact` `costact` VARCHAR( 20 ) NOT NULL DEFAULT '0', -CHANGE `depnact` `depnact` VARCHAR( 20 ) NOT NULL DEFAULT '0', -CHANGE `disposalact` `disposalact` VARCHAR( 20 ) NOT NULL DEFAULT '80000', -CHANGE `accumdepnact` `accumdepnact` VARCHAR( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `purchorderdetails` CHANGE `glcode` `glcode` VARCHAR( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `stockcategory` CHANGE `stockact` `stockact` VARCHAR( 20 ) NOT NULL DEFAULT '0', -CHANGE `adjglact` `adjglact` VARCHAR( 20 ) NOT NULL DEFAULT '0', -CHANGE `issueglact` `issueglact` VARCHAR( 20 ) NOT NULL DEFAULT '0', -CHANGE `purchpricevaract` `purchpricevaract` VARCHAR( 20 ) NOT NULL DEFAULT '80000', -CHANGE `materialuseagevarac` `materialuseagevarac` VARCHAR( 20 ) NOT NULL DEFAULT '80000', -CHANGE `wipact` `wipact` VARCHAR( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `workcentres` CHANGE `overheadrecoveryact` `overheadrecoveryact` VARCHAR( 20 ) NOT NULL DEFAULT '0'; - -INSERT INTO `scripts` (`script` , `pagesecurity` , `description`) -VALUES ('Z_ChangeGLAccountCode.php', '15', 'Script to change a GL account code accross all tables necessary'); - -ALTER TABLE `currencies` ADD `webcart` TINYINT( 1 ) NOT NULL DEFAULT '1' COMMENT 'If 1 shown in weberp cart. if 0 no show'; - -ALTER TABLE `salescat` CHANGE `salescatname` `salescatname` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; -CREATE TABLE `mailgroups` ( id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, - groupname varchar(100) NOT NULL, - unique (groupname)) ENGINE = InnoDB DEFAULT CHARSET = utf8; -CREATE TABLE `mailgroupdetails` (groupname varchar(100) NOT NULL, - userid varchar(20) NOT NULL, - CONSTRAINT FOREIGN KEY (`groupname`) REFERENCES `mailgroups` (`groupname`), - CONSTRAINT FOREIGN KEY (`userid`) REFERENCES `www_users`(`userid`), - INDEX(`groupname`)) Engine=InnoDB DEFAULT CHARSET=utf8; - -INSERT INTO scripts VALUES('MailingGroupMaintenance.php', 15, 'Mainting mailing lists for items to mail'); - -INSERT INTO mailgroups VALUES(1,'ChkListingRecipients'); -INSERT INTO mailgroups VALUES(2,'SalesAnalysisReportRecipients'); -INSERT INTO scripts VALUES('MailSalesReport_csv.php',15,'Mailing the sales report'); -INSERT INTO mailgroups VALUES(3,'OffersReceivedResultRecipients'); -INSERT INTO mailgroups VALUES(4,'InventoryValuationRecipients'); -ALTER TABLE stockrequestitems DROP PRIMARY KEY; -ALTER TABLE stockrequestitems ADD PRIMARY KEY (`dispatchitemsid`,`dispatchid`); -INSERT INTO scripts VALUES('Z_ImportGLTransactions.php', 15, 'Import General Ledger Transactions'); -CREATE TABLE IF NOT EXISTS `fixedassettasks` ( - `taskid` int(11) NOT NULL AUTO_INCREMENT, - `assetid` int(11) NOT NULL, - `taskdescription` text NOT NULL, - `frequencydays` int(11) NOT NULL DEFAULT '365', - `lastcompleted` date NOT NULL, - `userresponsible` varchar(20) NOT NULL, - `manager` varchar(20) NOT NULL DEFAULT '', - PRIMARY KEY (`taskid`), - KEY `assetid` (`assetid`), - KEY `userresponsible` (`userresponsible`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - -INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('MaintenanceTasks.php', '1', 'Allows set up and edit of scheduled maintenance tasks'); -INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('MaintenanceUserSchedule.php', '1', 'List users or managers scheduled maintenance tasks and allow to be flagged as completed'); -INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('MaintenanceReminders.php', '1', 'Sends email reminders for scheduled asset maintenance tasks'); -INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('ImportBankTransAnalysis.php', '11', 'Allows analysis of bank transactions being imported'); -INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('ImportBankTrans.php', '11', 'Imports bank transactions'); -INSERT INTO scripts VALUES ('Manufacturers.php','15','Maintain brands of sales products'); -INSERT INTO scripts VALUES ('SalesCategoryDescriptions.php','15','Maintain translations for sales categories'); -INSERT INTO scripts VALUES ('ShopParameters.php','15','Maintain web-store configuration and set up'); - -INSERT INTO config VALUES ('ShopName',''); -INSERT INTO config VALUES ('ShopPrivacyStatement',''); -INSERT INTO config VALUES ('ShopFreightPolicy',''); -INSERT INTO config VALUES ('ShopTermsConditions',''); -INSERT INTO config VALUES ('ShopDebtorNo',''); -INSERT INTO config VALUES ('ShopBranchCode',''); -INSERT INTO config VALUES ('ShopAboutUs',''); - -INSERT INTO config VALUES ('ShopPayPalUser',''); -INSERT INTO config VALUES ('ShopPayPalPassword',''); -INSERT INTO config VALUES ('ShopPayPalSignature',''); - -INSERT INTO config VALUES ('ShopPayPalProUser',''); -INSERT INTO config VALUES ('ShopPayPalProPassword',''); -INSERT INTO config VALUES ('ShopPayPalProSignature',''); - -INSERT INTO config VALUES ('ShopCreditCardGateway', 'PayFlowPro'); - -INSERT INTO config VALUES ('ShopPayFlowUser',''); -INSERT INTO config VALUES ('ShopPayFlowPassword',''); -INSERT INTO config VALUES ('ShopPayFlowVendor',''); - -INSERT INTO config VALUES ('ShopAllowPayPal', '1'); -INSERT INTO config VALUES ('ShopAllowCreditCards', '1'); -INSERT INTO config VALUES ('ShopAllowBankTransfer', '1'); -INSERT INTO config VALUES ('ShopAllowSurcharges', '1'); - -INSERT INTO config VALUES ('ShopPayPalSurcharge', '0.034'); -INSERT INTO config VALUES ('ShopBankTransferSurcharge', '0.0'); -INSERT INTO config VALUES ('ShopCreditCardSurcharge', '0.029'); - -INSERT INTO config VALUES ('ShopPayPalBankAccount', '1030'); -INSERT INTO config VALUES ('ShopCreditCardBankAccount', '1030'); - -INSERT INTO config VALUES ('ShopSwipeHQMerchantID', ''); -INSERT INTO config VALUES ('ShopSwipeHQAPIKey', ''); - -INSERT INTO config VALUES ('ShopSurchargeStockID', ''); - -INSERT INTO config VALUES ('ItemDescriptionLanguages',''); -INSERT INTO config VALUES('SmtpSetting',0); - -CREATE TABLE IF NOT EXISTS `stockdescriptiontranslations` ( - `stockid` varchar(20) NOT NULL DEFAULT '', - `language_id` varchar(10) NOT NULL DEFAULT 'en_GB.utf8', - `descriptiontranslation` varchar(50) NOT NULL, - PRIMARY KEY (`stockid`,`language_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `debtorsmaster` ADD `language_id` VARCHAR( 10 ) NOT NULL DEFAULT 'en_GB.utf8'; - -ALTER TABLE `debtortrans` ADD `salesperson` VARCHAR( 4 ) NOT NULL DEFAULT '' , ADD INDEX ( `salesperson` ); -UPDATE debtortrans INNER JOIN salesorders ON debtortrans.order_=salesorders.orderno SET debtortrans.salesperson=salesorders.salesperson; -UPDATE debtortrans INNER JOIN custbranch ON debtortrans.debtorno=custbranch.debtorno AND debtortrans.branchcode=custbranch.branchcode SET debtortrans.salesperson=custbranch.salesman WHERE debtortrans.type=11; - -CREATE TABLE IF NOT EXISTS `manufacturers` ( - `manufacturers_id` int(11) NOT NULL AUTO_INCREMENT, - `manufacturers_name` varchar(32) NOT NULL, - `manufacturers_url` varchar(50) NOT NULL DEFAULT '', - `manufacturers_image` varchar(64) DEFAULT NULL, - PRIMARY KEY (`manufacturers_id`), - KEY (`manufacturers_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `salescattranslations` ( - `salescatid` tinyint(4) NOT NULL DEFAULT '0', - `language_id` varchar(10) NOT NULL DEFAULT 'en_GB.utf8', - `salescattranslation` varchar(40) NOT NULL, - PRIMARY KEY (`salescatid`,`language_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE salescatprod ADD COLUMN manufacturers_id int(11) NOT NULL; -ALTER TABLE salescatprod ADD COLUMN featured int(11) DEFAULT '0' NOT NULL; -ALTER TABLE `salescatprod` ADD INDEX ( `manufacturers_id` ); - -INSERT INTO config VALUES ('ShopMode','test'); -INSERT INTO config VALUES ('ShopContactUs',''); - -UPDATE config SET confvalue='4.11.0' WHERE confname='Version'; - +INSERT INTO config VALUES('SmtpSetting',0); +ALTER TABLE `companies` CHANGE `debtorsact` `debtorsact` VARCHAR( 20 ) NOT NULL DEFAULT '70000', +CHANGE `pytdiscountact` `pytdiscountact` VARCHAR( 20 ) NOT NULL DEFAULT '55000', +CHANGE `creditorsact` `creditorsact` VARCHAR( 20 ) NOT NULL DEFAULT '80000', +CHANGE `payrollact` `payrollact` VARCHAR( 20 ) NOT NULL DEFAULT '84000', +CHANGE `grnact` `grnact` VARCHAR( 20 ) NOT NULL DEFAULT '72000', +CHANGE `exchangediffact` `exchangediffact` VARCHAR( 20 ) NOT NULL DEFAULT '65000', +CHANGE `purchasesexchangediffact` `purchasesexchangediffact` VARCHAR( 20 ) NOT NULL DEFAULT '0', +CHANGE `retainedearnings` `retainedearnings` VARCHAR( 20 ) NOT NULL DEFAULT '90000', +CHANGE `freightact` `freightact` VARCHAR( 20 ) NOT NULL DEFAULT '0'; + +ALTER TABLE `lastcostrollup` CHANGE `stockact` `stockact` VARCHAR( 20 ) NOT NULL DEFAULT '0', +CHANGE `adjglact` `adjglact` VARCHAR( 20 ) NOT NULL DEFAULT '0'; + +ALTER TABLE `salesglpostings` CHANGE `discountglcode` `discountglcode` VARCHAR( 20 ) NOT NULL DEFAULT '0', +CHANGE `salesglcode` `salesglcode` VARCHAR( 20 ) NOT NULL DEFAULT '0'; + +ALTER TABLE `cogsglpostings` CHANGE `glcode` `glcode` VARCHAR( 20 ) NOT NULL DEFAULT '0'; + +ALTER TABLE `fixedassetcategories` CHANGE `costact` `costact` VARCHAR( 20 ) NOT NULL DEFAULT '0', +CHANGE `depnact` `depnact` VARCHAR( 20 ) NOT NULL DEFAULT '0', +CHANGE `disposalact` `disposalact` VARCHAR( 20 ) NOT NULL DEFAULT '80000', +CHANGE `accumdepnact` `accumdepnact` VARCHAR( 20 ) NOT NULL DEFAULT '0'; + +ALTER TABLE `purchorderdetails` CHANGE `glcode` `glcode` VARCHAR( 20 ) NOT NULL DEFAULT '0'; + +ALTER TABLE `stockcategory` CHANGE `stockact` `stockact` VARCHAR( 20 ) NOT NULL DEFAULT '0', +CHANGE `adjglact` `adjglact` VARCHAR( 20 ) NOT NULL DEFAULT '0', +CHANGE `issueglact` `issueglact` VARCHAR( 20 ) NOT NULL DEFAULT '0', +CHANGE `purchpricevaract` `purchpricevaract` VARCHAR( 20 ) NOT NULL DEFAULT '80000', +CHANGE `materialuseagevarac` `materialuseagevarac` VARCHAR( 20 ) NOT NULL DEFAULT '80000', +CHANGE `wipact` `wipact` VARCHAR( 20 ) NOT NULL DEFAULT '0'; + +ALTER TABLE `workcentres` CHANGE `overheadrecoveryact` `overheadrecoveryact` VARCHAR( 20 ) NOT NULL DEFAULT '0'; + +INSERT INTO `scripts` (`script` , `pagesecurity` , `description`) +VALUES ('Z_ChangeGLAccountCode.php', '15', 'Script to change a GL account code accross all tables necessary'); + +ALTER TABLE `currencies` ADD `webcart` TINYINT( 1 ) NOT NULL DEFAULT '1' COMMENT 'If 1 shown in weberp cart. if 0 no show'; + +ALTER TABLE `salescat` CHANGE `salescatname` `salescatname` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; +CREATE TABLE `mailgroups` ( id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, + groupname varchar(100) NOT NULL, + unique (groupname)) ENGINE = InnoDB DEFAULT CHARSET = utf8; +CREATE TABLE `mailgroupdetails` (groupname varchar(100) NOT NULL, + userid varchar(20) NOT NULL, + CONSTRAINT FOREIGN KEY (`groupname`) REFERENCES `mailgroups` (`groupname`), + CONSTRAINT FOREIGN KEY (`userid`) REFERENCES `www_users`(`userid`), + INDEX(`groupname`)) Engine=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO scripts VALUES('MailingGroupMaintenance.php', 15, 'Mainting mailing lists for items to mail'); + +INSERT INTO mailgroups VALUES(1,'ChkListingRecipients'); +INSERT INTO mailgroups VALUES(2,'SalesAnalysisReportRecipients'); +INSERT INTO scripts VALUES('MailSalesReport_csv.php',15,'Mailing the sales report'); +INSERT INTO mailgroups VALUES(3,'OffersReceivedResultRecipients'); +INSERT INTO mailgroups VALUES(4,'InventoryValuationRecipients'); +ALTER TABLE stockrequestitems DROP PRIMARY KEY; +ALTER TABLE stockrequestitems ADD PRIMARY KEY (`dispatchitemsid`,`dispatchid`); +INSERT INTO scripts VALUES('Z_ImportGLTransactions.php', 15, 'Import General Ledger Transactions'); +CREATE TABLE IF NOT EXISTS `fixedassettasks` ( + `taskid` int(11) NOT NULL AUTO_INCREMENT, + `assetid` int(11) NOT NULL, + `taskdescription` text NOT NULL, + `frequencydays` int(11) NOT NULL DEFAULT '365', + `lastcompleted` date NOT NULL, + `userresponsible` varchar(20) NOT NULL, + `manager` varchar(20) NOT NULL DEFAULT '', + PRIMARY KEY (`taskid`), + KEY `assetid` (`assetid`), + KEY `userresponsible` (`userresponsible`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('MaintenanceTasks.php', '1', 'Allows set up and edit of scheduled maintenance tasks'); +INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('MaintenanceUserSchedule.php', '1', 'List users or managers scheduled maintenance tasks and allow to be flagged as completed'); +INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('MaintenanceReminders.php', '1', 'Sends email reminders for scheduled asset maintenance tasks'); +INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('ImportBankTransAnalysis.php', '11', 'Allows analysis of bank transactions being imported'); +INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('ImportBankTrans.php', '11', 'Imports bank transactions'); +INSERT INTO scripts VALUES ('Manufacturers.php','15','Maintain brands of sales products'); +INSERT INTO scripts VALUES ('SalesCategoryDescriptions.php','15','Maintain translations for sales categories'); +INSERT INTO scripts VALUES ('ShopParameters.php','15','Maintain web-store configuration and set up'); + +INSERT INTO config VALUES ('ShopName',''); +INSERT INTO config VALUES ('ShopPrivacyStatement',''); +INSERT INTO config VALUES ('ShopFreightPolicy',''); +INSERT INTO config VALUES ('ShopTermsConditions',''); +INSERT INTO config VALUES ('ShopDebtorNo',''); +INSERT INTO config VALUES ('ShopBranchCode',''); +INSERT INTO config VALUES ('ShopAboutUs',''); + +INSERT INTO config VALUES ('ShopPayPalUser',''); +INSERT INTO config VALUES ('ShopPayPalPassword',''); +INSERT INTO config VALUES ('ShopPayPalSignature',''); + +INSERT INTO config VALUES ('ShopPayPalProUser',''); +INSERT INTO config VALUES ('ShopPayPalProPassword',''); +INSERT INTO config VALUES ('ShopPayPalProSignature',''); + +INSERT INTO config VALUES ('ShopCreditCardGateway', 'PayFlowPro'); + +INSERT INTO config VALUES ('ShopPayFlowUser',''); +INSERT INTO config VALUES ('ShopPayFlowPassword',''); +INSERT INTO config VALUES ('ShopPayFlowVendor',''); + +INSERT INTO config VALUES ('ShopAllowPayPal', '1'); +INSERT INTO config VALUES ('ShopAllowCreditCards', '1'); +INSERT INTO config VALUES ('ShopAllowBankTransfer', '1'); +INSERT INTO config VALUES ('ShopAllowSurcharges', '1'); + +INSERT INTO config VALUES ('ShopPayPalSurcharge', '0.034'); +INSERT INTO config VALUES ('ShopBankTransferSurcharge', '0.0'); +INSERT INTO config VALUES ('ShopCreditCardSurcharge', '0.029'); + +INSERT INTO config VALUES ('ShopPayPalBankAccount', '1030'); +INSERT INTO config VALUES ('ShopCreditCardBankAccount', '1030'); + +INSERT INTO config VALUES ('ShopSwipeHQMerchantID', ''); +INSERT INTO config VALUES ('ShopSwipeHQAPIKey', ''); + +INSERT INTO config VALUES ('ShopSurchargeStockID', ''); + +INSERT INTO config VALUES ('ItemDescriptionLanguages',''); +INSERT INTO config VALUES('SmtpSetting',0); + +CREATE TABLE IF NOT EXISTS `stockdescriptiontranslations` ( + `stockid` varchar(20) NOT NULL DEFAULT '', + `language_id` varchar(10) NOT NULL DEFAULT 'en_GB.utf8', + `descriptiontranslation` varchar(50) NOT NULL, + PRIMARY KEY (`stockid`,`language_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +ALTER TABLE `debtorsmaster` ADD `language_id` VARCHAR( 10 ) NOT NULL DEFAULT 'en_GB.utf8'; + +ALTER TABLE `debtortrans` ADD `salesperson` VARCHAR( 4 ) NOT NULL DEFAULT '' , ADD INDEX ( `salesperson` ); +UPDATE debtortrans INNER JOIN salesorders ON debtortrans.order_=salesorders.orderno SET debtortrans.salesperson=salesorders.salesperson; +UPDATE debtortrans INNER JOIN custbranch ON debtortrans.debtorno=custbranch.debtorno AND debtortrans.branchcode=custbranch.branchcode SET debtortrans.salesperson=custbranch.salesman WHERE debtortrans.type=11; + +CREATE TABLE IF NOT EXISTS `manufacturers` ( + `manufacturers_id` int(11) NOT NULL AUTO_INCREMENT, + `manufacturers_name` varchar(32) NOT NULL, + `manufacturers_url` varchar(50) NOT NULL DEFAULT '', + `manufacturers_image` varchar(64) DEFAULT NULL, + PRIMARY KEY (`manufacturers_id`), + KEY (`manufacturers_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `salescattranslations` ( + `salescatid` tinyint(4) NOT NULL DEFAULT '0', + `language_id` varchar(10) NOT NULL DEFAULT 'en_GB.utf8', + `salescattranslation` varchar(40) NOT NULL, + PRIMARY KEY (`salescatid`,`language_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +ALTER TABLE salescatprod ADD COLUMN manufacturers_id int(11) NOT NULL; +ALTER TABLE salescatprod ADD COLUMN featured int(11) DEFAULT '0' NOT NULL; +ALTER TABLE `salescatprod` ADD INDEX ( `manufacturers_id` ); + + +INSERT INTO config VALUES ('ShopMode','test'); +INSERT INTO config VALUES ('ShopContactUs',''); + +UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; + |
From: <te...@us...> - 2013-07-02 03:22:31
|
Revision: 6042 http://sourceforge.net/p/web-erp/reponame/6042 Author: tehonu Date: 2013-07-02 03:22:26 +0000 (Tue, 02 Jul 2013) Log Message: ----------- Added 2 configuration flags to web store: ShopShowOnlyAvailableItems, ShopShowQOHColumn Modified Paths: -------------- trunk/ShopParameters.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2013-07-02 02:41:28 UTC (rev 6041) +++ trunk/ShopParameters.php 2013-07-02 03:22:26 UTC (rev 6042) @@ -64,6 +64,14 @@ $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopBranchCode']."' WHERE confname = 'ShopBranchCode'"; } + if ($_SESSION['ShopShowOnlyAvailableItems'] != $_POST['X_ShopShowOnlyAvailableItems'] ) { + $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowOnlyAvailableItems']."' WHERE confname = 'ShopShowOnlyAvailableItems'"; + } + + if ($_SESSION['ShopShowQOHColumn'] != $_POST['X_ShopShowQOHColumn'] ) { + $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowQOHColumn']."' WHERE confname = 'ShopShowQOHColumn'"; + } + if ($_SESSION['ShopAllowSurcharges'] != $_POST['X_ShopAllowSurcharges'] ) { $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopAllowSurcharges']."' WHERE confname = 'ShopAllowSurcharges'"; } @@ -234,10 +242,40 @@ <td><textarea name="X_ShopFreightPolicy" rows="8" cols="60">' . stripslashes($_SESSION['ShopFreightPolicy']) . '</textarea></td> <td>' . _('This text will appear on the web-store page that spells out the freight policy of the web-shop') . '</td> </tr>'; + echo '<tr> + <td>' . _('Show Only Items With Available Stock') . ':</td> + <td><select name="X_ShopShowOnlyAvailableItems">'; +if ($_SESSION['ShopShowOnlyAvailableItems'] == '1') { + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + echo '<option value="0">' . _('No') . '</option>'; +} else { + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + echo '<option value="1">' . _('Yes') . '</option>'; +} +echo '</select></td> + <td>' . _('Shows only items with QOH > 0 thus avoiding the Arriving Soon items.') . '</td> + </tr>'; + +echo '<tr> + <td>' . _('Show/Hide QOH column') . ':</td> + <td><select name="X_ShopShowQOHColumn">'; +if ($_SESSION['ShopShowQOHColumn'] == '1') { + echo '<option selected="selected" value="1">' . _('Show') . '</option>'; + echo '<option value="0">' . _('Hide') . '</option>'; +} else { + echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; + echo '<option value="1">' . _('Show') . '</option>'; +} +echo '</select></td> + <td>' . _('Shows / Hides the QOH column Select Hide if you do not want customers to know how many stock do you currently hold.') . '</td> + </tr>'; + + +echo '<tr> <td>' . _('Allow Payment Surcharges') . ':</td> <td><select name="X_ShopAllowSurcharges">'; -if ($_SESSION['ShopAllowSurcharges'] ==1) { +if ($_SESSION['ShopAllowSurcharges'] == '1') { echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; echo '<option value="0">' . _('No') . '</option>'; } else { Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-02 02:41:28 UTC (rev 6041) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-02 03:22:26 UTC (rev 6042) @@ -159,5 +159,8 @@ INSERT INTO config VALUES ('ShopMode','test'); INSERT INTO config VALUES ('ShopContactUs',''); +INSERT INTO config VALUES ('ShopShowOnlyAvailableItems','0'); +INSERT INTO config VALUES ('ShopShowQOHColumn','1'); + UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |
From: <te...@us...> - 2013-07-03 07:18:42
|
Revision: 6043 http://sourceforge.net/p/web-erp/reponame/6043 Author: tehonu Date: 2013-07-03 07:18:37 +0000 (Wed, 03 Jul 2013) Log Message: ----------- Added ShopAdditionalStockLocations to Web-Store and re-organize settings Modified Paths: -------------- trunk/ShopParameters.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2013-07-02 03:22:26 UTC (rev 6042) +++ trunk/ShopParameters.php 2013-07-03 07:18:37 UTC (rev 6043) @@ -72,6 +72,10 @@ $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowQOHColumn']."' WHERE confname = 'ShopShowQOHColumn'"; } + if ($_SESSION['ShopAdditionalStockLocations'] != $_POST['X_ShopAdditionalStockLocations'] ) { + $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopAdditionalStockLocations']."' WHERE confname = 'ShopAdditionalStockLocations'"; + } + if ($_SESSION['ShopAllowSurcharges'] != $_POST['X_ShopAllowSurcharges'] ) { $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopAllowSurcharges']."' WHERE confname = 'ShopAllowSurcharges'"; } @@ -189,10 +193,22 @@ <th>' . _('Notes') . '</th> </tr>'; -echo '<tr> - <th colspan="3">' . _('General Settings') . '</th></tr>'; +echo '<tr><th colspan="3">' . _('General Settings') . '</th></tr>'; echo $TableHeader; +echo '<tr> + <td>' . _('Test or Live Mode') . ':</td> + <td><select name="X_ShopMode">'; + if ($_SESSION['ShopMode']== 'test' OR $AllowDemoMode){ + echo '<option selected="selected" value="test">' . _('Test') . '</option> + <option value="live">' . _('Live') . '</option>'; + } else { + echo '<option value="test">' . _('Test') . '</option> + <option selected="selected" value="live">' . _('Live') . '</option>'; + } + echo '</select></td> + <td>' . _('Must change this to live mode when the shop is activie. No PayPal or credit card transactions will be processed in test mode') . '</td> + </tr>'; //Shop Name echo '<tr> <td>' . _('Shop Name') . ':</td> @@ -243,6 +259,10 @@ <td>' . _('This text will appear on the web-store page that spells out the freight policy of the web-shop') . '</td> </tr>'; + +echo '<tr><th colspan="3">' . _('Web-Store Behaviour Settings') . '</th></tr>'; +echo $TableHeader; + echo '<tr> <td>' . _('Show Only Items With Available Stock') . ':</td> <td><select name="X_ShopShowOnlyAvailableItems">'; @@ -270,8 +290,14 @@ echo '</select></td> <td>' . _('Shows / Hides the QOH column Select Hide if you do not want customers to know how many stock do you currently hold.') . '</td> </tr>'; + +echo '<tr> + <td>' . _('Additional Stock Locations') . ':</td> + <td><input type="text" size="80" maxlength="100" name="X_ShopAdditionalStockLocations" value="' . $_SESSION['ShopAdditionalStockLocations'] . '" /></td> + <td>' . _('List of additional stock location codes, sepparated by comma. Web-Stote will consider stock at the default customer location plus these ones. + Leave empty if only will consider default customer location. Example: LOC01, LOC02, LOC03') . '</td> + </tr>'; - echo '<tr> <td>' . _('Allow Payment Surcharges') . ':</td> <td><select name="X_ShopAllowSurcharges">'; @@ -301,6 +327,11 @@ <td>' . _('Select the webERP service item to use for payment surcharges to be processed as') . '</td> </tr>'; + + +echo '<tr><th colspan="3">' . _('Bank Transfer Settings') . '</th></tr>'; +echo $TableHeader; + echo '<tr> <td>' . _('Allow Bank Transfer Payment') . ':</td> <td><select name="X_ShopAllowBankTransfer">'; @@ -320,6 +351,9 @@ <td>' . _('The bank transfer surcharge') . '</td> </tr>'; +echo '<tr><th colspan="3">' . _('Paypal Settings') . '</th></tr>'; +echo $TableHeader; + echo '<tr> <td>' . _('Allow PayPal Payment') . ':</td> <td><select name="X_ShopAllowPayPal">'; @@ -355,6 +389,32 @@ <td>' . _('The PayPal surcharge') . '</td> </tr>'; +if ($AllowDemoMode){ + echo '<tr> + <td>' . _('Paypal user account details') . '</td> + <td colspan="2">' . _('Cannot be set in the demo') . '</td> + </tr>'; +} else { + echo '<tr> + <td>' . _('PayPal User') . ':</td> + <td><input type="text" class="noSpecialChars" size="40" maxlength="40" name="X_ShopPayPalUser" value="' . $_SESSION['ShopPayPalUser'] . '" /></td> + <td>' . _('The PayPal Merchant User account for Pay Pal Express Checkout') . '</td> + </tr>'; + echo '<tr> + <td>' . _('PayPal Password') . ':</td> + <td><input type="text" size="20" maxlength="20" name="X_ShopPayPalPassword" value="' . $_SESSION['ShopPayPalPassword'] . '" /></td> + <td>' . _('The PayPal Merchant account password for Pay Pal Express Checkout') . '</td> + </tr>'; + echo '<tr> + <td>' . _('PayPal Signature') . ':</td> + <td><input type="text" size="80" maxlength="100" name="X_ShopPayPalSignature" value="' . $_SESSION['ShopPayPalSignature'] . '" /></td> + <td>' . _('The PayPal merchant account signature for Pay Pal Express Checkout') . '</td> + </tr>'; +} + +echo '<tr><th colspan="3">' . _('Credit Card Processing Settings') . '</th></tr>'; +echo $TableHeader; + echo '<tr> <td>' . _('Allow Credit Card Payments') . ':</td> <td><select name="X_ShopAllowCreditCards">'; @@ -417,20 +477,8 @@ <td>' . _('Select the webERP bank account to use for receipts processed by credit card') . '</td> </tr>'; -echo '<tr> - <td>' . _('Test or Live Mode') . ':</td> - <td><select name="X_ShopMode">'; - if ($_SESSION['ShopMode']== 'test' OR $AllowDemoMode){ - echo '<option selected="selected" value="test">' . _('Test') . '</option> - <option value="live">' . _('Live') . '</option>'; - } else { - echo '<option value="test">' . _('Test') . '</option> - <option selected="selected" value="live">' . _('Live') . '</option>'; - } - echo '</select></td> - <td>' . _('Must change this to live mode when the shop is activie. No PayPal or credit card transactions will be processed in test mode') . '</td> - </tr>'; + if ($AllowDemoMode){ echo '<tr> <td>' . _('Credit card user account details') . '</td> @@ -438,21 +486,6 @@ </tr>'; } else { echo '<tr> - <td>' . _('PayPal User') . ':</td> - <td><input type="text" class="noSpecialChars" size="40" maxlength="40" name="X_ShopPayPalUser" value="' . $_SESSION['ShopPayPalUser'] . '" /></td> - <td>' . _('The PayPal Merchant User account for Pay Pal Express Checkout') . '</td> - </tr>'; - echo '<tr> - <td>' . _('PayPal Password') . ':</td> - <td><input type="text" size="20" maxlength="20" name="X_ShopPayPalPassword" value="' . $_SESSION['ShopPayPalPassword'] . '" /></td> - <td>' . _('The PayPal Merchant account password for Pay Pal Express Checkout') . '</td> - </tr>'; - echo '<tr> - <td>' . _('PayPal Signature') . ':</td> - <td><input type="text" size="80" maxlength="100" name="X_ShopPayPalSignature" value="' . $_SESSION['ShopPayPalSignature'] . '" /></td> - <td>' . _('The PayPal merchant account signature for Pay Pal Express Checkout') . '</td> - </tr>'; - echo '<tr> <td>' . _('PayPal Pro User') . ':</td> <td><input type="text" class="noSpecialChars" size="40" maxlength="40" name="X_ShopPayPalProUser" value="' . $_SESSION['ShopPayPalProUser'] . '" /></td> <td>' . _('The PayPal Pro Merchant User account for credit card payment available in only USA and Canada') . '</td> Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-02 03:22:26 UTC (rev 6042) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-03 07:18:37 UTC (rev 6043) @@ -161,6 +161,7 @@ INSERT INTO config VALUES ('ShopShowOnlyAvailableItems','0'); INSERT INTO config VALUES ('ShopShowQOHColumn','1'); +INSERT INTO config VALUES ('ShopAdditionalStockLocations',''); UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |
From: <dai...@us...> - 2013-07-05 22:56:03
|
Revision: 6049 http://sourceforge.net/p/web-erp/reponame/6049 Author: daintree Date: 2013-07-05 22:56:00 +0000 (Fri, 05 Jul 2013) Log Message: ----------- Improvements to GL period selection Modified Paths: -------------- trunk/Customers.php trunk/GLAccountInquiry.php trunk/GLTrialBalance.php trunk/SelectGLAccount.php trunk/includes/session.inc trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2013-07-05 13:53:14 UTC (rev 6048) +++ trunk/Customers.php 2013-07-05 22:56:00 UTC (rev 6049) @@ -453,8 +453,7 @@ echo '<tr><td>' . _('Address Line 5 (Postal Code)') . ':</td> <td><input tabindex="7" type="text" name="Address5" size="22" maxlength="20" /></td></tr>'; - - if (!isset($_POST['Address6']) AND $CountryName == '') { + if (!isset($_POST['Address6'])) { $_POST['Address6'] = $CountriesArray[$_SESSION['CountryOfOperation']]; } echo '<tr> Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2013-07-05 13:53:14 UTC (rev 6048) +++ trunk/GLAccountInquiry.php 2013-07-05 22:56:00 UTC (rev 6049) @@ -19,6 +19,18 @@ $SelectedPeriod = $_GET['Period']; } +/* Get the start and periods, depending on how this script was called*/ +if (isset($SelectedPeriod)) { //If it was called from itself (in other words an inquiry was run and we wish to leave the periods selected unchanged + $FirstPeriodSelected = min($SelectedPeriod); + $LastPeriodSelected = max($SelectedPeriod); +} elseif (isset($_GET['FromPeriod'])) { //If it was called from the Trial Balance/P&L or Balance sheet + $FirstPeriodSelected = $_GET['FromPeriod']; + $LastPeriodSelected = $_GET['ToPeriod']; +} else { // Otherwise just highlight the current period + $FirstPeriodSelected = GetPeriod(date($_SESSION['DefaultDateFormat']), $db); + $LastPeriodSelected = GetPeriod(date($_SESSION['DefaultDateFormat']), $db); +} + echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/transactions.png" title="' . _('General Ledger Account Inquiry') . '" alt="" />' . ' ' . _('General Ledger Account Inquiry') . '</p>'; echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple periods') . '</div><br />'; @@ -77,11 +89,9 @@ $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC"; $Periods = DB_query($sql,$db); -$id=0; while ($myrow=DB_fetch_array($Periods,$db)){ - if(isset($SelectedPeriod[$id]) and $myrow['periodno'] == $SelectedPeriod[$id]){ + if (isset($FirstPeriodSelected) AND $myrow['periodno'] >= $FirstPeriodSelected AND $myrow['periodno'] <= $LastPeriodSelected) { echo '<option selected="selected" value="' . $myrow['periodno'] . '">' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; - $id++; } else { echo '<option value="' . $myrow['periodno'] . '">' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; } @@ -205,14 +215,14 @@ $RunningTotal =$ChartDetailRow['bfwd']; if ($RunningTotal < 0 ){ //its a credit balance b/fwd - echo '<tr style="background-color:#FDFEEF"> + echo '<tr> <td colspan="3"><b>' . _('Brought Forward Balance') . '</b></td> <td></td> <td class="number"><b>' . locale_number_format(-$RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> <td></td> </tr>'; } else { //its a debit balance b/fwd - echo '<tr style="background-color:#FDFEEF"> + echo '<tr> <td colspan="3"><b>' . _('Brought Forward Balance') . '</b></td> <td class="number"><b>' . locale_number_format($RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> <td colspan="2"></td> @@ -241,7 +251,7 @@ $ChartDetailsResult = DB_query($sql,$db,$ErrMsg); $ChartDetailRow = DB_fetch_array($ChartDetailsResult); - echo '<tr style="background-color:#FDFEEF"> + echo '<tr> <td colspan="3"><b>' . _('Total for period') . ' ' . $PeriodNo . '</b></td>'; if ($PeriodTotal < 0 ){ //its a credit balance b/fwd if ($PandLAccount==True) { @@ -256,7 +266,7 @@ $RunningTotal = 0; } echo '<td class="number"><b>' . locale_number_format($PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> - <td colspan="2"></td> + <td colspan="2"></td> </tr>'; } $IntegrityReport .= '<br />' . _('Period') . ': ' . $PeriodNo . _('Account movement per transaction') . ': ' . locale_number_format($PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('Movement per ChartDetails record') . ': ' . locale_number_format($ChartDetailRow['actual'],$_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('Period difference') . ': ' . locale_number_format($PeriodTotal -$ChartDetailRow['actual'],3); @@ -312,7 +322,7 @@ } - echo '<tr style="background-color:#FDFEEF"> + echo '<tr> <td colspan="3"><b>'; if ($PandLAccount==True){ echo _('Total Period Movement'); @@ -322,9 +332,13 @@ echo '</b></td>'; if ($RunningTotal >0){ - echo '<td class="number"><b>' . locale_number_format(($RunningTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td><td colspan="2"></td></tr>'; + echo '<td class="number"><b>' . locale_number_format(($RunningTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> + <td colspan="2"></td> + </tr>'; }else { - echo '<td></td><td class="number"><b>' . locale_number_format((-$RunningTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td><td colspan="2"></td></tr>'; + echo '<td></td> + <td class="number"><b>' . locale_number_format((-$RunningTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td><td colspan="2"></td> + </tr>'; } echo '</table>'; } /* end of if Show button hit */ Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2013-07-05 13:53:14 UTC (rev 6048) +++ trunk/GLTrialBalance.php 2013-07-05 22:56:00 UTC (rev 6049) @@ -25,6 +25,9 @@ AND ! isset($_POST['ToPeriod'])) OR isset($_POST['SelectADifferentPeriod'])){ + $ViewTopic = 'GeneralLedger'; + $BookMark = 'TrialBalance'; + include ('includes/header.inc'); echo '<p class="page_title_text"> <img src="'.$RootPath.'/css/'.$Theme.'/images/magnifier.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . $Title . ' @@ -158,6 +161,8 @@ $AccountsResult = DB_query($SQL,$db); if (DB_error_no($db) !=0) { $Title = _('Trial Balance') . ' - ' . _('Problem Report') . '....'; + $ViewTopic = 'GeneralLedger'; + $BookMark = 'TrialBalance'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); echo '<br /><a href="' .$RootPath .'/index.php">'. _('Back to the menu'). '</a>'; @@ -169,6 +174,8 @@ } if (DB_num_rows($AccountsResult)==0){ $Title = _('Print Trial Balance Error'); + $ViewTopic = 'GeneralLedger'; + $BookMark = 'TrialBalance'; include('includes/header.inc'); echo '<p>'; prnMsg( _('There were no entries to print out for the selections specified') ); @@ -384,10 +391,10 @@ } else { include('includes/header.inc'); - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<input type="hidden" name="FromPeriod" value="' . $_POST['FromPeriod'] . '" /> + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <input type="hidden" name="FromPeriod" value="' . $_POST['FromPeriod'] . '" /> <input type="hidden" name="ToPeriod" value="' . $_POST['ToPeriod'] . '" />'; $NumberOfMonths = $_POST['ToPeriod'] - $_POST['FromPeriod'] + 1; @@ -438,15 +445,16 @@ Account Code , Account Name , Month Actual, Month Budget, Period Actual, Period Budget */ echo '<table cellpadding="2" class="selection">'; - echo '<tr><th colspan="6"><b>'. _('Trial Balance for the month of ') . $PeriodToDate . - _(' and for the ') . $NumberOfMonths . _(' months to ') . $PeriodToDate .'</b></th></tr>'; + echo '<tr> + <th colspan="6"><b>'. _('Trial Balance for the month of ') . $PeriodToDate . _(' and for the ') . $NumberOfMonths . _(' months to ') . $PeriodToDate .'</b></th> + </tr>'; $TableHeader = '<tr> - <th>' . _('Account') . '</th> - <th>' . _('Account Name') . '</th> - <th>' . _('Month Actual') . '</th> - <th>' . _('Month Budget') . '</th> - <th>' . _('Period Actual') . '</th> - <th>' . _('Period Budget') .'</th> + <th>' . _('Account') . '</th> + <th>' . _('Account Name') . '</th> + <th>' . _('Month Actual') . '</th> + <th>' . _('Month Budget') . '</th> + <th>' . _('Period Actual') . '</th> + <th>' . _('Period Budget') .'</th> </tr>'; $j = 1; @@ -553,9 +561,9 @@ $ParentGroups[$Level]=$myrow['groupname']; $ActGrp = $myrow['groupname']; printf('<tr> - <td colspan="6"><h2>%s</h2></td> - </tr>', - $myrow['groupname']); + <td colspan="6"><h2>%s</h2></td> + </tr>', + $myrow['groupname']); echo $TableHeader; $j++; } @@ -613,7 +621,7 @@ $CheckPeriodActual += $AccountPeriodActual; $CheckPeriodBudget += $AccountPeriodBudget; - $ActEnquiryURL = '<a href="'. $RootPath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '</a>'; + $ActEnquiryURL = '<a href="'. $RootPath . '/GLAccountInquiry.php?FromPeriod=' . $_POST['FromPeriod'] . '&ToPeriod=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '</a>'; printf('<td>%s</td> <td>%s</td> @@ -722,10 +730,12 @@ locale_number_format($CheckPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces'])); echo '</table><br />'; - echo '<div class="centre"><input type="submit" name="SelectADifferentPeriod" value="' . _('Select A Different Period') . '" /></div>'; + echo '<div class="centre"> + <input type="submit" name="SelectADifferentPeriod" value="' . _('Select A Different Period') . '" /> + </div>'; } -echo '</div>'; -echo '</form>'; +echo '</div> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/SelectGLAccount.php =================================================================== --- trunk/SelectGLAccount.php 2013-07-05 13:53:14 UTC (rev 6048) +++ trunk/SelectGLAccount.php 2013-07-05 22:56:00 UTC (rev 6049) @@ -4,32 +4,15 @@ include('includes/session.inc'); $Title = _('Search GL Accounts'); - +$ViewTopic = 'GeneralLedger'; +$BookMark = 'GLAccountInquiry'; include('includes/header.inc'); $msg=''; unset($result); -if (isset($_POST['Select'])) { +if (isset($_POST['Search'])){ - $result = DB_query("SELECT accountname FROM chartmaster WHERE accountcode=" . $_POST['Select'],$db); - $myrow = DB_fetch_row($result); - echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for General Ledger Accounts') . '</p>'; - - echo '<div class="page_help_text">' . _('Account Code') . ' <b>' . $_POST['Select'] . ' - ' . $myrow[0] . ' </b>' . _('has been selected') . '. <br />' . _('Select one of the links below to operate using this Account') . '.</div>'; - $AccountID = $_POST['Select']; - $_POST['Select'] = NULL; - - echo '<br /> - <div class="centre"> - <a href="' . $RootPath . '/GLAccounts.php?SelectedAccount=' . $AccountID . '">' . _('Edit Account') . '</a>'; - echo '<br /> - <a href="' . $RootPath . '/GLAccountInquiry.php?Account=' . $AccountID . '">' . _('Account Inquiry') . '</a>'; - echo '<br /> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('New Search') . '</a></div>'; - -} elseif (isset($_POST['Search'])){ - if (mb_strlen($_POST['Keywords']>0) AND mb_strlen($_POST['GLCode'])>0) { $msg=_('Account name keywords have been used in preference to the account code extract entered'); } @@ -84,12 +67,11 @@ if (!isset($AccountID)) { - echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/magnifier.png" title="' . _('Search') . - '" alt="" />' . ' ' . _('Search for General Ledger Accounts') . '</p>'; - echo '<br /> - <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for General Ledger Accounts') . '</p> + <br /> + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if(mb_strlen($msg)>1){ prnMsg($msg,'info'); @@ -120,6 +102,8 @@ <th>' . _('Account Name') . '</th> <th>' . _('Group') . '</th> <th>' . _('Account Type') . '</th> + <th>' . _('Inquiry') . '</th> + <th>' . _('Edit') . '</th> </tr>'; echo $TableHeader; @@ -129,15 +113,25 @@ while ($myrow=DB_fetch_array($result)) { printf('<tr> - <td><input type="submit" name="Select" value="%s" /></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - </tr>', - $myrow['accountcode'], - htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false), - $myrow['group_'], - $myrow['pl']); + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td><a href="%s/GLAccountInquiry.php?Account=%s&Show=Yes"><img src="%s/css/%s/images/magnifier.png" title="' . _('Inquiry') . '" alt="' . _('Inquiry') . '" /></td> + <td><a href="%s/GLAccounts.php?SelectedAccount=%s"><img src="%s/css/%s/images/maintenance.png" title="' . _('Edit') . '" alt="' . _('Edit') . '" /></a> + </tr>', + htmlspecialchars($myrow['accountcode'],ENT_QUOTES,'UTF-8',false), + htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false), + $myrow['group_'], + $myrow['pl'], + $RootPath, + $myrow['accountcode'], + $RootPath, + $Theme, + $RootPath, + $myrow['accountcode'], + $RootPath, + $Theme); $j++; if ($j == 12){ Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2013-07-05 13:53:14 UTC (rev 6048) +++ trunk/includes/session.inc 2013-07-05 22:56:00 UTC (rev 6049) @@ -42,10 +42,7 @@ include($PathPrefix . 'includes/ConnectDB.inc'); include($PathPrefix . 'includes/DateFunctions.inc'); -// Uncomment to turn off attempts counter -//$_SESSION['AttemptsCounter'] = 0; - -if (!isset($_SESSION['AttemptsCounter'])){ +if (!isset($_SESSION['AttemptsCounter']) OR $AllowDemoMode==true){ $_SESSION['AttemptsCounter'] = 0; } Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-05 13:53:14 UTC (rev 6048) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-05 22:56:00 UTC (rev 6049) @@ -159,6 +159,8 @@ INSERT INTO config VALUES ('ShopMode','test'); INSERT INTO config VALUES ('ShopContactUs',''); +ALTER TABLE `purchorderauth` CHANGE `authlevel` `authlevel` DOUBLE NOT NULL DEFAULT '0'; + INSERT INTO config VALUES ('ShopShowOnlyAvailableItems','0'); INSERT INTO config VALUES ('ShopShowQOHColumn','1'); INSERT INTO config VALUES ('ShopAdditionalStockLocations',''); |
From: <dai...@us...> - 2013-07-06 02:37:04
|
Revision: 6050 http://sourceforge.net/p/web-erp/reponame/6050 Author: daintree Date: 2013-07-06 02:37:01 +0000 (Sat, 06 Jul 2013) Log Message: ----------- start on html5 Modified Paths: -------------- trunk/AccountGroups.php trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AddCustomerNotes.php trunk/AddCustomerTypeNotes.php trunk/AgedDebtors.php trunk/SelectOrderItems.php trunk/css/aguapop/default.css trunk/css/default/default.css trunk/css/fluid/default.css trunk/css/fresh/default.css trunk/css/gel/default.css trunk/css/professional/default.css trunk/css/professional-rtl/default.css trunk/css/silverwolf/default.css trunk/css/wood/default.css trunk/includes/header.inc Removed Paths: ------------- trunk/javascripts/jquery-1.9.1.min.js trunk/javascripts/jquery.validate.min.js Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/AccountGroups.php 2013-07-06 02:37:01 UTC (rev 6050) @@ -11,47 +11,7 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); -?> -<script> - /* jQuery/javascript code */ - jQuery(document).ready(function() { - jQuery('.noSpecialChars').bind('input', function() { - jQuery(this).val($(this).val().replace(/[^a-z0-9_\-]/gi, '')); - }); - jQuery('.number').bind('input', function() { - jQuery(this).val($(this).val().replace(/[^0-9]/gi, '')); - }); - jQuery('#AccountGroups').validate({ - rules: { - GroupName: { - minlength: 3 - }, - SequenceInTB: { - digits: true - } - }, //end rules - messages : { - GroupName: { - required: "<?php echo _('The new account group name must be entered') ?>", - minlength: "<?php echo _('The account group is expected to be 3 characters or more long') ?>" - }, - SequenceInTB: { - required: "<?php echo _('The sequence in the trial balance that the accounts under this account group should display must be entered') ?>", - digits: "<?php echo _('The sequence number can only contain digits') ?>" - } - }, //end messages - - errorPlacement: function(error, element) { - error.insertAfter(element); - error.prepend('<br />'); - } // end errorPlacement - }); //end validation - } - ); -</script> -<?php - function CheckForRecursiveGroup ($ParentGroupName, $GroupName, $db) { /* returns true ie 1 if the group contains the parent group as a child group @@ -441,7 +401,7 @@ } echo '<tr> <td>' . _('Account Group Name') . ':' . '</td> - <td><input tabindex="1" class="required noSpecialChars' . (in_array('GroupName',$Errors) ? ' inputerror' : '' ) . '" type="text" name="GroupName" size="30" maxlength="30" value="' . $_POST['GroupName'] . '" title="' . _('A unique name for the account group must be entered - at least 3 characters long and less than 30 characters long') . '" /></td> + <td><input tabindex="1" autofocus required placeholder="' . _('Enter the account group name') . '" ' . (in_array('GroupName',$Errors) ? '"class=inputerror"' : '' ) . ' type="text" name="GroupName" size="30" maxlength="30" value="' . $_POST['GroupName'] . '" title="' . _('A unique name for the account group must be entered - at least 3 characters long and less than 30 characters long') . '" /></td> </tr> <tr> <td>' . _('Parent Group') . ':' . '</td> @@ -499,7 +459,7 @@ </tr> <tr> <td>' . _('Sequence In TB') . ':' . '</td> - <td><input tabindex="5" type="text" maxlength="4" name="SequenceInTB" class="number required" value="' . $_POST['SequenceInTB'] . '" title="' . _('Enter the sequence number that this account group and its child general ledger accounts should display in the trial balance') . '" /></td> + <td><input tabindex="5" type="number" min="0" maxlength="4" name="SequenceInTB" required class="number" value="' . $_POST['SequenceInTB'] . '" title="' . _('Enter the sequence number that this account group and its child general ledger accounts should display in the trial balance') . '" /></td> </tr> <tr> <td colspan="2"><div class="centre"><input tabindex="6" type="submit" name="submit" value="' . _('Enter Information') . '" /></div></td> Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/AccountSections.php 2013-07-06 02:37:01 UTC (rev 6050) @@ -251,11 +251,11 @@ echo '<table class="selection"> <tr> <td>' . _('Section Number') . ':' . '</td> - <td><input tabindex="1" ' . (in_array('SectionID',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="SectionID" class="number" size="4" maxlength="4" value="' . $_POST['SectionID'] . '" /></td> + <td><input tabindex="1" ' . (in_array('SectionID',$Errors) ? 'class="inputerror"' : '' ) .' type="number" autofocus required min="0" name="SectionID" class="number" size="4" maxlength="4" value="' . $_POST['SectionID'] . '" /></td> </tr>'; } echo '<tr><td>' . _('Section Description') . ':' . '</td> - <td><input tabindex="2" ' . (in_array('SectionName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="SectionName" size="30" maxlength="30" value="' . $_POST['SectionName'] . '" /></td> + <td><input tabindex="2" ' . (in_array('SectionName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="SectionName" required size="30" maxlength="30" value="' . $_POST['SectionName'] . '" /></td> </tr>'; echo '<tr> Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/AddCustomerContacts.php 2013-07-06 02:37:01 UTC (rev 6050) @@ -213,10 +213,10 @@ echo '<tr> <td>'. _('Contact Name') . '</td>'; if (isset($_POST['ContactName'])) { - echo '<td><input type="text" name="ContactName" value="' . $_POST['ContactName']. '" size="35" maxlength="40" /></td> + echo '<td><input type="text" autofocus required name="ContactName" value="' . $_POST['ContactName']. '" size="35" maxlength="40" /></td> </tr>'; } else { - echo '<td><input type="text" name="ContactName" size="35" maxlength="40" /></td> + echo '<td><input type="text" required name="ContactName" size="35" maxlength="40" /></td> </tr>'; } echo '<tr> @@ -231,19 +231,19 @@ echo '<tr> <td>' . _('Phone') . '</td>'; if (isset($_POST['ContactPhone'])) { - echo '<td><input type="text" name="ContactPhone" value="' . $_POST['ContactPhone'] . '" size="35" maxlength="40" /></td> + echo '<td><input type="tel" name="ContactPhone" value="' . $_POST['ContactPhone'] . '" size="35" maxlength="40" /></td> </tr>'; } else { - echo '<td><input type="text" name="ContactPhone" size="35" maxlength="40" /></td> + echo '<td><input type="tel" name="ContactPhone" size="35" maxlength="40" /></td> </tr>'; } echo '<tr> <td>' . _('Email') . '</td>'; if (isset($_POST['ContactEmail'])) { - echo '<td><input type="text" name="ContactEmail" value="' . $_POST['ContactEmail'] . '" size="55" maxlength="55" /></td> + echo '<td><input type="email" name="ContactEmail" value="' . $_POST['ContactEmail'] . '" size="55" maxlength="55" /></td> </tr>'; } else { - echo '<td><input type="text" name="ContactEmail" size="55" maxlength="55" /></td> + echo '<td><input type="email" name="ContactEmail" size="55" maxlength="55" /></td> </tr>'; } echo '<tr> Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/AddCustomerNotes.php 2013-07-06 02:37:01 UTC (rev 6050) @@ -43,7 +43,7 @@ if (isset($Id) and $InputError !=1) { $sql = "UPDATE custnotes SET note='" . $_POST['Note'] . "', - date='" . FormatDateForSQL($_POST['date']) . "', + date='" . FormatDateForSQL($_POST['NoteDate']) . "', href='" . $_POST['Href'] . "', priority='" . $_POST['Priority'] . "' WHERE debtorno ='".$DebtorNo."' @@ -59,7 +59,7 @@ VALUES ('" . $DebtorNo. "', '" . $_POST['Href'] . "', '" . $_POST['Note'] . "', - '" . FormatDateForSQL($_POST['date']) . "', + '" . FormatDateForSQL($_POST['NoteDate']) . "', '" . $_POST['Priority'] . "')"; $msg = _('The contact notes record has been added'); } @@ -73,7 +73,7 @@ unset($Id); unset($_POST['Note']); unset($_POST['Noteid']); - unset($_POST['date']); + unset($_POST['NoteDate']); unset($_POST['Href']); unset($_POST['Priority']); } @@ -185,7 +185,7 @@ $_POST['Noteid'] = $myrow['noteid']; $_POST['Note'] = $myrow['note']; $_POST['Href'] = $myrow['href']; - $_POST['date'] = $myrow['date']; + $_POST['NoteDate'] = $myrow['date']; $_POST['Priority'] = $myrow['priority']; $_POST['debtorno'] = $myrow['debtorno']; echo '<input type="hidden" name="Id" value="'. $Id .'" />'; @@ -203,37 +203,37 @@ echo '<tr> <td>' . _('Contact Note'). '</td>'; if (isset($_POST['Note'])) { - echo '<td><textarea name="Note" rows="3" cols="32">' .$_POST['Note'] . '</textarea></td> + echo '<td><textarea name="Note" autofocus required rows="3" cols="32">' .$_POST['Note'] . '</textarea></td> </tr>'; } else { - echo '<td><textarea name="Note" rows="3" cols="32"></textarea></td> + echo '<td><textarea name="Note" autofocus required rows="3" cols="32"></textarea></td> </tr>'; } echo '<tr> <td>'. _('WWW').'</td>'; if (isset($_POST['Href'])) { - echo '<td><input type="text" name="Href" value="'.$_POST['Href'].'" size="35" maxlength="100" /></td> + echo '<td><input type="url" name="Href" value="'.$_POST['Href'].'" size="35" maxlength="100" /></td> </tr>'; } else { - echo '<td><input type="text" name="Href" size="35" maxlength="100" /></td> + echo '<td><input type="url" name="Href" size="35" maxlength="100" /></td> </tr>'; } echo '<tr> <td>' . _('Date') .'</td>'; - if (isset($_POST['date'])) { - echo '<td><input type="text" name="date" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" id="datepicker" value="'.ConvertSQLDate($_POST['date']).'" size="10" maxlength="10" /></td> + if (isset($_POST['NoteDate'])) { + echo '<td><input type="date" required name="NoteDate" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" id="datepicker" value="'.ConvertSQLDate($_POST['NoteDate']).'" size="10" maxlength="10" /></td> </tr>'; } else { - echo '<td><input type="text" name="date" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" id="datepicker" size="10" maxlength="10" /></td> + echo '<td><input type="date" required name="NoteDate" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" id="datepicker" size="10" maxlength="10" /></td> </tr>'; } echo '<tr> <td>'. _('Priority'). '</td>'; if (isset($_POST['Priority'])) { - echo '<td><input type="text" name="Priority" value="' .$_POST['Priority']. '" size="1" maxlength="3" /></td> + echo '<td><input type="number" required min="1" name="Priority" value="' . $_POST['Priority']. '" size="1" maxlength="3" /></td> </tr>'; } else { - echo '<td><input type="text" name="Priority" size="1" maxlength="3" /></td> + echo '<td><input type="number" required min="1" name="Priority" size="1" maxlength="3" value="1"/></td> </tr>'; } echo '<tr> Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/AddCustomerTypeNotes.php 2013-07-06 02:37:01 UTC (rev 6050) @@ -26,23 +26,23 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (!is_long((integer)$_POST['priority'])) { + if (!is_long((integer)$_POST['Priority'])) { $InputError = 1; prnMsg( _('The Contact priority must be an integer.'), 'error'); - } elseif (mb_strlen($_POST['note']) >200) { + } elseif (mb_strlen($_POST['Note']) >200) { $InputError = 1; prnMsg( _('The contacts notes must be two hundred characters or less long'), 'error'); - } elseif( trim($_POST['note']) == '' ) { + } elseif( trim($_POST['Note']) == '' ) { $InputError = 1; prnMsg( _('The contacts notes may not be empty'), 'error'); } if ($Id and $InputError !=1) { - $sql = "UPDATE debtortypenotes SET note='" . $_POST['note'] . "', - date='" . FormatDateForSQL($_POST['date']) . "', - href='" . $_POST['href'] . "', - priority='" . $_POST['priority'] . "' + $sql = "UPDATE debtortypenotes SET note='" . $_POST['Note'] . "', + date='" . FormatDateForSQL($_POST['NoteDate']) . "', + href='" . $_POST['Href'] . "', + priority='" . $_POST['Priority'] . "' WHERE typeid ='".$DebtorType."' AND noteid='".$Id."'"; $msg = _('Customer Group Notes') . ' ' . $DebtorType . ' ' . _('has been updated'); @@ -54,10 +54,10 @@ date, priority) VALUES ('" . $DebtorType. "', - '" . $_POST['href'] . "', - '" . $_POST['note'] . "', - '" . FormatDateForSQL($_POST['date']) . "', - '" . $_POST['priority'] . "')"; + '" . $_POST['Href'] . "', + '" . $_POST['Note'] . "', + '" . FormatDateForSQL($_POST['NoteDate']) . "', + '" . $_POST['Priority'] . "')"; $msg = _('The contact group notes record has been added'); } @@ -67,8 +67,8 @@ echo '<br />'; prnMsg($msg, 'success'); unset($Id); - unset($_POST['note']); - unset($_POST['noteid']); + unset($_POST['Note']); + unset($_POST['NoteID']); } } elseif (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button @@ -175,45 +175,45 @@ $myrow = DB_fetch_array($result); - $_POST['noteid'] = $myrow['noteid']; - $_POST['note'] = $myrow['note']; - $_POST['href'] = $myrow['href']; - $_POST['date'] = $myrow['date']; - $_POST['priority'] = $myrow['priority']; + $_POST['NoteID'] = $myrow['noteid']; + $_POST['Note'] = $myrow['note']; + $_POST['Href'] = $myrow['href']; + $_POST['NoteDate'] = $myrow['date']; + $_POST['Priority'] = $myrow['priority']; $_POST['typeid'] = $myrow['typeid']; echo '<input type="hidden" name="Id" value="'. $Id .'" />'; - echo '<input type="hidden" name="Con_ID" value="' . $_POST['noteid'] . '" />'; + echo '<input type="hidden" name="Con_ID" value="' . $_POST['NoteID'] . '" />'; echo '<input type="hidden" name="DebtorType" value="' . $_POST['typeid'] . '" />'; echo '<table class="selection"> <tr> <td>'. _('Note ID').':</td> - <td>' . $_POST['noteid'] . '</td> + <td>' . $_POST['NoteID'] . '</td> </tr>'; } else { echo '<table class="selection">'; - $_POST['noteid'] = ''; - $_POST['note'] = ''; - $_POST['href'] = ''; - $_POST['date'] = ''; - $_POST['priority'] = ''; + $_POST['NoteID'] = ''; + $_POST['Note'] = ''; + $_POST['Href'] = ''; + $_POST['NoteDate'] = Date($_SESSION['DefaultDateFormat']); + $_POST['Priority'] = '1'; $_POST['typeid'] = ''; } echo '<tr> <td>'._('Contact Group Note').':</td> - <td><textarea name="note" rows="3" cols="32">'. $_POST['note'].'</textarea></td> + <td><textarea name="Note" autofocus required rows="3" cols="32">'. $_POST['Note'].'</textarea></td> </tr> <tr> <td>'. _('Web site').':</td> - <td><input type="text" name="href" value="'. $_POST['href'].'" size="35" maxlength="100" /></td> + <td><input type="url" name="Href" value="'. $_POST['Href'].'" size="35" maxlength="100" /></td> </tr> <tr> <td>'. _('Date').':</td> - <td><input type="text" name="date" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" value="'. $_POST['date']. '" size="10" maxlength="10" /></td> + <td><input type="date" required name="NoteDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" value="'. $_POST['NoteDate']. '" size="10" maxlength="10" /></td> </tr> <tr> <td>'. _('Priority').':</td> - <td><input type="text" name="priority" value="'. $_POST['priority'].'" size="1" maxlength="3" /></td> + <td><input type="number" required min="1" class="number" name="Priority" value="'. $_POST['Priority'] .'" size="1" maxlength="3" /></td> </tr> </table> <br /> Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/AgedDebtors.php 2013-07-06 02:37:01 UTC (rev 6050) @@ -457,11 +457,11 @@ <table class="selection"> <tr> <td>' . _('From Customer Code') . ':' . '</td> - <td><input tabindex="1" type="text" maxlength="6" size="7" name="FromCriteria" value="0" /></td> + <td><input tabindex="1" autofocus required type="text" maxlength="6" size="7" name="FromCriteria" value="0" /></td> </tr> <tr> <td>' . _('To Customer Code') . ':' . '</td> - <td><input tabindex="2" type="text" maxlength="6" size="7" name="ToCriteria" value="zzzzzz" /></td> + <td><input tabindex="2" type="text" required maxlength="6" size="7" name="ToCriteria" value="zzzzzz" /></td> </tr> <tr> <td>' . _('All balances or overdues only') . ':' . '</td> Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/SelectOrderItems.php 2013-07-06 02:37:01 UTC (rev 6050) @@ -1421,7 +1421,7 @@ echo '<a target="_blank" href="' . $RootPath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> <td title="' . $OrderLine->LongDescription . '">' . $OrderLine->ItemDescription . '</td>'; - 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) . '" />'; + echo '<td><input class="number" tabindex="2" type="number" min="0" required 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'); } @@ -1431,9 +1431,9 @@ if (in_array($_SESSION['PageSecurityArray']['OrderEntryDiscountPricing'], $_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="4" maxlength="40" value="' . locale_number_format($OrderLine->GPPercent,2) . '" /></td>'; + echo '<td><input class="number" type="number" min="0" required name="Price_' . $OrderLine->LineNumber . '" size="16" maxlength="16" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td> + <td><input class="number" type="number" min="0" required max="100" name="Discount_' . $OrderLine->LineNumber . '" size="5" maxlength="4" value="' . locale_number_format(($OrderLine->DiscountPercent * 100),2) . '" /></td> + <td><input class="number" type="number" min="0" required max="99.9" 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); echo '<input class="number" type="hidden" name="GPPercent_' . $OrderLine->LineNumber . '" size="4" maxlength="40" value="' . locale_number_format($OrderLine->GPPercent,2) . '" />'; @@ -1451,7 +1451,7 @@ $_SESSION['Items'.$identifier]->LineItems[$OrderLine->LineNumber]->ItemDue= $LineDueDate; } - echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ItemDue_' . $OrderLine->LineNumber . '" size="10" maxlength="10" value="' . $LineDueDate . '" /></td>'; + echo '<td><input type="date" min="' . Date('Y-m-d') . '" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ItemDue_' . $OrderLine->LineNumber . '" size="10" maxlength="10" value="' . $LineDueDate . '" /></td>'; echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . $RemTxt . '</a></td></tr>'; @@ -1459,7 +1459,9 @@ echo $RowStarter; echo '<td colspan="10">' . _('Narrative') . ':<textarea name="Narrative_' . $OrderLine->LineNumber . '" cols="100%" rows="1">' . stripslashes(AddCarriageReturns($OrderLine->Narrative)) . '</textarea><br /></td></tr>'; } else { - echo '<tr><td><input type="hidden" name="Narrative" value="" /></td></tr>'; + echo '<tr> + <td><input type="hidden" name="Narrative" value="" /></td> + </tr>'; } $_SESSION['Items'.$identifier]->total = $_SESSION['Items'.$identifier]->total + $LineTotal; @@ -1695,7 +1697,7 @@ } echo '" /></td>'; - echo '<td align="right"><b>' . _('OR') . ' ' . _('Enter extract of the Stock Code') . ':</b><input tabindex="3" type="text" name="StockCode" size="15" maxlength="18" value="'; + echo '<td align="right"><b>' . _('OR') . ' ' . _('Enter extract of the Stock Code') . ':</b><input tabindex="3" type="text" autofocus name="StockCode" size="15" maxlength="18" value="'; if (isset($_POST['StockCode'])) { echo $_POST['StockCode']; } @@ -1828,7 +1830,7 @@ <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'. $i . '" value="0" /> + <td><input class="number" tabindex="'.strval($j+7).'" type="number" size="6" name="OrderQty'. $i . '" value="0" min="0"/> <input type="hidden" name="StockID'. $i . '" value="' . $myrow['stockid']. '" /> </td> </tr>', @@ -1879,11 +1881,12 @@ echo '<td><input type="text" name="poline_' . $i . '" size="21" maxlength="20" /></td>'; } echo '<td><input type="text" name="part_' . $i . '" size="21" maxlength="20" /></td> - <td><input type="text" name="qty_' . $i . '" size="6" maxlength="6" /></td> - <td><input type="text" class="date" name="itemdue_' . $i . '" size="25" maxlength="25" + <td><input type="number" name="qty_' . $i . '" size="6" maxlength="6" /></td> + <td><input type="date" class="date" name="itemdue_' . $i . '" size="25" maxlength="25" alt="'.$_SESSION['DefaultDateFormat'].'" value="' . $DefaultDeliveryDate . '" /></td></tr>'; } - echo '</table><script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.part_1);}</script>'; + echo '</table> + <script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.part_1);}</script>'; echo '<br /><div class="centre"><input type="submit" name="QuickEntry" value="' . _('Quick Entry') . '" /> <input type="submit" name="PartSearch" value="' . _('Search Parts') . '" /></div>'; Modified: trunk/css/aguapop/default.css =================================================================== --- trunk/css/aguapop/default.css 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/css/aguapop/default.css 2013-07-06 02:37:01 UTC (rev 6050) @@ -115,7 +115,7 @@ color:red; border: 2px solid red; } -input.required, select.required{ +input:required, select:required, textarea:required { background-color:lightyellow; } select:hover { /* drop down */ Modified: trunk/css/default/default.css =================================================================== --- trunk/css/default/default.css 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/css/default/default.css 2013-07-06 02:37:01 UTC (rev 6050) @@ -84,6 +84,9 @@ border-width:0px; background-color:transparent; } +input:required, select:required, textarea:required { + background-color:lightyellow; +} input:hover{ } select{ @@ -230,9 +233,7 @@ color:red; border: 2px solid red; } -input.required, select.required{ - background-color:lightyellow; -} + textarea.texterror{ background-color:#fddbdb; } Modified: trunk/css/fluid/default.css =================================================================== --- trunk/css/fluid/default.css 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/css/fluid/default.css 2013-07-06 02:37:01 UTC (rev 6050) @@ -89,7 +89,7 @@ color:red; border: 2px solid red; } -input.required, select.required{ +input:required, select:required, textarea:required { background-color:lightyellow; } select{ Modified: trunk/css/fresh/default.css =================================================================== --- trunk/css/fresh/default.css 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/css/fresh/default.css 2013-07-06 02:37:01 UTC (rev 6050) @@ -107,7 +107,7 @@ color:red; border: 2px solid red; } -input.required, select.required{ +input:required, select:required, textarea:required { background-color:lightyellow; } textarea{ Modified: trunk/css/gel/default.css =================================================================== --- trunk/css/gel/default.css 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/css/gel/default.css 2013-07-06 02:37:01 UTC (rev 6050) @@ -109,7 +109,7 @@ color:red; border: 2px solid red; } -input.required, select.required{ +input:required, select:required, textarea:required { background-color:lightyellow; } select { Modified: trunk/css/professional/default.css =================================================================== --- trunk/css/professional/default.css 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/css/professional/default.css 2013-07-06 02:37:01 UTC (rev 6050) @@ -149,7 +149,7 @@ color:red; border: 2px solid red; } -input.required, select.required{ +input:required, select:required, textarea:required { background-color:lightyellow; } Modified: trunk/css/professional-rtl/default.css =================================================================== --- trunk/css/professional-rtl/default.css 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/css/professional-rtl/default.css 2013-07-06 02:37:01 UTC (rev 6050) @@ -157,7 +157,7 @@ color:red; border: 2px solid red; } -input.required, select.required{ +input:required, select:required, textarea:required { background-color:lightyellow; } /* for buttons ***HJ***/ Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/css/silverwolf/default.css 2013-07-06 02:37:01 UTC (rev 6050) @@ -131,7 +131,7 @@ color:red; border: 2px solid red; } -input.required, select.required{ +input:required, select:required, textarea:required { background-color:lightyellow; } select{ Modified: trunk/css/wood/default.css =================================================================== --- trunk/css/wood/default.css 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/css/wood/default.css 2013-07-06 02:37:01 UTC (rev 6050) @@ -126,7 +126,7 @@ color:red; border: 2px solid red; } -input.required, select.required{ +input:required, select:required, textarea:required { background-color:lightyellow; } textarea{ Modified: trunk/includes/header.inc =================================================================== --- trunk/includes/header.inc 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/includes/header.inc 2013-07-06 02:37:01 UTC (rev 6050) @@ -38,9 +38,7 @@ echo '<meta http-equiv="Content-Type" content="application/html; charset=utf-8" />'; } echo '<link href="' . $RootPath . '/css/'. $_SESSION['Theme'] .'/default.css" rel="stylesheet" type="text/css" />'; - echo '<script type="text/javascript" src = "'.$RootPath.'/javascripts/MiscFunctions.js"></script> - <script type="text/javascript" src = "'.$RootPath.'/javascripts/jquery-1.9.1.min.js"></script> - <script type="text/javascript" src = "'.$RootPath.'/javascripts/jquery.validate.min.js"></script>'; + echo '<script type="text/javascript" src = "'.$RootPath.'/javascripts/MiscFunctions.js"></script>'; echo '</head>'; echo '<body>'; Deleted: trunk/javascripts/jquery-1.9.1.min.js =================================================================== --- trunk/javascripts/jquery-1.9.1.min.js 2013-07-05 22:56:00 UTC (rev 6049) +++ trunk/javascripts/jquery-1.9.1.min.js 2013-07-06 02:37:01 UTC (rev 6050) @@ -1,5 +0,0 @@ -/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license -//@ sourceMappingURL=jquery.min.map -*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e... [truncated message content] |
From: <te...@us...> - 2013-07-06 03:57:49
|
Revision: 6051 http://sourceforge.net/p/web-erp/reponame/6051 Author: tehonu Date: 2013-07-06 03:57:44 +0000 (Sat, 06 Jul 2013) Log Message: ----------- Added ShopShowLeftCategoryMenu Parameter for webSHOP Modified Paths: -------------- trunk/ShopParameters.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2013-07-06 02:37:01 UTC (rev 6050) +++ trunk/ShopParameters.php 2013-07-06 03:57:44 UTC (rev 6051) @@ -76,6 +76,10 @@ $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopAdditionalStockLocations']."' WHERE confname = 'ShopAdditionalStockLocations'"; } + if ($_SESSION['ShopShowLeftCategoryMenu'] != $_POST['X_ShopShowLeftCategoryMenu'] ) { + $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowLeftCategoryMenu']."' WHERE confname = 'ShopShowLeftCategoryMenu'"; + } + if ($_SESSION['ShopAllowSurcharges'] != $_POST['X_ShopAllowSurcharges'] ) { $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopAllowSurcharges']."' WHERE confname = 'ShopAllowSurcharges'"; } @@ -292,6 +296,20 @@ </tr>'; echo '<tr> + <td>' . _('Show/Hide Left Column Menu') . ':</td> + <td><select name="X_ShopShowLeftCategoryMenu">'; +if ($_SESSION['ShopShowLeftCategoryMenu'] == '1') { + echo '<option selected="selected" value="1">' . _('Show') . '</option>'; + echo '<option value="0">' . _('Hide') . '</option>'; +} else { + echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; + echo '<option value="1">' . _('Show') . '</option>'; +} +echo '</select></td> + <td>' . _('Shows / Hides the vertical sales categories menu on the left column.') . '</td> + </tr>'; + +echo '<tr> <td>' . _('Additional Stock Locations') . ':</td> <td><input type="text" size="80" maxlength="100" name="X_ShopAdditionalStockLocations" value="' . $_SESSION['ShopAdditionalStockLocations'] . '" /></td> <td>' . _('List of additional stock location codes, sepparated by comma. Web-Stote will consider stock at the default customer location plus these ones. Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-06 02:37:01 UTC (rev 6050) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-06 03:57:44 UTC (rev 6051) @@ -164,6 +164,7 @@ INSERT INTO config VALUES ('ShopShowOnlyAvailableItems','0'); INSERT INTO config VALUES ('ShopShowQOHColumn','1'); INSERT INTO config VALUES ('ShopAdditionalStockLocations',''); +INSERT INTO config VALUES ('ShopShowLeftCategoryMenu','1'); UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |
From: <dai...@us...> - 2013-07-06 05:30:17
|
Revision: 6052 http://sourceforge.net/p/web-erp/reponame/6052 Author: daintree Date: 2013-07-06 05:30:11 +0000 (Sat, 06 Jul 2013) Log Message: ----------- Shop config changes Modified Paths: -------------- trunk/AddCustomerNotes.php trunk/Areas.php trunk/ShopParameters.php trunk/build/make_release.sh trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.mo trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po 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_CA.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/locale/zh_TW.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_TW.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/upgrade4.10-4.11.sql trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2013-07-06 03:57:44 UTC (rev 6051) +++ trunk/AddCustomerNotes.php 2013-07-06 05:30:11 UTC (rev 6052) @@ -230,10 +230,10 @@ echo '<tr> <td>'. _('Priority'). '</td>'; if (isset($_POST['Priority'])) { - echo '<td><input type="number" required min="1" name="Priority" value="' . $_POST['Priority']. '" size="1" maxlength="3" /></td> + echo '<td><input type="number" required min="1" name="Priority" class="number" value="' . $_POST['Priority']. '" size="1" maxlength="3" /></td> </tr>'; } else { - echo '<td><input type="number" required min="1" name="Priority" size="1" maxlength="3" value="1"/></td> + echo '<td><input type=number required min="1" name="Priority" value="1" size="1" maxlength="3"/></td> </tr>'; } echo '<tr> Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2013-07-06 03:57:44 UTC (rev 6051) +++ trunk/Areas.php 2013-07-06 05:30:11 UTC (rev 6052) @@ -215,12 +215,12 @@ echo '<table class="selection"> <tr> <td>' . _('Area Code') . ':</td> - <td><input tabindex="1" ' . (in_array('AreaCode',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="AreaCode" value="' . $_POST['AreaCode'] . '" size="3" maxlength="3" /></td> + <td><input tabindex="1" ' . (in_array('AreaCode',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="AreaCode" required autofocus value="' . $_POST['AreaCode'] . '" size="3" maxlength="3" title="' . _('Enter the sales area code - up to 3 characters are allowed') . '" /></td> </tr>'; } echo '<tr><td>' . _('Area Name') . ':</td> - <td><input tabindex="2" ' . (in_array('AreaDescription',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="AreaDescription" value="' . $_POST['AreaDescription'] .'" size="26" maxlength="25" /></td> + <td><input tabindex="2" ' . (in_array('AreaDescription',$Errors) ? 'class="inputerror"' : '' ) .' type="text" required name="AreaDescription" value="' . $_POST['AreaDescription'] .'" size="26" maxlength="25" title="' . _('Enter the description of the sales area') . '" /></td> </tr>'; echo '<tr> Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2013-07-06 03:57:44 UTC (rev 6051) +++ trunk/ShopParameters.php 2013-07-06 05:30:11 UTC (rev 6052) @@ -10,21 +10,7 @@ echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Shop Configuration') . '" alt="" />' . $Title. '</p>'; -?> -<script> - /* jQuery/javascript code */ - jQuery(document).ready(function() { - jQuery('.noSpecialChars').bind('input', function() { - jQuery(this).val($(this).val().replace(/[^a-z0-9@\._\-]/gi, '')); - }); - jQuery('.number').bind('input', function() { - jQuery(this).val($(this).val().replace(/[^0-9.]/gi, '')); - }); - }); -</script> - -<?php if (isset($_POST['submit'])) { //initialise no input errors assumed initially before we test @@ -72,9 +58,16 @@ $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowQOHColumn']."' WHERE confname = 'ShopShowQOHColumn'"; } - if ($_SESSION['ShopAdditionalStockLocations'] != $_POST['X_ShopAdditionalStockLocations'] ) { - $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopAdditionalStockLocations']."' WHERE confname = 'ShopAdditionalStockLocations'"; - } + if (isset($_POST['X_ShopStockLocations'])) { + $ShopStockLocations = ''; + foreach ($_POST['X_ShopStockLocations'] as $Location){ + $ShopStockLocations .= $Location .','; + } + $ShopStockLocations = mb_substr($ShopStockLocations,0,mb_strlen($ShopStockLocations)-1); + if ($_SESSION['ShopStockLocations'] != $ShopStockLocations){ + $SQL[] = "UPDATE config SET confvalue='" . $ShopStockLocations . "' WHERE confname='ShopStockLocations'"; + } + } if ($_SESSION['ShopShowLeftCategoryMenu'] != $_POST['X_ShopShowLeftCategoryMenu'] ) { $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowLeftCategoryMenu']."' WHERE confname = 'ShopShowLeftCategoryMenu'"; @@ -216,20 +209,20 @@ //Shop Name echo '<tr> <td>' . _('Shop Name') . ':</td> - <td><input type="text" name="X_ShopName" size="40" maxlength="40" value="' . $_SESSION['ShopName'] . '" /></td> + <td><input type="text" name="X_ShopName" required size="40" maxlength="40" value="' . $_SESSION['ShopName'] . '" /></td> <td>' . _('Enter the name of the shop that will be displayed on all the store pages') . '</td> </tr>'; // Shop Customer echo '<tr> <td>' . _('Default Web Shop Customer Acount') . ':</td> - <td><input type="text"size="12" maxlength="10" name="X_ShopDebtorNo" value="' . $_SESSION['ShopDebtorNo'] . '" /></td> + <td><input type="text"size="12" maxlength="10" required name="X_ShopDebtorNo" value="' . $_SESSION['ShopDebtorNo'] . '" /></td> <td>' . _('Select the customer account that is to be used for the web-store sales') . '</td> </tr>'; // Shop Customer Branch echo '<tr> <td>'._('Default Web Shop Branch Code').':</td> - <td><input type="text" size="12" maxlength="10" name="X_ShopBranchCode" value="' . $_SESSION['ShopBranchCode'] . '" /></td> + <td><input type="text" required size="12" maxlength="10" name="X_ShopBranchCode" value="' . $_SESSION['ShopBranchCode'] . '" /></td> <td>' . _('The customer branch code that is to be used - a branch of the above custoemr account - for web-store sales') . '</td> </tr>'; @@ -308,12 +301,25 @@ echo '</select></td> <td>' . _('Shows / Hides the vertical sales categories menu on the left column.') . '</td> </tr>'; - + +if (mb_strlen($_SESSION['ShopStockLocations'])>1){ + $ShopStockLocations = explode(',',$_SESSION['ShopStockLocations']); +} else { + $ShopStockLocations = array(); +} echo '<tr> - <td>' . _('Additional Stock Locations') . ':</td> - <td><input type="text" size="80" maxlength="100" name="X_ShopAdditionalStockLocations" value="' . $_SESSION['ShopAdditionalStockLocations'] . '" /></td> - <td>' . _('List of additional stock location codes, sepparated by comma. Web-Stote will consider stock at the default customer location plus these ones. - Leave empty if only will consider default customer location. Example: LOC01, LOC02, LOC03') . '</td> + <td>' . _('Stock Locations') . ':</td> + <td><select name="X_ShopStockLocations[]" size="5" multiple="multiple" >'; +$LocResult = DB_query("SELECT loccode, locationname FROM locations",$db); +while ($LocRow = DB_fetch_array($LocResult)){ + if (in_array($LocRow['loccode'],$ShopStockLocations)){ + echo '<option selected="selected" value="' . $LocRow['loccode'] . '">' . $LocRow['locationname'] .'</option>'; + } else { + echo '<option value="' . $LocRow['loccode'] . '">' . $LocRow['locationname'] .'</option>'; + } +} +echo '</select></td> + <td>' . _('Select one or more stock locations (warehouses) that webSHOP should consider stock for the purposes of displaying the on hand quantity for customer information') . '</td> </tr>'; echo '<tr> Modified: trunk/build/make_release.sh =================================================================== --- trunk/build/make_release.sh 2013-07-06 03:57:44 UTC (rev 6051) +++ trunk/build/make_release.sh 2013-07-06 05:30:11 UTC (rev 6052) @@ -7,7 +7,7 @@ cd $BASE_DIR; -xgettext --no-wrap --from-code=utf-8 --language=PHP -o locale/en_GB.utf8/LC_MESSAGES/messages.pot *php includes/*.php includes/*.inc reportwriter/*.php reportwriter/*.inc reportwriter/forms/*.html reportwriter/admin/*.php reportwriter/admin/*.inc reportwriter/admin/forms/*.html api/*.php +xgettext --no-wrap --from-code=utf-8 --language=PHP -o locale/en_GB.utf8/LC_MESSAGES/messages.pot *php includes/*.php includes/*.inc reportwriter/*.php reportwriter/*.inc reportwriter/forms/*.html reportwriter/admin/*.php reportwriter/admin/*.inc reportwriter/admin/forms/*.html api/*.php ../webshop/*.php ../webshop/includes/*.php msgmerge -U --backup=off locale/ar_EG.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot msgmerge -U --backup=off locale/cs_CZ.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot @@ -133,4 +133,4 @@ cd .. -zip -r $OUTPUT_DIR/webERP webERP -x \*.svn* \*/config.php +zip -r $OUTPUT_DIR/webERP webERP -x \*.svn* \*/config.php \*build* Modified: trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po 2013-07-06 03:57:44 UTC (rev 6051) +++ trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po 2013-07-06 05:30:11 UTC (rev 6052) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: web-erp\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-06-09 22:30+1200\n" +"POT-Creation-Date: 2013-07-06 15:49+1200\n" "PO-Revision-Date: 2013-06-01 11:19-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: Arabic <ar...@li...>\n" @@ -19,104 +19,86 @@ "X-Generator: Poedit 1.5.4\n" #: AccountGroups.php:7 includes/MainMenuLinksArray.php:362 +#: includes/MainMenuLinksArray (puppypc32158's conflicted copy +#: 2013-06-24).php:362 msgid "Account Groups" msgstr "مجموعات العضوية" -#: AccountGroups.php:35 -#, fuzzy -msgid "The new account group name must be entered" -msgstr "اسم المجموعة يجب ان يحتوي علي الأقل علي حرف واحد" - -#: AccountGroups.php:36 -#, fuzzy -msgid "The account group is expected to be 3 characters or more long" -msgstr "اسم المجموعة يجب ان يحتوي علي الأقل علي حرف واحد" - -#: AccountGroups.php:39 +#: AccountGroups.php:20 msgid "" -"The sequence in the trial balance that the accounts under this account group " -"should display must be entered" -msgstr "" - -#: AccountGroups.php:40 -msgid "The sequence number can only contain digits" -msgstr "" - -#: AccountGroups.php:60 -msgid "" "An error occurred in retrieving the account groups of the parent account " "group during the check for recursion" msgstr "" "لقد حدث خطأ فى استرجاع بيانات مجموعات العضو الخاصة باعضوية الأب اثناء " "االتحقق من وجود استدعاء ذاتي" -#: AccountGroups.php:61 +#: AccountGroups.php:21 msgid "" "The SQL that was used to retrieve the account groups of the parent account " "group and that failed in the process was" msgstr "" -#: AccountGroups.php:90 +#: AccountGroups.php:50 #, fuzzy msgid "An error occurred in moving the account group" msgstr "حدث خطأ اثناء تحديث مجموعة العضو" -#: AccountGroups.php:91 +#: AccountGroups.php:51 #, fuzzy msgid "The SQL that was used to move the account group was" msgstr "الطلب المستخدم لإضافة مجموعة الحسابات هي" -#: AccountGroups.php:93 AccountGroups.php:374 +#: AccountGroups.php:53 AccountGroups.php:334 msgid "Review Account Groups" msgstr "" -#: AccountGroups.php:94 +#: AccountGroups.php:54 #, fuzzy msgid "All accounts in the account group:" msgstr "حدث خطأ اثناء تحديث مجموعة العضو" -#: AccountGroups.php:94 +#: AccountGroups.php:54 #, fuzzy msgid "have been changed to the account group:" msgstr "الطلب المستخدم لإضافة مجموعة الحسابات هي" -#: AccountGroups.php:113 AccountGroups.php:150 AccountGroups.php:251 -#: AccountGroups.php:286 +#: AccountGroups.php:73 AccountGroups.php:110 AccountGroups.php:211 +#: AccountGroups.php:246 msgid "The SQL that was used to retrieve the information was" msgstr "الطلب المستخدم لإسترجاع المعلومات كان" -#: AccountGroups.php:114 +#: AccountGroups.php:74 msgid "Could not check whether the group exists because" msgstr "لم يتم التحقق من وجود المجموعة بسبب" -#: AccountGroups.php:121 +#: AccountGroups.php:81 msgid "The account group name already exists in the database" msgstr "اسم المجموعة موجود مسبقاً" -#: AccountGroups.php:127 +#: AccountGroups.php:87 msgid "The account group name cannot contain the character" msgstr "لا يمكن وضع هذا الحرف في اسم المجموعة" -#: AccountGroups.php:127 Departments.php:30 TaxCategories.php:31 +#: AccountGroups.php:87 Departments.php:30 TaxCategories.php:31 msgid "or the character" msgstr "او الحرف" -#: AccountGroups.php:133 +#: AccountGroups.php:93 msgid "The account group name must be at least one character long" msgstr "اسم المجموعة يجب ان يحتوي علي الأقل علي حرف واحد" -#: AccountGroups.php:140 +#: AccountGroups.php:100 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 " "top level account group" msgstr "" -#: AccountGroups.php:151 +#: AccountGroups.php:111 msgid "Could not check whether the group is recursive because" msgstr "لم أستطيع التخقق اذا كانت المجموعة ذاتيى الأسترجاع لأن" -#: AccountGroups.php:159 +#: AccountGroups.php:119 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 " @@ -125,67 +107,67 @@ "will have no effect." msgstr "" -#: AccountGroups.php:164 +#: AccountGroups.php:124 msgid "The section in accounts must be an integer" msgstr "يجب ان يكون القسم فى الحساب عدد صحيح" -#: AccountGroups.php:170 +#: AccountGroups.php:130 msgid "The sequence in the trial balance must be an integer" msgstr "التسلسل فى الحساب التجريبى يجب ان يكون عدد صحيح" -#: AccountGroups.php:176 +#: AccountGroups.php:136 msgid "The sequence in the TB must be numeric and less than" msgstr "" -#: AccountGroups.php:192 +#: AccountGroups.php:152 #, fuzzy msgid "An error occurred in renaming the account group" msgstr "حدث خطأ اثناء تحديث مجموعة العضو" -#: AccountGroups.php:193 +#: AccountGroups.php:153 #, fuzzy msgid "The SQL that was used to rename the account group was" msgstr "الطلب المستخدم لإضافة مجموعة الحسابات هي" -#: AccountGroups.php:212 +#: AccountGroups.php:172 msgid "An error occurred in updating the account group" msgstr "حدث خطأ اثناء تحديث مجموعة العضو" -#: AccountGroups.php:213 +#: AccountGroups.php:173 msgid "The SQL that was used to update the account group was" msgstr "" -#: AccountGroups.php:215 AccountSections.php:101 PaymentMethods.php:83 +#: AccountGroups.php:175 AccountSections.php:101 PaymentMethods.php:83 msgid "Record Updated" msgstr "تم التحديث" -#: AccountGroups.php:231 +#: AccountGroups.php:191 msgid "An error occurred in inserting the account group" msgstr "حدث خطأ ما اثناء اضافة المجموعة" -#: AccountGroups.php:232 +#: AccountGroups.php:192 msgid "The SQL that was used to insert the account group was" msgstr "الطلب المستخدم لإضافة مجموعة الحسابات هي" -#: AccountGroups.php:233 AccountSections.php:111 +#: AccountGroups.php:193 AccountSections.php:111 msgid "Record inserted" msgstr "تمت الإضافة بنجاح" -#: AccountGroups.php:250 +#: AccountGroups.php:210 msgid "An error occurred in retrieving the group information from chartmaster" msgstr "" -#: AccountGroups.php:255 +#: AccountGroups.php:215 msgid "" "Cannot delete this account group because general ledger accounts have been " "created using this group" msgstr "" -#: AccountGroups.php:256 AccountGroups.php:291 AccountSections.php:133 +#: AccountGroups.php:216 AccountGroups.php:251 AccountSections.php:133 #: Areas.php:115 Areas.php:124 BankAccounts.php:159 CreditStatus.php:125 #: Currencies.php:246 Currencies.php:254 Currencies.php:262 -#: CustomerBranches.php:289 CustomerBranches.php:299 CustomerBranches.php:309 -#: CustomerBranches.php:319 Customers.php:295 Customers.php:304 +#: CustomerBranches.php:293 CustomerBranches.php:303 CustomerBranches.php:313 +#: CustomerBranches.php:323 Customers.php:295 Customers.php:304 #: Customers.php:312 Customers.php:320 CustomerTypes.php:147 #: CustomerTypes.php:157 Departments.php:141 Factors.php:134 #: FixedAssetCategories.php:137 GLAccounts.php:80 GLAccounts.php:96 @@ -205,53 +187,53 @@ msgid "There are" msgstr "يوجد" -#: AccountGroups.php:256 +#: AccountGroups.php:216 msgid "general ledger accounts that refer to this account group" msgstr "" -#: AccountGroups.php:263 AccountGroups.php:334 AccountGroups.php:447 +#: AccountGroups.php:223 AccountGroups.php:294 AccountGroups.php:407 msgid "Parent Group" msgstr "" -#: AccountGroups.php:279 +#: AccountGroups.php:239 msgid "Move Group" msgstr "" -#: AccountGroups.php:285 +#: AccountGroups.php:245 msgid "An error occurred in retrieving the parent group information" msgstr "" -#: AccountGroups.php:290 +#: AccountGroups.php:250 msgid "" "Cannot delete this account group because it is a parent account group of " "other account group(s)" msgstr "" -#: AccountGroups.php:291 +#: AccountGroups.php:251 msgid "account groups that have this group as its/there parent account group" msgstr "" -#: AccountGroups.php:295 +#: AccountGroups.php:255 msgid "An error occurred in deleting the account group" msgstr "حدث خطأ ما اثناء حذف مجموعة الحسابات" -#: AccountGroups.php:296 +#: AccountGroups.php:256 msgid "The SQL that was used to delete the account group was" msgstr "" -#: AccountGroups.php:298 +#: AccountGroups.php:258 msgid "group has been deleted" msgstr "تم حذف المجموعة" -#: AccountGroups.php:323 +#: AccountGroups.php:283 msgid "The sql that was used to retrieve the account group information was " msgstr "" -#: AccountGroups.php:324 +#: AccountGroups.php:284 msgid "Could not get account groups because" msgstr "لم يتمكن الحصول على مجموات العضو لان" -#: AccountGroups.php:326 AccountSections.php:172 AddCustomerContacts.php:25 +#: AccountGroups.php:286 AccountSections.php:172 AddCustomerContacts.php:25 #: AddCustomerContacts.php:27 AddCustomerNotes.php:101 #: AddCustomerTypeNotes.php:94 AgedDebtors.php:448 AgedSuppliers.php:276 #: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:17 @@ -279,10 +261,10 @@ #: SalesCategories.php:11 SalesGLPostings.php:19 SalesGraph.php:39 #: SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:48 #: SelectCompletedOrder.php:11 SelectContract.php:69 SelectCreditItems.php:220 -#: SelectCreditItems.php:291 SelectCustomer.php:265 SelectGLAccount.php:17 -#: SelectGLAccount.php:87 SelectOrderItems.php:609 SelectOrderItems.php:1528 -#: SelectOrderItems.php:1662 SelectProduct.php:541 SelectSalesOrder.php:563 -#: SelectSupplier.php:14 SelectSupplier.php:213 SelectWorkOrder.php:9 +#: SelectCreditItems.php:291 SelectCustomer.php:265 SelectGLAccount.php:70 +#: SelectOrderItems.php:609 SelectOrderItems.php:1530 +#: SelectOrderItems.php:1664 SelectProduct.php:523 SelectSalesOrder.php:563 +#: SelectSupplier.php:14 SelectSupplier.php:217 SelectWorkOrder.php:9 #: SelectWorkOrder.php:169 SellThroughSupport.php:229 ShipmentCosting.php:11 #: Shipments.php:17 Shippers.php:123 Shippers.php:160 Shipt_Select.php:8 #: StockLocMovements.php:14 StockLocStatus.php:28 @@ -296,38 +278,39 @@ #: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:162 #: WorkOrderCosting.php:22 WorkOrderEntry.php:11 WorkOrderIssue.php:22 #: WorkOrderReceive.php:31 WorkOrderStatus.php:58 WWW_Access.php:11 -#: WWW_Users.php:36 Z_BottomUpCosts.php:57 +#: WWW_Users.php:36 Z_BottomUpCosts.php:57 ../webshop/includes/header.php:171 msgid "Search" msgstr "إبحث" -#: AccountGroups.php:330 +#: AccountGroups.php:290 msgid "Group Name" msgstr "إسم المجموعة" -#: AccountGroups.php:331 EDIMessageFormat.php:129 EDIMessageFormat.php:208 +#: AccountGroups.php:291 EDIMessageFormat.php:129 EDIMessageFormat.php:208 msgid "Section" msgstr "قسم" -#: AccountGroups.php:332 AccountGroups.php:501 +#: AccountGroups.php:292 AccountGroups.php:461 msgid "Sequence In TB" msgstr "" -#: AccountGroups.php:333 AccountGroups.php:484 GLProfit_Loss.php:6 +#: AccountGroups.php:293 AccountGroups.php:444 GLProfit_Loss.php:6 #: GLProfit_Loss.php:129 GLProfit_Loss.php:130 GLProfit_Loss.php:181 -#: SelectGLAccount.php:40 SelectGLAccount.php:54 SelectGLAccount.php:68 +#: SelectGLAccount.php:23 SelectGLAccount.php:37 SelectGLAccount.php:51 msgid "Profit and Loss" msgstr "" -#: AccountGroups.php:350 AccountGroups.php:353 AccountGroups.php:488 -#: AccountGroups.php:490 BOMs.php:124 BOMs.php:774 BOMs.php:776 +#: AccountGroups.php:310 AccountGroups.php:313 AccountGroups.php:448 +#: AccountGroups.php:450 BOMs.php:124 BOMs.php:774 BOMs.php:776 #: CompanyPreferences.php:479 CompanyPreferences.php:481 #: CompanyPreferences.php:494 CompanyPreferences.php:496 #: CompanyPreferences.php:509 CompanyPreferences.php:511 -#: ContractCosting.php:198 Currencies.php:332 Currencies.php:498 -#: Currencies.php:500 CustomerBranches.php:412 Customers.php:623 -#: Customers.php:1010 Customers.php:1016 Customers.php:1019 +#: ContractCosting.php:202 Currencies.php:332 Currencies.php:498 +#: Currencies.php:500 CustomerBranches.php:416 Customers.php:617 +#: Customers.php:1004 Customers.php:1010 Customers.php:1013 #: DailyBankTransactions.php:145 DeliveryDetails.php:1125 #: DeliveryDetails.php:1168 DeliveryDetails.php:1171 GLTransInquiry.php:69 +#: GLTransInquiry (puppypc32158's conflicted copy 2013-06-24).php:69 #: Labels.php:591 Labels.php:593 Labels.php:618 Locations.php:617 #: Locations.php:619 MRPCalendar.php:224 MRP.php:540 MRP.php:544 MRP.php:548 #: MRP.php:552 PaymentMethods.php:204 PaymentMethods.php:205 @@ -336,17 +319,18 @@ #: PcAuthorizeExpenses.php:246 PDFChequeListing.php:65 #: PDFDeliveryDifferences.php:76 PDFDIFOT.php:76 #: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 -#: PO_Header.php:782 PO_PDFPurchOrder.php:404 PO_PDFPurchOrder.php:407 +#: PO_Header.php:782 PO_PDFPurchOrder.php:408 PO_PDFPurchOrder.php:411 #: PurchData.php:291 PurchData.php:662 PurchData.php:665 #: RecurringSalesOrders.php:493 RecurringSalesOrders.php:496 #: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419 #: SalesAnalReptCols.php:422 SalesAnalRepts.php:420 SalesAnalRepts.php:423 #: SalesAnalRepts.php:448 SalesAnalRepts.php:451 SalesAnalRepts.php:476 #: SalesAnalRepts.php:479 SalesPeople.php:219 SalesPeople.php:356 -#: SalesPeople.php:358 SelectProduct.php:397 ShipmentCosting.php:667 -#: ShopParameters.php:217 ShopParameters.php:221 ShopParameters.php:231 -#: ShopParameters.php:235 ShopParameters.php:250 ShopParameters.php:254 -#: ShopParameters.php:285 ShopParameters.php:289 Stocks.php:1160 +#: SalesPeople.php:358 SelectProduct.php:236 SelectProduct.php:379 +#: ShipmentCosting.php:667 ShopParameters.php:270 ShopParameters.php:274 +#: ShopParameters.php:305 ShopParameters.php:309 ShopParameters.php:339 +#: ShopParameters.php:343 ShopParameters.php:361 ShopParameters.php:365 +#: ShopParameters.php:422 ShopParameters.php:426 Stocks.php:1160 #: Stocks.php:1162 Stocks.php:1185 Stocks.php:1187 SuppContractChgs.php:90 #: SystemParameters.php:426 SystemParameters.php:449 SystemParameters.php:486 #: SystemParameters.php:558 SystemParameters.php:566 SystemParameters.php:606 @@ -362,17 +346,18 @@ msgid "Yes" msgstr "موافق" -#: AccountGroups.php:356 AccountGroups.php:493 AccountGroups.php:495 +#: AccountGroups.php:316 AccountGroups.php:453 AccountGroups.php:455 #: BankAccounts.php:210 BankAccounts.php:379 BankAccounts.php:381 #: BankAccounts.php:385 BankAccounts.php:393 BOMs.php:126 BOMs.php:773 #: BOMs.php:777 CompanyPreferences.php:478 CompanyPreferences.php:482 #: CompanyPreferences.php:493 CompanyPreferences.php:497 #: CompanyPreferences.php:508 CompanyPreferences.php:512 -#: ContractCosting.php:196 Currencies.php:334 Currencies.php:503 -#: Currencies.php:505 CustomerBranches.php:412 Customers.php:622 -#: Customers.php:1008 Customers.php:1015 Customers.php:1018 +#: ContractCosting.php:200 Currencies.php:334 Currencies.php:503 +#: Currencies.php:505 CustomerBranches.php:416 Customers.php:616 +#: Customers.php:1002 Customers.php:1009 Customers.php:1012 #: DailyBankTransactions.php:147 DeliveryDetails.php:1126 -#: DeliveryDetails.php:1169 DeliveryDetails.php:1172 GLTransInquiry.php:90 +#: DeliveryDetails.php:1169 DeliveryDetails.php:1172 GLTransInquiry.php:88 +#: GLTransInquiry (puppypc32158's conflicted copy 2013-06-24).php:88 #: Labels.php:590 Labels.php:594 Labels.php:619 Locations.php:622 #: Locations.php:624 MRPCalendar.php:226 MRP.php:538 MRP.php:542 MRP.php:546 #: MRP.php:550 NoSalesItems.php:184 PaymentMethods.php:204 @@ -381,17 +366,18 @@ #: PaymentMethods.php:295 PcAuthorizeExpenses.php:244 PDFChequeListing.php:64 #: PDFDeliveryDifferences.php:75 PDFDIFOT.php:75 #: PO_AuthorisationLevels.php:136 PO_AuthorisationLevels.php:141 -#: PO_Header.php:781 PO_PDFPurchOrder.php:405 PO_PDFPurchOrder.php:408 +#: PO_Header.php:781 PO_PDFPurchOrder.php:409 PO_PDFPurchOrder.php:412 #: PurchData.php:294 PurchData.php:663 PurchData.php:666 #: RecurringSalesOrders.php:492 RecurringSalesOrders.php:495 #: SalesAnalReptCols.php:282 SalesAnalReptCols.php:420 #: SalesAnalReptCols.php:423 SalesAnalRepts.php:419 SalesAnalRepts.php:422 #: SalesAnalRepts.php:447 SalesAnalRepts.php:450 SalesAnalRepts.php:475 #: SalesAnalRepts.php:478 SalesPeople.php:221 SalesPeople.php:361 -#: SalesPeople.php:363 SelectProduct.php:399 ShipmentCosting.php:668 -#: ShopParameters.php:218 ShopParameters.php:220 ShopParameters.php:232 -#: ShopParameters.php:234 ShopParameters.php:251 ShopParameters.php:253 -#: ShopParameters.php:286 ShopParameters.php:288 Stocks.php:1155 +#: SalesPeople.php:363 SelectProduct.php:238 SelectProduct.php:381 +#: ShipmentCosting.php:668 ShopParameters.php:271 ShopParameters.php:273 +#: ShopParameters.php:306 ShopParameters.php:308 ShopParameters.php:340 +#: ShopParameters.php:342 ShopParameters.php:362 ShopParameters.php:364 +#: ShopParameters.php:423 ShopParameters.php:425 Stocks.php:1155 #: Stocks.php:1157 Stocks.php:1180 Stocks.php:1182 SuppContractChgs.php:92 #: SystemParameters.php:427 SystemParameters.php:450 SystemParameters.php:487 #: SystemParameters.php:559 SystemParameters.php:567 SystemParameters.php:607 @@ -408,11 +394,11 @@ msgid "No" msgstr "ﻻ" -#: AccountGroups.php:365 AccountSections.php:192 AddCustomerContacts.php:148 +#: AccountGroups.php:325 AccountSections.php:192 AddCustomerContacts.php:148 #: AddCustomerNotes.php:137 AddCustomerTypeNotes.php:131 Areas.php:164 #: BankAccounts.php:223 BOMs.php:151 COGSGLPostings.php:112 #: COGSGLPostings.php:216 CreditStatus.php:175 Currencies.php:364 -#: CustomerBranches.php:416 Customers.php:1093 Customers.php:1127 +#: CustomerBranches.php:420 Customers.php:1087 Customers.php:1121 #: CustomerTypes.php:206 Departments.php:186 EDIMessageFormat.php:150 #: Factors.php:334 FixedAssetCategories.php:190 FixedAssetLocations.php:111 #: FreightCosts.php:242 GeocodeSetup.php:173 GLAccounts.php:316 GLTags.php:96 @@ -427,8 +413,9 @@ #: SalesGLPostings.php:137 SalesGLPostings.php:253 SalesPeople.php:232 #: SalesTypes.php:206 SecurityTokens.php:130 SelectCustomer.php:621 #: SelectCustomer.php:640 SelectCustomer.php:670 SelectCustomer.php:688 -#: SelectCustomer.php:712 SelectCustomer.php:729 SellThroughSupport.php:298 -#: Shippers.php:144 StockCategories.php:264 SupplierContacts.php:165 +#: SelectCustomer.php:712 SelectCustomer.php:729 SelectGLAccount.php:106 +#: SelectGLAccount.php:121 SellThroughSupport.php:298 Shippers.php:144 +#: StockCategories.php:264 SupplierContacts.php:165 #: SupplierTenderCreate.php:155 SupplierTypes.php:189 #: SuppTransGLAnalysis.php:125 TaxAuthorities.php:174 TaxCategories.php:182 #: TaxGroups.php:188 TaxProvinces.php:180 UnitsOfMeasure.php:185 @@ -438,18 +425,18 @@ msgid "Edit" msgstr "تحرير" -#: AccountGroups.php:366 +#: AccountGroups.php:326 #, fuzzy msgid "Are you sure you wish to delete this account group?" msgstr "حدث خطأ ما اثناء حذف مجموعة الحسابات" -#: AccountGroups.php:366 AccountSections.php:196 AddCustomerContacts.php:149 +#: AccountGroups.php:326 AccountSections.php:196 AddCustomerContacts.php:149 #: AddCustomerNotes.php:138 AddCustomerTypeNotes.php:132 Areas.php:165 #: BankAccounts.php:224 BOMs.php:153 COGSGLPostings.php:113 #: COGSGLPostings.php:217 ContractBOM.php:272 ContractOtherReqts.php:124 #: CounterReturns.php:740 CounterSales.php:832 Credit_Invoice.php:400 -#: CreditStatus.php:176 Currencies.php:367 CustomerReceipt.php:938 -#: Customers.php:1128 CustomerTypes.php:207 Departments.php:187 +#: CreditStatus.php:176 Currencies.php:367 CustomerReceipt.php:941 +#: Customers.php:1122 CustomerTypes.php:207 Departments.php:187 #: DiscountCategories.php:225 DiscountMatrix.php:183 EDIMessageFormat.php:151 #: FixedAssetCategories.php:191 FreightCosts.php:243 GeocodeSetup.php:174 #: GLAccounts.php:317 GLJournal.php:429 GLTags.php:97 @@ -460,7 +447,7 @@ #: PaymentMethods.php:209 Payments.php:1095 PaymentTerms.php:206 #: PcAssignCashToTab.php:280 PcClaimExpensesFromTab.php:269 PcExpenses.php:227 #: PcExpensesTypeTab.php:187 PcTabs.php:237 PcTypeTabs.php:178 -#: PO_AuthorisationLevels.php:153 PO_Items.php:764 Prices_Customer.php:279 +#: PO_AuthorisationLevels.php:153 PO_Items.php:770 Prices_Customer.php:279 #: Prices.php:250 PurchData.php:309 PurchData.php:716 #: SalesAnalReptCols.php:299 SalesAnalRepts.php:307 SalesCategories.php:260 #: SalesCategoryDescriptions.php:114 SalesGLPostings.php:138 @@ -482,63 +469,68 @@ msgid "Delete" msgstr "حذف" -#: AccountGroups.php:394 +#: AccountGroups.php:354 msgid "An error occurred in retrieving the account group information" msgstr "" -#: AccountGroups.php:395 +#: AccountGroups.php:355 msgid "" "The SQL that was used to retrieve the account group and that failed in the " "process was" msgstr "" -#: AccountGroups.php:398 +#: AccountGroups.php:358 msgid "The account group name does not exist in the database" msgstr "" -#: AccountGroups.php:412 +#: AccountGroups.php:372 #, fuzzy msgid "Edit Account Group Details" msgstr "مجموعات العضوية" -#: AccountGroups.php:436 +#: AccountGroups.php:396 #, fuzzy msgid "New Account Group Details" msgstr "مجموعات العضوية" -#: AccountGroups.php:443 +#: AccountGroups.php:403 msgid "Account Group Name" msgstr "" -#: AccountGroups.php:444 +#: AccountGroups.php:404 #, fuzzy +msgid "Enter the account group name" +msgstr "لم يتمكن الحصول على مجموات العضو لان" + +#: AccountGroups.php:404 +#, fuzzy msgid "" "A unique name for the account group must be entered - at least 3 characters " "long and less than 30 characters long" msgstr "اسم المجموعة يجب ان يحتوي علي الأقل علي حرف واحد" -#: AccountGroups.php:453 AccountGroups.php:455 +#: AccountGroups.php:413 AccountGroups.php:415 msgid "Top Level Group" msgstr "" -#: AccountGroups.php:469 +#: AccountGroups.php:429 msgid "Section In Accounts" msgstr "" -#: AccountGroups.php:485 +#: AccountGroups.php:445 msgid "" "Select YES if this account group will contain accounts that will consist of " "only profit and loss accounts or NO if the group will contain balance sheet " "account" msgstr "" -#: AccountGroups.php:502 +#: AccountGroups.php:462 msgid "" "Enter the sequence number that this account group and its child general " "ledger accounts should display in the trial balance" msgstr "" -#: AccountGroups.php:505 AccountSections.php:262 AddCustomerContacts.php:260 +#: AccountGroups.php:465 AccountSections.php:262 AddCustomerContacts.php:260 #: AddCustomerNotes.php:242 AddCustomerTypeNotes.php:221 Areas.php:229 #: BankAccounts.php:399 BOMs.php:787 COGSGLPostings.php:365 #: CreditStatus.php:259 Currencies.php:513 CustLoginSetup.php:273 @@ -558,6 +550,8 @@ msgstr "أدخل المعلومات" #: AccountSections.php:7 includes/MainMenuLinksArray.php:363 +#: includes/MainMenuLinksArray (puppypc32158's conflicted copy +#: 2013-06-24).php:363 msgid "Account Sections" msgstr "أعدادات العضو" @@ -673,7 +667,7 @@ msgstr "" #: AddCustomerContacts.php:126 CompanyPreferences.php:226 -#: CustomerBranches.php:369 Customers.php:1080 Customers.php:1088 +#: CustomerBranches.php:373 Customers.php:1074 Customers.php:1082 #: ImportBankTransAnalysis.php:207 SalesPeople.php:200 SelectCustomer.php:616 #: StockDispatch.php:275 StockDispatch.php:286 StockDispatch.php:297 #: SupplierContacts.php:152 SuppTransGLAnalysis.php:108 @@ -682,8 +676,8 @@ msgid "Name" msgstr "" -#: AddCustomerContacts.php:127 AddCustomerContacts.php:223 Customers.php:1081 -#: Customers.php:1089 SelectCustomer.php:617 WWW_Access.php:110 +#: AddCustomerContacts.php:127 AddCustomerContacts.php:223 Customers.php:1075 +#: Customers.php:1083 SelectCustomer.php:617 WWW_Access.php:110 #: WWW_Access.php:173 msgid "Role" msgstr "" @@ -693,28 +687,30 @@ msgstr "" #: AddCustomerContacts.php:129 AddCustomerContacts.php:241 -#: CustomerBranches.php:375 CustomerBranches.php:795 CustomerInquiry.php:261 -#: Customers.php:1083 Customers.php:1091 EmailCustTrans.php:15 +#: CustomerBranches.php:379 CustomerBranches.php:801 CustomerInquiry.php:261 +#: Customers.php:1077 Customers.php:1085 EmailCustTrans.php:15 #: EmailCustTrans.php:64 Factors.php:246 Factors.php:297 Locations.php:587 -#: OrderDetails.php:115 PDFRemittanceAdvice.php:251 PO_PDFPurchOrder.php:391 -#: PO_PDFPurchOrder.php:394 PrintCustTrans.php:746 PrintCustTrans.php:977 +#: OrderDetails.php:115 PDFRemittanceAdvice.php:251 PO_PDFPurchOrder.php:395 +#: PO_PDFPurchOrder.php:398 PrintCustTrans.php:746 PrintCustTrans.php:977 #: PrintCustTrans.php:1026 PrintCustTransPortrait.php:789 #: PrintCustTransPortrait.php:1035 PrintCustTransPortrait.php:1091 -#: SelectCustomer.php:427 SelectCustomer.php:619 SelectSupplier.php:281 +#: SelectCustomer.php:427 SelectCustomer.php:619 SelectSupplier.php:285 #: SupplierContacts.php:156 SupplierContacts.php:277 UserSettings.php:185 #: WWW_Users.php:283 includes/PDFPickingListHeader.inc:25 #: includes/PDFStatementPageHeader.inc:67 includes/PDFTransPageHeader.inc:82 #: includes/PDFTransPageHeaderPortrait.inc:109 #: includes/PO_PDFOrderPageHeader.inc:29 includes/PO_PDFOrderPageHeader -#: (puppypc32158's conflicted copy 2013-05-23).inc:29 +#: (puppypc32158's conflicted copy 2013-05-23).inc:29 2013-06-24).inc:29 +#: ../webshop/Checkout.php:231 ../webshop/Register.php:404 +#: ../webshop/includes/Register.php:404 msgid "Email" msgstr "" -#: AddCustomerContacts.php:130 AddCustomerContacts.php:250 Customers.php:1084 -#: Customers.php:1092 PcAssignCashToTab.php:241 PcAssignCashToTab.php:372 +#: AddCustomerContacts.php:130 AddCustomerContacts.php:250 Customers.php:1078 +#: Customers.php:1086 PcAssignCashToTab.php:241 PcAssignCashToTab.php:372 #: PcAuthorizeExpenses.php:95 PcClaimExpensesFromTab.php:230 #: PcClaimExpensesFromTab.php:389 PcReportTab.php:327 SelectCustomer.php:620 -#: ShopParameters.php:157 SystemParameters.php:363 WOSerialNos.php:294 +#: ShopParameters.php:193 SystemParameters.php:363 WOSerialNos.php:294 #: WOSerialNos.php:300 msgid "Notes" msgstr "" @@ -733,15 +729,18 @@ msgstr "" #: AddCustomerContacts.php:214 Factors.php:234 SupplierContacts.php:239 +#: ../webshop/Checkout.php:313 ../webshop/Register.php:421 +#: ../webshop/includes/Register.php:421 msgid "Contact Name" msgstr "" #: AddCustomerContacts.php:232 Contracts.php:778 PDFRemittanceAdvice.php:247 -#: PO_Header.php:997 PO_Header.php:1077 SelectCreditItems.php:245 +#: PO_Header.php:997 PO_Header.php:1081 SelectCreditItems.php:245 #: SelectCustomer.php:425 SelectOrderItems.php:646 #: SupplierTenderCreate.php:390 includes/PDFStatementPageHeader.inc:63 #: includes/PDFTransPageHeader.inc:81 -#: includes/PDFTransPageHeaderPortrait.inc:105 +#: includes/PDFTransPageHeaderPortrait.inc:105 ../webshop/Checkout.php:319 +#: ../webshop/Register.php:487 ../webshop/includes/Register.php:487 msgid "Phone" msgstr "" @@ -781,10 +780,11 @@ #: AddCustomerNotes.php:117 AddCustomerNotes.php:222 #: AddCustomerTypeNotes.php:111 AddCustomerTypeNotes.php:211 #: BankMatching.php:278 BankReconciliation.php:212 BankReconciliation.php:289 -#: ContractCosting.php:173 CustomerAllocations.php:334 +#: ContractCosting.php:177 CustomerAllocations.php:334 #: CustomerAllocations.php:368 CustomerInquiry.php:204 -#: CustomerTransInquiry.php:106 GLAccountInquiry.php:181 -#: GLAccountReport.php:343 GLTransInquiry.php:42 MRPCalendar.php:219 +#: CustomerTransInquiry.php:106 GLAccountInquiry.php:191 +#: GLAccountReport.php:343 GLTransInquiry.php:42 GLTransInquiry +#: (puppypc32158's conflicted copy 2013-06-24).php:42 MRPCalendar.php:219 #: PaymentAllocations.php:66 PcAssignCashToTab.php:237 #: PcAuthorizeExpenses.php:91 PDFRemittanceAdvice.php:308 #: PrintCustTrans.php:854 PrintCustTransPortrait.php:903 ReverseGRN.php:392 @@ -794,7 +794,7 @@ #: StockMovements.php:98 StockSerialItemResearch.php:81 #: SupplierAllocations.php:456 SupplierAllocations.php:569 #: SupplierAllocations.php:644 SupplierInquiry.php:211 -#: SupplierTransInquiry.php:105 includes/PDFQuotationPageHeader.inc:93 +#: SupplierTransInquiry.php:105 includes/PDFQuotationPageHeader.inc:94 #: includes/PDFQuotationPortraitPageHeader.inc:91 #: includes/PDFStatementPageHeader.inc:169 includes/PDFTaxPageHeader.inc:36 #: includes/PDFTransPageHeader.inc:48 @@ -804,9 +804,9 @@ #: AddCustomerNotes.php:118 AddCustomerTypeNotes.php:112 PcReportTab.php:172 #: SelectCustomer.php:667 SelectCustomer.php:709 Stocks.php:1164 -#: UpgradeDatabase.php:227 UpgradeDatabase.php:230 UpgradeDatabase.php:233 -#: UpgradeDatabase.php:236 UpgradeDatabase.php:239 UpgradeDatabase.php:242 -#: UpgradeDatabase.php:245 UpgradeDatabase.php:248 UpgradeDatabase.php:251 +#: UpgradeDatabase.php:229 UpgradeDatabase.php:232 UpgradeDatabase.php:235 +#: UpgradeDatabase.php:238 UpgradeDatabase.php:241 UpgradeDatabase.php:244 +#: UpgradeDatabase.php:247 UpgradeDatabase.php:250 UpgradeDatabase.php:253 #: 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 @@ -908,14 +908,14 @@ #: BOMIndentedReverse.php:140 BOMListing.php:41 BOMListing.php:52 #: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:105 #: GLBalanceSheet.php:144 GLProfit_Loss.php:181 GLTagProfit_Loss.php:194 -#: GLTrialBalance.php:160 InternalStockRequest.php:317 +#: GLTrialBalance.php:163 InternalStockRequest.php:317 #: InventoryPlanning.php:101 InventoryPlanning.php:176 #: InventoryPlanning.php:211 InventoryPlanning.php:259 #: InventoryPlanning.php:299 InventoryPlanningPrefSupplier.php:201 #: InventoryPlanningPrefSupplier.php:269 InventoryPlanningPrefSupplier.php:303 #: InventoryPlanningPrefSupplier.php:348 InventoryPlanningPrefSupplier.php:396 #: InventoryQuantities.php:84 InventoryValuation.php:78 -#: MailInventoryValuation.php:21 MailInventoryValuation.php:120 +#: MailInventoryValuation.php:21 MailInventoryValuation.php:119 #: MailSalesReport_csv.php:30 MailSalesReport.php:23 #: MRPPlannedPurchaseOrders.php:114 MRPPlannedWorkOrders.php:106 #: MRPReport.php:147 MRPReport.php:508 MRPReschedules.php:45 @@ -944,7 +944,7 @@ #: FTP_RadioBeacon.php:187 GetStockImage.php:150 GLBalanceSheet.php:109 #: GLBalanceSheet.php:147 GLBalanceSheet.php:324 GLProfit_Loss.php:184 #: GLProfit_Loss.php:196 GLTagProfit_Loss.php:198 GLTagProfit_Loss.php:211 -#: GLTrialBalance.php:163 GLTrialBalance.php:175 InventoryPlanning.php:104 +#: GLTrialBalance.php:168 GLTrialBalance.php:182 InventoryPlanning.php:104 #: InventoryPlanning.php:179 InventoryPlanning.php:214 #: InventoryPlanning.php:262 InventoryPlanning.php:302 #: InventoryPlanning.php:365 InventoryPlanningPrefSupplier.php:204 @@ -952,9 +952,9 @@ #: InventoryPlanningPrefSupplier.php:351 InventoryPlanningPrefSupplier.php:399 #: InventoryPlanningPrefSupplier.php:455 InventoryQuantities.php:87 #: InventoryQuantities.php:98 InventoryValuation.php:81 -#: InventoryValuation.php:92 MailInventoryValuation.php:123 -#: MailInventoryValuation.php:219 MailInventoryValuation.php:243 -#: MailInventoryValuation.php:251 MRPPlannedPurchaseOrders.php:117 +#: InventoryValuation.php:92 MailInventoryValuation.php:122 +#: MailInventoryValuation.php:218 MailInventoryValuation.php:242 +#: MailInventoryValuation.php:250 MRPPlannedPurchaseOrders.php:117 #: MRPPlannedPurchaseOrders.php:128 MRPPlannedWorkOrders.php:109 #: MRPPlannedWorkOrders.php:120 MRPPlannedWorkOrders.php:311 MRPReport.php:39 #: MRPReport.php:50 MRPReport.php:150 MRPReschedules.php:48 @@ -966,7 +966,7 @@ #: PDFRemittanceAdvice.php:83 PDFSellThroughSupportClaim.php:74 #: PDFSellThroughSupportClaim.php:86 PDFStockCheckComparison.php:37 #: PDFStockCheckComparison.php:63 PDFStockCheckComparison.php:268 -#: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:153 +#: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:155 #: PrintCustOrder_generic.php:249 PrintCustOrder.php:233 ReorderLevel.php:63 #: ReorderLevel.php:182 SalesAnalysis_UserDefined.php:28 #: SelectCreditItems.php:32 StockCheck.php:46 StockCheck.php:68 @@ -995,8 +995,8 @@ msgstr "" #: AgedDebtors.php:365 AgedSuppliers.php:197 GLAccountCSV.php:175 -#: GLAccountInquiry.php:169 GLAccountReport.php:97 PO_Items.php:448 -#: PO_Items.php:577 PO_Items.php:602 SalesAnalReptCols.php:365 +#: GLAccountInquiry.php:179 GLAccountReport.php:97 PO_Items.php:448 +#: PO_Items.php:579 PO_Items.php:604 SalesAnalReptCols.php:365 #: SpecialOrder.php:449 StockLocTransferReceive.php:390 #: StockQuantityByDate.php:123 includes/SelectOrderItems_IntoCart.inc:55 msgid "could not be retrieved because" @@ -1032,6 +1032,8 @@ #: includes/PDFPaymentRun_PymtFooter.php:158 #: includes/PDFPaymentRun_PymtFooter.php:189 includes/ConnectDB_mysqli.inc:76 #: includes/ConnectDB_mysql.inc:66 +#: ../webshop/includes/DatabaseFunctions.php:58 +#: ../webshop/includes/Functions.php:425 ../webshop/includes/PlaceOrder.php:52 msgid "The SQL that failed was" msgstr "" @@ -1250,6 +1252,14 @@ msgid "Review Areas Defined" msgstr "" +#: Areas.php:218 +msgid "Enter the sales area code - up to 3 characters are allowed" +msgstr "" + +#: Areas.php:223 +msgid "Enter the description of the sales area" +msgstr "" + #: AuditTrail.php:7 msgid "Audit Trail" msgstr "" @@ -1284,13 +1294,13 @@ #: MRPReport.php:524 MRPReport.php:526 MRPReschedules.php:145 #: NoSalesItems.php:22 NoSalesItems.php:48 NoSalesItems.php:68 #: NoSalesItems.php:70 PDFPeriodStockTransListing.php:60 PDFPriceList.php:198 -#: PO_Items.php:1097 POReport.php:1570 ReorderLevel.php:212 +#: PO_Items.php:1103 POReport.php:1570 ReorderLevel.php:212 #: ReorderLevel.php:214 ReorderLevel.php:244 ReorderLevel.php:246 #: SalesGraph.php:102 SalesGraph.php:104 SalesGraph.php:124 SalesGraph.php:126 #: SalesGraph.php:148 SalesGraph.php:150 SalesGraph.php:184 #: SalesInquiry.php:1075 SalesInquiry.php:1138 SelectCreditItems.php:986 -#: SelectOrderItems.php:1670 SelectOrderItems.php:1673 SelectProduct.php:549 -#: SelectProduct.php:551 StockDispatch.php:82 StockDispatch.php:393 +#: SelectOrderItems.php:1672 SelectOrderItems.php:1675 SelectProduct.php:531 +#: SelectProduct.php:533 StockDispatch.php:82 StockDispatch.php:393 #: StockDispatch.php:395 StockLocStatus.php:71 StockLocStatus.php:73 #: StockLocStatus.php:91 StockLocStatus.php:96 StockLocStatus.php:101 #: StockLocStatus.php:106 StockQuantityByDate.php:25 SupplierPriceList.php:23 @@ -1314,7 +1324,7 @@ msgstr "" #: AuditTrail.php:82 InternalStockRequest.php:591 MRPReport.php:778 -#: PO_SelectPurchOrder.php:431 SelectContract.php:184 SelectProduct.php:823 +#: PO_SelectPurchOrder.php:431 SelectContract.php:184 SelectProduct.php:805 msgid "View" msgstr "" @@ -1322,15 +1332,15 @@ msgid "Date/Time" msgstr "" -#: AuditTrail.php:166 PcReportTab.php:259 includes/header.inc:61 +#: AuditTrail.php:166 PcReportTab.php:259 includes/header.inc:59 msgid "User" msgstr "" #: AuditTrail.php:167 BankReconciliation.php:213 BankReconciliation.php:290 #: CustomerAllocations.php:366 CustomerInquiry.php:202 #: CustomerPurchases.php:68 CustomerTransInquiry.php:25 -#: CustomerTransInquiry.php:104 CustWhereAlloc.php:22 CustWhereAlloc.php:108 -#: DailyBankTransactions.php:127 GLAccountInquiry.php:179 +#: CustomerTransInquiry.php:104 CustWhereAlloc.php:22 CustWhereAlloc.php:113 +#: DailyBankTransactions.php:127 GLAccountInquiry.php:189 #: GLAccountReport.php:341 GLJournal.php:266 MRPReschedules.php:194 #: SalesByTypePeriodInquiry.php:336 SelectCustomer.php:424 #: ShipmentCosting.php:536 ShipmentCosting.php:613 StockCategories.php:236 @@ -1353,7 +1363,7 @@ msgstr "" #: AuditTrail.php:170 MaterialsNotUsed.php:38 PurchData.php:695 -#: SellThroughSupport.php:263 ShopParameters.php:156 SystemParameters.php:362 +#: SellThroughSupport.php:263 ShopParameters.php:192 SystemParameters.php:362 #: includes/PDFOstdgGRNsPageHeader.inc:43 msgid "Value" msgstr "" @@ -1525,7 +1535,7 @@ #: PO_AuthorisationLevels.php:215 PO_AuthoriseMyOrders.php:115 #: PO_Header.php:561 PO_SelectOSPurchOrder.php:478 PO_SelectPurchOrder.php:433 #: PricesByCost.php:277 Prices.php:220 Prices.php:296 PurchData.php:271 -#: PurchData.php:466 PurchData.php:607 SelectSupplier.php:275 +#: PurchData.php:466 PurchData.php:607 SelectSupplier.php:279 #: SellThroughSupport.php:161 SupplierCredit.php:263 SupplierInvoice.php:606 #: SupplierPriceList.php:450 SupplierTenderCreate.php:609 #: SupplierTenders.php:126 SupplierTenders.php:538 @@ -1571,8 +1581,7 @@ msgid "Bank Account Matching" msgstr "" -#: BankMatching.php:17 CustWhereAlloc.php:31 CustWhereAlloc.php:33 -#: PDFCustTransListing.php:45 Z_CheckDebtorsControl.php:74 +#: BankMatching.php:17 PDFCustTransListing.php:45 Z_CheckDebtorsControl.php:74 msgid "Receipts" msgstr "" @@ -1630,12 +1639,13 @@ msgid "Bank Account" msgstr "" -#: BankMatching.php:127 +#: BankMatching.php:127 ShopParameters.php:284 ShopParameters.php:288 msgid "Show" msgstr "" #: BankMatching.php:127 CounterSales.php:227 CreditItemsControlled.php:79 #: FreightCosts.php:269 GoodsReceivedControlled.php:68 GoodsReceived.php:73 +#: GoodsReceived (puppypc32158's conflicted copy 2013-06-24).php:73 #: InternalStockRequestFulfill.php:37 StockLocTransferReceive.php:444 #: SupplierAllocations.php:435 SuppShiptChgs.php:137 msgid "from" @@ -1650,7 +1660,7 @@ #: PDFDeliveryDifferences.php:297 PDFDIFOT.php:193 PDFDIFOT.php:206 #: PDFDIFOT.php:299 PDFOrdersInvoiced.php:80 PDFOrdersInvoiced.php:277 #: PDFOrderStatus.php:85 PDFOrderStatus.php:259 PDFRemittanceAdvice.php:48 -#: PO_PDFPurchOrder.php:349 PricesBasedOnMarkUp.php:215 +#: PO_PDFPurchOrder.php:353 PricesBasedOnMarkUp.php:215 #: PricesBasedOnMarkUp.php:354 PrintCustStatements.php:46 #: PrintCustTrans.php:63 PrintCustTrans.php:66 PrintCustTransPortrait.php:62 #: PrintCustTransPortrait.php:65 SalesGraph.php:218 SalesGraph.php:247 @@ -1762,8 +1772,8 @@ msgstr "" #: BankMatching.php:279 ConfirmDispatch_Invoice.php:297 Credit_Invoice.php:297 -#: CustomerAllocations.php:369 CustomerReceipt.php:915 -#: CustomerTransInquiry.php:113 CustWhereAlloc.php:112 GLJournalInquiry.php:85 +#: CustomerAllocations.php:369 CustomerReceipt.php:918 +#: CustomerTransInquiry.php:113 CustWhereAlloc.php:117 GLJournalInquiry.php:85 #: ImportBankTransAnalysis.php:208 ImportBankTransAnalysis.php:288 #: PaymentAllocations.php:67 Payments.php:1052 Payments.php:1056 #: Payments.php:1072 PcAssignCashToTab.php:239 PcAssignCashToTab.php:364 @@ -1779,7 +1789,8 @@ #: SuppTransGLAnalysis.php:109 SuppTransGLAnalysis.php:219 #: Z_CheckAllocs.php:66 includes/PDFBankingSummaryPageHeader.inc:55 #: includes/PDFChequeListingPageHeader.inc:37 -#: includes/PDFGLJournalHeader.inc:22 +#: includes/PDFGLJournalHeader.inc:22 ../webshop/CreditCardPayFlowPro.php:276 +#: ../webshop/CreditCardPayPalPro.php:337 msgid "Amount" msgstr "" @@ -1894,8 +1905,8 @@ #: BankReconciliation.php:214 BankReconciliation.php:291 #: CustomerAllocations.php:333 CustomerAllocations.php:367 -#: CustomerInquiry.php:203 CustomerTransInquiry.php:105 CustWhereAlloc.php:109 -#: EmailCustTrans.php:15 GLAccountInquiry.php:180 ImportBankTrans.php:538 +#: CustomerInquiry.php:203 CustomerTransInquiry.php:105 CustWhereAlloc.php:114 +#: EmailCustTrans.php:15 GLAccountInquiry.php:190 ImportBankTrans.php:538 #: PrintCustTrans.php:509 PrintCustTrans.php:731 PrintCustTrans.php:964 #: PrintCustTrans.php:1013 PrintCustTransPortrait.php:535 #: PrintCustTransPortrait.php:771 PrintCustTransPortrait.php:1019 @@ -1903,7 +1914,7 @@ #: SupplierAllocations.php:455 SupplierAllocations.php:568 #: SupplierAllocations.php:643 SupplierTransInquiry.php:103 #: Z_CheckAllocs.php:63 Z_CheckGLTransBalance.php:12 -#: includes/PDFQuotationPageHeader.inc:89 +#: includes/PDFQuotationPageHeader.inc:90 #: includes/PDFQuotationPortraitPageHeader.inc:87 #: includes/PDFStatementPageHeader.inc:168 #: includes/PDFStatementPageHeader.inc:179 includes/PDFTransPageHeader.inc:44 @@ -1912,8 +1923,8 @@ msgstr "" #: BankReconciliation.php:215 BankReconciliation.php:292 -#: ContractCosting.php:172 CustomerInquiry.php:206 CustomerPurchases.php:75 -#: CustomerTransInquiry.php:109 CustWhereAlloc.php:110 +#: ContractCosting.php:176 CustomerInquiry.php:206 CustomerPurchases.php:75 +#: CustomerTransInquiry.php:109 CustWhereAlloc.php:115 #: DailyBankTransactions.php:128 GLAccountReport.php:342 #: PaymentAllocations.php:64 PaymentAllocations.php:65 #: PDFRemittanceAdvice.php:309 ShiptsList.php:37 StockCounts.php:115 @@ -1923,7 +1934,7 @@ #: includes/PDFPeriodStockTransListingPageHeader.inc:48 #: includes/PDFPeriodStockTransListingPageHeader.inc:52 #: includes/PDFStockComparisonPageHeader.inc:36 -#: includes/PDFSuppTransListingPageHeader.inc:49 +#: includes/PDFSuppTransListingPageHeader.inc:49 ../webshop/Checkout.php:554 msgid "Reference" msgstr "" @@ -1967,7 +1978,7 @@ msgstr "" #: BankReconciliation.php:361 CounterReturns.php:740 CounterSales.php:832 -#: Customers.php:1156 SelectOrderItems.php:1456 Stocks.php:1353 +#: Customers.php:1150 SelectOrderItems.php:1456 Stocks.php:1353 #: WorkOrderCosting.php:551 WorkOrderEntry.php:590 msgid "Are You Sure?" msgstr "" @@ -2033,23 +2044,25 @@ #: CounterSales.php:2097 CounterSales.php:2285 CounterSales.php:2422 #: Credit_Invoice.php:291 CustomerPurchases.php:73 DeliveryDetails.php:861 #: DeliveryDetails.php:931 GoodsReceived.php:101 GoodsReceived.php:105 -#: GoodsReceived.php:108 InternalStockRequestFulfill.php:318 -#: InternalStockRequestFulfill.php:319 InternalStockRequest.php:631 -#: InventoryPlanningPrefSupplier.php:78 InventoryQuantities.php:248 -#: MRPDemands.php:297 MRPDemands.php:395 MRPPlannedPurchaseOrders.php:328 -#: MRPPlannedWorkOrders.php:261 MRPPlannedWorkOrders.php:387 MRPReport.php:413 -#: MRPReport.php:419 MRPReschedules.php:195 OffersReceived.php:108 -#: OffersReceived.php:218 OffersReceived.php:278 OrderDetails.php:170 -#: PDFOrdersInvoiced.php:393 POReport.php:762 POReport.php:1449 -#: PrintCustTrans.php:894 PrintCustTrans.php:983 PrintCustTrans.php:1032 +#: GoodsReceived.php:108 GoodsReceived (puppypc32158's conflicted copy +#: 2013-06-24).php:101 2013-06-24).php:105 2013-06-24).php:108 +#: InternalStockRequestFulfill.php:318 InternalStockRequestFulfill.php:319 +#: InternalStockRequest.php:631 InventoryPlanningPrefSupplier.php:78 +#: InventoryQuantities.php:248 MRPDemands.php:297 MRPDemands.php:395 +#: MRPPlannedPurchaseOrders.php:328 MRPPlannedWorkOrders.php:261 +#: MRPPlannedWorkOrders.php:387 MRPReport.php:413 MRPReport.php:419 +#: MRPReschedules.php:195 OffersReceived.php:108 OffersReceived.php:218 +#: OffersReceived.php:278 OrderDetails.php:170 PDFOrdersInvoiced.php:393 +#: POReport.php:762 POReport.php:1449 PrintCustTrans.php:894 +#: PrintCustTrans.php:983 PrintCustTrans.php:1032 #: PrintCustTransPortrait.php:945 PrintCustTransPortrait.php:1043 #: PrintCustTransPortrait.php:1099 RecurringSalesOrders.php:331 #: ReorderLevel.php:300 ReverseGRN.php:393 ReverseGRN.php:394 #: SalesAnalReptCols.php:16 SalesAnalReptCols.php:18 SalesGraph.php:193 #: SalesGraph.php:276 SalesInquiry.php:977 SalesTopItemsInquiry.php:225 #: SelectCreditItems.php:688 SelectCreditItems.php:1068 -#: SelectOrderItems.php:1378 SelectOrderItems.php:1545 -#: SelectOrderItems.php:1740 SelectOrderItems.php:1870 ShipmentCosting.php:149 +#: SelectOrderItems.php:1378 SelectOrderItems.php:1547 +#: SelectOrderItems.php:1742 SelectOrderItems.php:1872 ShipmentCosting.php:149 #: ShipmentCosting.php:150 Shipments.php:401 Shipments.php:403 #: Shipments.php:404 Shipments.php:488 Shipments.php:490 SpecialOrder.php:628 #: StockCounts.php:114 StockLocMovements.php:93 StockLocTransfer.php:307 @@ -2069,7 +2082,7 @@ #: includes/PDFOrderPageHeader_generic.inc:93 #: includes/PDFPeriodStockTransListingPageHeader.inc:50 #: includes/PDFPickingListHeader.inc:74 -#: includes/PDFQuotationPageHeader.inc:104 +#: includes/PDFQuotationPageHeader.inc:105 #: includes/PDFQuotationPortraitPageHeader.inc:104 #: includes/PDFSalesOrder_generic.inc:95 #: includes/PDFSellThroughSupportClaimPageHeader.inc:27 @@ -2077,8 +2090,9 @@ #: includes/PDFStockNegativesHeader.inc:33 #: includes/PDFStockTransferHeader.inc:39 includes/PDFTransPageHeader.inc:209 #: includes/PO_PDFOrderPageHeader.inc:77 includes/PO_PDFOrderPageHeader -#: (puppypc32158's conflicted copy 2013-05-23).inc:76 api/api_xml-rpc.php:2533 +#: 2013-05-23).inc:76 2013-06-24).inc:77 api/api_xml-rpc.php:2533 #: api/api_xml-rpc.php:2579 api/api_xml-rpc.php:2775 +#: ../webshop/includes/DisplayShoppingCart.php:7 msgid "Quantity" msgstr "" @@ -2186,7 +2200,7 @@ #: includes/PDFPeriodStockTransListingPageHeader.inc:25 #: includes/PDFPickingListHeader.inc:69 #: includes/PDFProfitAndLossPageHeader.inc:28 -#: includes/PDFQuotationPageHeader.inc:95 +#: includes/PDFQuotationPageHeader.inc:96 #: includes/PDFQuotationPortraitPageHeader.inc:93 #: includes/PDFSalesAnalPageHeader.inc:15 #: includes/PDFSalesOrder_generic.inc:85 @@ -2207,7 +2221,7 @@ #: includes/PDFTransPageHeaderPortrait.inc:23 #: includes/PDFTrialBalancePageHeader.inc:18 #: includes/PO_PDFOrderPageHeader.inc:17 includes/PO_PDFOrderPageHeader -#: (puppypc32158's conflicted copy 2013-05-23).inc:17 +#: (puppypc32158's conflicted copy 2013-05-23).inc:17 2013-06-24).inc:17 msgid "Page" msgstr "" @@ -2224,9 +2238,9 @@ #: InternalStockRequest.php:627 PO_SelectOSPurchOrder.php:237 #: PO_SelectPurchOrder.php:214 ReorderLevelLocation.php:73 #: ReorderLevelLocation.php:74 SelectCompletedOrder.php:556 -#: SelectOrderItems.php:1541 SelectOrderItems.php:1736 +#: SelectOrderItems.php:1543 SelectOrderItems.php:1738 #: SelectSalesOrder.php:612 SelectWorkOrder.php:211 Shipt_Select.php:192 -#: TopItems.php:168 includes/PDFTopItemsHeader.inc:54 +#: TopItems.php:168 includes/PDFTopItemsHeader.inc:54 ../webshop/index.php:169 msgid "On Hand" msgstr "" @@ -2296,7 +2310,8 @@ #: FixedAssetDepreciation.php:90 FixedAssetRegister.php:84 #: FixedAssetRegister.php:385 FixedAssetTransfer.php:60 #: FixedAssetTransfer.php:160 GLTags.php:63 GLTags.php:82 -#: GLTransInquiry.php:47 GoodsReceived.php:100 +#: GLTransInquiry.php:47 GLTransInquiry (puppypc32158's conflicted copy +#: 2013-06-24).php:47 GoodsReceived.php:100 GoodsReceived 2013-06-24).php:100 #: InternalStockCategoriesByRole.php:168 InternalStockRequest.php:342 #: InternalStockRequest.php:557 InternalStockRequest.php:625 #: InventoryQuantities.php:246 Labels.php:288 MaintenanceTasks.php:91 @@ -2306,14 +2321,14 @@ #: MRPShortages.php:350 NoSalesItems.php:187 PaymentTerms.php:182 #: PcExpenses.php:190 PcExpenses.php:296 PcExpensesTypeTab.php:171 #: PcReportTab.php:170 PcTypeTabs.php:161 PDFOrdersInvoiced.php:351 -#: PDFOrderStatus.php:322 PO_Items.php:714 PO_Items.php:1147 +#: PDFOrderStatus.php:322 PO_Items.php:720 PO_Items.php:1153 #: PO_SelectOSPurchOrder.php:236 PO_SelectPurchOrder.php:213 #: PricesByCost.php:152 ReorderLevelLocation.php:71 ReorderLevel.php:298 #: ReverseGRN.php:391 SalesCategories.php:479 SecurityTokens.php:95 #: SecurityTokens.php:104 SecurityTokens.php:120 SelectAsset.php:265 #: SelectCompletedOrder.php:555 SelectContract.php:144 -#: SelectCreditItems.php:1022 SelectOrderItems.php:1539 -#: SelectOrderItems.php:1734 SelectProduct.php:561 SelectProduct.php:788 +#: SelectCreditItems.php:1022 SelectOrderItems.php:1541 +#: SelectOrderItems.php:1736 SelectProduct.php:543 SelectProduct.php:770 #: SelectSalesOrder.php:611 SelectWorkOrder.php:210 Shipt_Select.php:191 #: StockCategories.php:235 StockDispatch.php:503 StockLocStatus.php:172 #: StockQuantityByDate.php:108 Stocks.php:950 SuppCreditGRNs.php:92 @@ -2413,18 +2428,18 @@ #: BOMInquiry.php:28 BOMs.php:868 ContractBOM.php:331 ContractBOM.php:336 #: Contracts.php:759 Contracts.php:762 CounterReturns.php:1642 -#: CounterSales.php:2243 CustomerReceipt.php:1126 CustomerReceipt.php:1129 +#: CounterSales.php:2243 CustomerReceipt.php:1129 CustomerReceipt.php:1132 #: DiscountCategories.php:109 DiscountCategories.php:111 #: DiscountCategories.php:115 DiscountCategories.php:117 #: FixedAssetTransfer.php:94 InternalStockRequest.php:351 MRPDemands.php:338 -#: MRPDemands.php:341 MRPReport.php:543 PO_Header.php:542 PO_Items.php:1126 -#: PO_Items.php:1130 P... [truncated message content] |
From: <te...@us...> - 2013-07-07 09:43:03
|
Revision: 6056 http://sourceforge.net/p/web-erp/reponame/6056 Author: tehonu Date: 2013-07-07 09:43:00 +0000 (Sun, 07 Jul 2013) Log Message: ----------- Added Destination Country to freight costs Modified Paths: -------------- trunk/FreightCosts.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/FreightCosts.php =================================================================== --- trunk/FreightCosts.php 2013-07-06 22:11:54 UTC (rev 6055) +++ trunk/FreightCosts.php 2013-07-07 09:43:00 UTC (rev 6056) @@ -3,8 +3,9 @@ /* $Id$*/ include('includes/session.inc'); -$Title = _('Freight Costs Set Up'); +$Title = _('Freight Costs Maintenance'); include('includes/header.inc'); +include('includes/CountriesArray.php'); if (isset($_GET['LocationFrom'])){ $LocationFrom = $_GET['LocationFrom']; @@ -22,8 +23,8 @@ $SelectedFreightCost = $_POST['SelectedFreightCost']; } - echo '<div class="centre"><p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" title="' . - _('Freight Costs') . '" alt="" />' . ' ' . $Title . '</p></div>'; +echo '<div class="centre"><p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" title="' . + _('Freight Costs') . '" alt="" />' . ' ' . $Title . '</p></div>'; if (!isset($LocationFrom) OR !isset($ShipperID)) { @@ -86,7 +87,9 @@ prnMsg(_('The entry for the destination must be at least two characters long') . '. ' . _('These entries are matched against the town names entered for customer delivery addresses'),'warn'); } - + if (trim($_POST['DestinationCountry']) == '' ) { + $_POST['DestinationCountry'] = $CountriesArray[$_SESSION['CountryOfOperation']]; + } if (trim($_POST['CubRate']) == '' ) { $_POST['CubRate'] = 0; } @@ -117,6 +120,7 @@ $sql = "UPDATE freightcosts SET locationfrom='".$LocationFrom."', + destinationcountry='" . $_POST['DestinationCountry'] . "', destination='" . $_POST['Destination'] . "', shipperid='" . $ShipperID . "', cubrate='" . $_POST['CubRate'] . "', @@ -134,6 +138,7 @@ /*Selected freight cost is null cos no item selected on first time round so must be adding a record must be submitting new entries */ $sql = "INSERT INTO freightcosts (locationfrom, + destinationcountry, destination, shipperid, cubrate, @@ -144,6 +149,7 @@ minimumchg) VALUES ( '".$LocationFrom."', + '" . $_POST['DestinationCountry'] . "', '" . $_POST['Destination'] . "', '" . $ShipperID . "', '" . $_POST['CubRate'] . "', @@ -166,6 +172,7 @@ prnMsg($msg,'success'); unset($SelectedFreightCost); + unset($_POST['DestinationCountry']); unset($_POST['CubRate']); unset($_POST['KGRate']); unset($_POST['MAXKGs']); @@ -186,6 +193,7 @@ $sql = "SELECT shipcostfromid, + destinationcountry, destination, cubrate, kgrate, @@ -196,12 +204,16 @@ FROM freightcosts WHERE freightcosts.locationfrom = '".$LocationFrom. "' AND freightcosts.shipperid = '" . $ShipperID . "' - ORDER BY destination"; + ORDER BY destinationcountry, + destination, + maxkgs, + maxcub"; $result = DB_query($sql,$db); echo '<br /><table class="selection">'; $TableHeader = '<tr> + <th>' . _('Country') . '</th> <th>' . _('Destination') . '</th> <th>' . _('Cubic Rate') . '</th> <th>' . _('KG Rate') . '</th> @@ -228,11 +240,12 @@ $k=0; } else { echo '<tr class="OddTableRows">'; - $k++; + $k=1; } printf('<td>%s</td> + <td>%s</td> <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> @@ -240,14 +253,16 @@ <td class="number">%s</td> <td class="number">%s</td> <td><a href="%s&SelectedFreightCost=%s&LocationFrom=%s&ShipperID=%s">' . _('Edit') . '</a></td> - <td><a href="%s&SelectedFreightCost=%s&LocationFrom=%s&ShipperID=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this freight cost') . '\');">' . _('Delete') . '</a></td></tr>', - $myrow[1], - $myrow[2], - $myrow[3], - $myrow[4], - $myrow[5], - $myrow[6], - $myrow[7], + <td><a href="%s&SelectedFreightCost=%s&LocationFrom=%s&ShipperID=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this freight cost') . '\');">' . _('Delete') . '</a></td> + </tr>', + $myrow['destinationcountry'], + $myrow['destination'], + $myrow['cubrate'], + $myrow['kgrate'], + $myrow['maxkgs'], + $myrow['maxcub'], + $myrow['fixedprice'], + $myrow['minimumchg'], htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0], $LocationFrom, @@ -279,6 +294,7 @@ //editing an existing freight cost item $sql = "SELECT locationfrom, + destinationcountry, destination, shipperid, cubrate, @@ -294,6 +310,7 @@ $myrow = DB_fetch_array($result); $LocationFrom = $myrow['locationfrom']; + $_POST['DestinationCountry'] = $myrow['destinationcountry']; $_POST['Destination'] = $myrow['destination']; $ShipperID = $myrow['shipperid']; $_POST['CubRate'] = $myrow['cubrate']; @@ -308,11 +325,12 @@ } else { $_POST['FixedPrice'] = 0; $_POST['MinimumChg'] = 0; + } - } echo '<input type="hidden" name="LocationFrom" value="' . $LocationFrom . '" />'; echo '<input type="hidden" name="ShipperID" value="' . $ShipperID . '" />'; + if (!isset($_POST['DestinationCountry'])) {$_POST['DestinationCountry']=$CountriesArray[$_SESSION['CountryOfOperation']];} if (!isset($_POST['Destination'])) {$_POST['Destination']='';} if (!isset($_POST['CubRate'])) {$_POST['CubRate']='';} if (!isset($_POST['KGRate'])) {$_POST['KGRate']='';} @@ -322,7 +340,21 @@ echo '<br /><table class="selection">'; echo '<tr><th colspan="2">' . _('For Deliveries From') . ' ' . $LocationName . ' ' . _('using') . ' ' . $ShipperName . '</th></tr>'; - echo'<tr><td>' . _('Destination') . ':</td> + + echo '<tr> + <td>' . _('Destination Country') . ':</td> + <td><select name="DestinationCountry">'; + foreach ($CountriesArray as $CountryEntry => $CountryName){ + if (isset($_POST['DestinationCountry']) AND (strtoupper($_POST['DestinationCountry']) == strtoupper($CountryName))){ + echo '<option selected="selected" value="' . $CountryName . '">' . $CountryName .'</option>'; + } else { + echo '<option value="' . $CountryName . '">' . $CountryName .'</option>'; + } + } + echo '</select></td> + </tr>'; + + echo'<tr><td>' . _('Destination Zone') . ':</td> <td><input type="text" maxlength="20" size="20" name="Destination" value="' . $_POST['Destination'] . '" /></td></tr>'; echo '<tr><td>' . _('Rate per Cubic Metre') . ':</td> <td><input type="text" name="CubRate" class="number" size="6" maxlength="5" value="' . $_POST['CubRate'] . '" /></td></tr>'; @@ -333,9 +365,9 @@ echo '<tr><td>' . _('Maximum Volume Per Package (cubic metres)') . ':</td> <td><input type="text" name="MAXCub" class="number" size="8" maxlength="7" value="' . $_POST['MAXCub'] . '" /></td></tr>'; echo '<tr><td>' . _('Fixed Price (zero if rate per KG or Cubic)') . ':</td> - <td><input type="text" name="FixedPrice" class="number" size="6" maxlength="5" value="' . $_POST['FixedPrice'] . '" /></td></tr>'; + <td><input type="text" name="FixedPrice" class="number" size="11" maxlength="10" value="' . $_POST['FixedPrice'] . '" /></td></tr>'; echo '<tr><td>' . _('Minimum Charge (0 is N/A)') . ':</td> - <td><input type="text" name="MinimumChg" class="number" size="6" maxlength="5" value="' . $_POST['MinimumChg'] . '" /></td></tr>'; + <td><input type="text" name="MinimumChg" class="number" size="11" maxlength="10" value="' . $_POST['MinimumChg'] . '" /></td></tr>'; echo '</table><br />'; Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-06 22:11:54 UTC (rev 6055) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-07 09:43:00 UTC (rev 6056) @@ -166,5 +166,7 @@ INSERT INTO config VALUES ('ShopStockLocations',''); INSERT INTO config VALUES ('ShopShowLeftCategoryMenu','1'); +ALTER TABLE `freightcosts` ADD `destinationcountry` VARCHAR( 40 ) NOT NULL AFTER `locationfrom`; + UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |
From: <te...@us...> - 2013-07-07 09:57:25
|
Revision: 6057 http://sourceforge.net/p/web-erp/reponame/6057 Author: tehonu Date: 2013-07-07 09:57:21 +0000 (Sun, 07 Jul 2013) Log Message: ----------- Added all destination address fields and use of country for calculation of freight costs Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/DeliveryDetails.php trunk/includes/FreightCalculation.inc Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2013-07-07 09:43:00 UTC (rev 6056) +++ trunk/ConfirmDispatch_Invoice.php 2013-07-07 09:57:21 UTC (rev 6057) @@ -431,6 +431,9 @@ list ($FreightCost, $BestShipper) = CalcFreightCost($_SESSION['Items'.$identifier]->total, $_SESSION['Items'.$identifier]->BrAdd2, $_SESSION['Items'.$identifier]->BrAdd3, + $_SESSION['Items'.$identifier]->BrAdd4, + $_SESSION['Items'.$identifier]->BrAdd5, + $_SESSION['Items'.$identifier]->BrAdd6, $_SESSION['Items'.$identifier]->totalVolume, $_SESSION['Items'.$identifier]->totalWeight, $_SESSION['Items'.$identifier]->Location, Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2013-07-07 09:43:00 UTC (rev 6056) +++ trunk/DeliveryDetails.php 2013-07-07 09:57:21 UTC (rev 6057) @@ -117,7 +117,15 @@ if ($InputErrors==0){ if ($_SESSION['DoFreightCalc']==True){ - list ($_POST['FreightCost'], $BestShipper) = CalcFreightCost($_SESSION['Items'.$identifier]->total, $_POST['BrAdd2'], $_POST['BrAdd3'], $_SESSION['Items'.$identifier]->totalVolume, $_SESSION['Items'.$identifier]->totalWeight, $_SESSION['Items'.$identifier]->Location, $db); + list ($_POST['FreightCost'], $BestShipper) = CalcFreightCost($_SESSION['Items'.$identifier]->total, + $_POST['BrAdd2'], + $_POST['BrAdd3'], + $_POST['BrAdd4'], + $_POST['BrAdd5'], + $_POST['BrAdd6'], + $_SESSION['Items'.$identifier]->totalVolume, + $_SESSION['Items'.$identifier]->totalWeight, + $_SESSION['Items'.$identifier]->Location, $db); if ( !empty($BestShipper) ){ $_POST['FreightCost'] = round($_POST['FreightCost'],2); $_POST['ShipVia'] = $BestShipper; Modified: trunk/includes/FreightCalculation.inc =================================================================== --- trunk/includes/FreightCalculation.inc 2013-07-07 09:43:00 UTC (rev 6056) +++ trunk/includes/FreightCalculation.inc 2013-07-07 09:57:21 UTC (rev 6057) @@ -7,37 +7,41 @@ Function CalcFreightCost ($TotalValue, $BrAdd2, $BrAdd3, + $BrAdd4, + $BrAdd5, + $BrAddCountry, $TotalVolume, $TotalWeight, $FromLocation, $db){ - # make an array of all the words that could be the name of the destination city - $FindCity = explode(' ', $BrAdd2 . ' ' . $BrAdd3); + # make an array of all the words that could be the name of the destination zone (city, state or ZIP) + $FindCity = explode(' ', $BrAdd2 . ' ' . $BrAdd3 . ' ' . $BrAdd4 . ' ' . $BrAdd5); - $sql = 'Select shipperid, - kgrate *' . $TotalWeight . ' AS kgcost, - cubrate * ' . $TotalVolume . " AS cubcost, - fixedprice, minimumchg - FROM freightcosts - WHERE locationfrom = '$FromLocation' - AND maxkgs > " . $TotalWeight . ' - AND maxcub >' . $TotalVolume . ' - AND ('; - - foreach ($FindCity as $City) { - - $sql = $sql . ' destination ' . LIKE . " '" . ucwords($City) . "%' OR"; - - } - $sql = mb_substr($sql, 0, strrpos($sql,' OR')) . ')'; - + $sql = "SELECT shipperid, + kgrate * " . $TotalWeight . " AS kgcost, + cubrate * " . $TotalVolume . " AS cubcost, + fixedprice, + minimumchg + FROM freightcosts + WHERE locationfrom = " . $FromLocation . " + AND destinationcountry = " . $BrAddCountry . " + AND maxkgs > " . $TotalWeight . " + AND maxcub >" . $TotalVolume . " "; + if (($BrAdd2 != "") OR ($BrAdd3 != "") OR ($BrAdd4 != "") OR ($BrAdd5 != "")){ + // if there is some details of the address besides the country + $sql .= " AND ("; + foreach ($FindCity as $City) { + $sql = $sql . " destination LIKE '" . ucwords($City) . "%' OR"; + } + $sql = mb_substr($sql, 0, strrpos($sql,' OR')) . ')'; + } $CalcFreightCostResult = DB_query($sql,$db); if (DB_error_no($db) !=0) { echo _('The freight calculation for the destination city cannot be performed because') . ' - ' . DB_error_msg($db); } elseif (DB_num_rows($CalcFreightCostResult)>0) { - $CalcFreightCost =9999999; + $CalcFreightCost =9999999999; while ($myrow = DB_fetch_array($CalcFreightCostResult)) { |
From: <te...@us...> - 2013-07-08 07:28:20
|
Revision: 6061 http://sourceforge.net/p/web-erp/reponame/6061 Author: tehonu Date: 2013-07-08 07:28:13 +0000 (Mon, 08 Jul 2013) Log Message: ----------- Added ShopTitle and ShopShowInfoLinks configuration variables Modified Paths: -------------- trunk/ShopParameters.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2013-07-08 03:21:24 UTC (rev 6060) +++ trunk/ShopParameters.php 2013-07-08 07:28:13 UTC (rev 6061) @@ -28,6 +28,9 @@ if ($_SESSION['ShopName'] != $_POST['X_ShopName'] ) { $SQL[] = "UPDATE config SET confvalue = '" . DB_escape_string($_POST['X_ShopName']) ."' WHERE confname = 'ShopName'"; } + if ($_SESSION['ShopTitle'] != $_POST['X_ShopTitle'] ) { + $SQL[] = "UPDATE config SET confvalue = '" . DB_escape_string($_POST['X_ShopTitle']) ."' WHERE confname = 'ShopTitle'"; + } if ($_SESSION['ShopPrivacyStatement'] != $_POST['X_ShopPrivacyStatement'] ) { $SQL[] = "UPDATE config SET confvalue = '" . DB_escape_string($_POST['X_ShopPrivacyStatement']) ."' WHERE confname = 'ShopPrivacyStatement'"; } @@ -73,6 +76,10 @@ $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowLeftCategoryMenu']."' WHERE confname = 'ShopShowLeftCategoryMenu'"; } + if ($_SESSION['ShopShowInfoLinks'] != $_POST['X_ShopShowInfoLinks'] ) { + $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowInfoLinks']."' WHERE confname = 'ShopShowInfoLinks'"; + } + if ($_SESSION['ShopAllowSurcharges'] != $_POST['X_ShopAllowSurcharges'] ) { $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopAllowSurcharges']."' WHERE confname = 'ShopAllowSurcharges'"; } @@ -213,6 +220,13 @@ <td>' . _('Enter the name of the shop that will be displayed on all the store pages') . '</td> </tr>'; +//Shop Title +echo '<tr> + <td>' . _('Shop Title') . ':</td> + <td><input type="text" name="X_ShopTitle" required size="40" maxlength="40" value="' . $_SESSION['ShopTitle'] . '" /></td> + <td>' . _('Enter the title of the shop that will be displayed on the main webSHOP page. Useful for SEO purposes.') . '</td> + </tr>'; + // Shop Customer echo '<tr> <td>' . _('Default Web Shop Customer Acount') . ':</td> @@ -302,6 +316,21 @@ <td>' . _('Shows / Hides the vertical sales categories menu on the left column.') . '</td> </tr>'; +echo '<tr> + <td>' . _('Show/Hide InfoLinks Menu') . ':</td> + <td><select name="X_ShopShowInfoLinks">'; +if ($_SESSION['ShopShowInfoLinks'] == '1') { + echo '<option selected="selected" value="1">' . _('Show') . '</option>'; + echo '<option value="0">' . _('Hide') . '</option>'; +} else { + echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; + echo '<option value="1">' . _('Show') . '</option>'; +} +echo '</select></td> + <td>' . _('Shows / Hides the information links menu at the footer of all the shop webpages.') . '</td> + </tr>'; + + if (mb_strlen($_SESSION['ShopStockLocations'])>1){ $Locations = explode(',',$_SESSION['ShopStockLocations']); } else { Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-08 03:21:24 UTC (rev 6060) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-08 07:28:13 UTC (rev 6061) @@ -168,5 +168,8 @@ ALTER TABLE `freightcosts` ADD `destinationcountry` VARCHAR( 40 ) NOT NULL AFTER `locationfrom`; +INSERT INTO config VALUES ('ShopShowInfoLinks','1'); +INSERT INTO config VALUES ('ShopTitle','Shop Home'); + UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |
From: <dai...@us...> - 2013-07-08 09:02:31
|
Revision: 6063 http://sourceforge.net/p/web-erp/reponame/6063 Author: daintree Date: 2013-07-08 09:02:28 +0000 (Mon, 08 Jul 2013) Log Message: ----------- Add step for type=number Modified Paths: -------------- trunk/DeliveryDetails.php trunk/SelectOrderItems.php Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2013-07-08 08:06:44 UTC (rev 6062) +++ trunk/DeliveryDetails.php 2013-07-08 09:02:28 UTC (rev 6063) @@ -993,7 +993,7 @@ <table class="selection"> <tr> <td>'. _('Deliver To') .':</td> - <td><input type="text" size="42" maxlength="40" name="DeliverTo" value="' . $_SESSION['Items'.$identifier]->DeliverTo . '" /></td> + <td><input type="text" autofocus required size="42" maxlength="40" name="DeliverTo" value="' . $_SESSION['Items'.$identifier]->DeliverTo . '" /></td> </tr>'; echo '<tr> @@ -1087,10 +1087,10 @@ */ echo' <tr> <td>'. _('Contact Phone Number') .':</td> - <td><input type="text" size="25" maxlength="25" name="PhoneNo" value="' . $_SESSION['Items'.$identifier]->PhoneNo . '" /></td> + <td><input type="text" size="25" maxlength="25" required name="PhoneNo" value="' . $_SESSION['Items'.$identifier]->PhoneNo . '" /></td> </tr> <tr> - <td>' . _('Contact Email') . ':</td><td><input type="text" size="40" maxlength="38" name="Email" value="' . $_SESSION['Items'.$identifier]->Email . '" /></td> + <td>' . _('Contact Email') . ':</td><td><input type="email" size="40" maxlength="38" name="Email" value="' . $_SESSION['Items'.$identifier]->Email . '" /></td> </tr> <tr> <td>'. _('Customer Reference') .':</td> Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2013-07-08 08:06:44 UTC (rev 6062) +++ trunk/SelectOrderItems.php 2013-07-08 09:02:28 UTC (rev 6063) @@ -1421,7 +1421,7 @@ echo '<a target="_blank" href="' . $RootPath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> <td title="' . $OrderLine->LongDescription . '">' . $OrderLine->ItemDescription . '</td>'; - echo '<td><input class="number" tabindex="2" type="number" min="0" required name="Quantity_' . $OrderLine->LineNumber . '" size="6" maxlength="6" value="' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '" />'; + echo '<td><input class="number" tabindex="2" type="number" step="' . pow(10,-$OrderLine->DecimalPlaces) . '" min="0" required 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'); } @@ -1429,9 +1429,9 @@ <td class="number">' . locale_number_format($OrderLine->QOHatLoc,$OrderLine->DecimalPlaces) . '</td> <td>' . $OrderLine->Units . '</td>'; + /*OK to display with discount if it is an internal user with appropriate permissions */ if (in_array($_SESSION['PageSecurityArray']['OrderEntryDiscountPricing'], $_SESSION['AllowedPageSecurityTokens'])){ - /*OK to display with discount if it is an internal user with appropriate permissions */ - echo '<td><input class="number" type="number" min="0" required name="Price_' . $OrderLine->LineNumber . '" size="16" maxlength="16" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td> + echo '<td><input class="number" type="number" step="' . pow(10,-$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" min="0" required name="Price_' . $OrderLine->LineNumber . '" size="16" maxlength="16" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td> <td><input class="number" type="number" min="0" required max="100" name="Discount_' . $OrderLine->LineNumber . '" size="5" maxlength="4" value="' . locale_number_format(($OrderLine->DiscountPercent * 100),2) . '" /></td> <td><input class="number" type="number" min="0" required max="99.9" name="GPPercent_' . $OrderLine->LineNumber . '" size="4" maxlength="40" value="' . locale_number_format($OrderLine->GPPercent,2) . '" /></td>'; } else { @@ -1451,7 +1451,7 @@ $_SESSION['Items'.$identifier]->LineItems[$OrderLine->LineNumber]->ItemDue= $LineDueDate; } - echo '<td><input type="date" min="' . Date('Y-m-d') . '" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ItemDue_' . $OrderLine->LineNumber . '" size="10" maxlength="10" value="' . $LineDueDate . '" /></td>'; + echo '<td><input type="text" min="' . Date('Y-m-d') . '" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ItemDue_' . $OrderLine->LineNumber . '" size="10" maxlength="10" value="' . $LineDueDate . '" /></td>'; echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . $RemTxt . '</a></td></tr>'; @@ -1830,8 +1830,8 @@ <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><input class="number" tabindex="'.strval($j+7).'" type="number" size="6" name="OrderQty'. $i . '" value="0" min="0"/> - <input type="hidden" name="StockID'. $i . '" value="' . $myrow['stockid']. '" /> + <td><input class="number" tabindex="%s" type="number" step="%s" size="6" name="OrderQty%s" value="0" min="0"/> + <input type="hidden" name="StockID%s" value="%s" /> </td> </tr>', $myrow['stockid'], @@ -1841,7 +1841,12 @@ locale_number_format($QOH,$QOHRow['decimalplaces']), locale_number_format($DemandQty,$QOHRow['decimalplaces']), locale_number_format($OnOrder,$QOHRow['decimalplaces']), - locale_number_format($Available,$QOHRow['decimalplaces']) ); + locale_number_format($Available,$QOHRow['decimalplaces']), + strval($j+7), + pow(10,-$QOHRow['decimalplaces']), + $i, + $i, + $myrow['stockid'] ); $i++; if ($j==1) { $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; @@ -1882,7 +1887,7 @@ } echo '<td><input type="text" name="part_' . $i . '" size="21" maxlength="20" /></td> <td><input type="number" name="qty_' . $i . '" size="6" maxlength="6" /></td> - <td><input type="date" class="date" name="itemdue_' . $i . '" size="25" maxlength="25" + <td><input type="text" class="date" name="itemdue_' . $i . '" size="25" maxlength="25" alt="'.$_SESSION['DefaultDateFormat'].'" value="' . $DefaultDeliveryDate . '" /></td></tr>'; } echo '</table> |
From: <te...@us...> - 2013-07-10 02:04:26
|
Revision: 6067 http://sourceforge.net/p/web-erp/reponame/6067 Author: tehonu Date: 2013-07-10 02:04:22 +0000 (Wed, 10 Jul 2013) Log Message: ----------- Change stockmaster.kgs to grossweight Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/CopyBOM.php trunk/Credit_Invoice.php trunk/OrderDetails.php trunk/RecurringSalesOrders.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/SelectSalesOrder.php trunk/Stocks.php trunk/Z_ChangeStockCode.php trunk/Z_ImportStocks.php trunk/api/api_stock.php trunk/includes/SelectOrderItems_IntoCart.inc trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/ConfirmDispatch_Invoice.php 2013-07-10 02:04:22 UTC (rev 6067) @@ -141,7 +141,7 @@ stockmaster.controlled, stockmaster.serialised, stockmaster.volume, - stockmaster.kgs, + stockmaster.grossweight, stockmaster.units, stockmaster.decimalplaces, stockmaster.mbflag, @@ -179,7 +179,7 @@ $myrow['discountpercent'], $myrow['units'], $myrow['volume'], - $myrow['kgs'], + $myrow['grossweight'], 0, $myrow['mbflag'], $myrow['actualdispatchdate'], Modified: trunk/CopyBOM.php =================================================================== --- trunk/CopyBOM.php 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/CopyBOM.php 2013-07-10 02:04:22 UTC (rev 6067) @@ -50,7 +50,7 @@ controlled, eoq, volume, - kgs, + grossweight, barcode, discountcategory, taxcatid, @@ -78,7 +78,7 @@ controlled, eoq, volume, - kgs, + grossweight, barcode, discountcategory, taxcatid, Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/Credit_Invoice.php 2013-07-10 02:04:22 UTC (rev 6067) @@ -112,7 +112,7 @@ stockmaster.description, stockmaster.longdescription, stockmaster.volume, - stockmaster.kgs, + stockmaster.grossweight, stockmaster.mbflag, stockmaster.controlled, stockmaster.serialised, @@ -153,7 +153,7 @@ $myrow['discountpercent'], $myrow['units'], $myrow['volume'], - $myrow['kgs'], + $myrow['grossweight'], 0, $myrow['mbflag'], $myrow['trandate'], Modified: trunk/OrderDetails.php =================================================================== --- trunk/OrderDetails.php 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/OrderDetails.php 2013-07-10 02:04:22 UTC (rev 6067) @@ -133,7 +133,7 @@ $LineItemsSQL = "SELECT stkcode, stockmaster.description, stockmaster.volume, - stockmaster.kgs, + stockmaster.grossweight, stockmaster.decimalplaces, stockmaster.mbflag, stockmaster.units, @@ -205,7 +205,7 @@ $OrderTotal += ($myrow['quantity'] * $myrow['unitprice'] * (1 - $myrow['discountpercent'])); $OrderTotalVolume += ($myrow['quantity'] * $myrow['volume']); - $OrderTotalWeight += ($myrow['quantity'] * $myrow['kgs']); + $OrderTotalWeight += ($myrow['quantity'] * $myrow['grossweight']); } $DisplayTotal = locale_number_format($OrderTotal,$CurrDecimalPlaces); Modified: trunk/RecurringSalesOrders.php =================================================================== --- trunk/RecurringSalesOrders.php 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/RecurringSalesOrders.php 2013-07-10 02:04:22 UTC (rev 6067) @@ -116,7 +116,7 @@ stockmaster.description, stockmaster.longdescription, stockmaster.volume, - stockmaster.kgs, + stockmaster.grossweight, stockmaster.units, recurrsalesorderdetails.unitprice, recurrsalesorderdetails.quantity, @@ -145,7 +145,7 @@ $myrow['discountpercent'], $myrow['units'], $myrow['volume'], - $myrow['kgs'], + $myrow['grossweight'], $myrow['qohatloc'], $myrow['mbflag'], '', Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/SelectCreditItems.php 2013-07-10 02:04:22 UTC (rev 6067) @@ -454,7 +454,7 @@ stockmaster.stockid, stockmaster.units, stockmaster.volume, - stockmaster.kgs, + stockmaster.grossweight, (materialcost+labourcost+overheadcost) AS standardcost, stockmaster.mbflag, stockmaster.decimalplaces, @@ -482,7 +482,7 @@ 0, $myrow['units'], $myrow['volume'], - $myrow['kgs'], + $myrow['grossweight'], 0, $myrow['mbflag'], Date($_SESSION['DefaultDateFormat']), @@ -622,7 +622,7 @@ stockmaster.stockid, stockmaster.units, stockmaster.volume, - stockmaster.kgs, + stockmaster.grossweight, stockmaster.mbflag, stockmaster.discountcategory, stockmaster.controlled, @@ -651,7 +651,7 @@ 0, $myrow['units'], $myrow['volume'], - $myrow['kgs'], + $myrow['grossweight'], 0, $myrow['mbflag'], Date($_SESSION['DefaultDateFormat']), Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/SelectOrderItems.php 2013-07-10 02:04:22 UTC (rev 6067) @@ -200,7 +200,7 @@ stockmaster.description, stockmaster.longdescription, stockmaster.volume, - stockmaster.kgs, + stockmaster.grossweight, stockmaster.units, stockmaster.serialised, stockmaster.nextserialno, @@ -240,7 +240,7 @@ $myrow['discountpercent'], $myrow['units'], $myrow['volume'], - $myrow['kgs'], + $myrow['grossweight'], $myrow['qohatloc'], $myrow['mbflag'], $myrow['actualdispatchdate'], Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/SelectSalesOrder.php 2013-07-10 02:04:22 UTC (rev 6067) @@ -51,7 +51,7 @@ purchdata.conversionfactor, purchdata.leadtime, purchdata.suppliersuom, - stockmaster.kgs, + stockmaster.grossweight, stockmaster.volume, stockcategory.stockact, SUM(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS orderqty @@ -72,7 +72,7 @@ purchdata.conversionfactor, purchdata.leadtime, purchdata.suppliersuom, - stockmaster.kgs, + stockmaster.grossweight, stockmaster.volume, stockcategory.stockact ORDER BY purchdata.supplierno, @@ -96,7 +96,7 @@ purchdata.conversionfactor, purchdata.leadtime, purchdata.suppliersuom, - stockmaster.kgs, + stockmaster.grossweight, stockmaster.volume, stockcategory.stockact, SUM(bom.quantity *(salesorderdetails.quantity-salesorderdetails.qtyinvoiced)) AS orderqty @@ -125,7 +125,7 @@ purchdata.conversionfactor, purchdata.leadtime, purchdata.suppliersuom, - stockmaster.kgs, + stockmaster.grossweight, stockmaster.volume, stockcategory.stockact ORDER BY purchdata.supplierno, Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/Stocks.php 2013-07-10 02:04:22 UTC (rev 6067) @@ -161,13 +161,13 @@ $Errors[$i] = 'Volume'; $i++; } - if (!is_numeric(filter_number_format($_POST['KGS']))) { + if (!is_numeric(filter_number_format($_POST['grossweight']))) { $InputError = 1; prnMsg(_('The weight of the packaged item in KGs must be numeric'),'error'); $Errors[$i] = 'KGS'; $i++; } - if (filter_number_format($_POST['KGS'])<0) { + if (filter_number_format($_POST['grossweight'])<0) { $InputError = 1; prnMsg(_('The weight of the packaged item must be a positive number'),'error'); $Errors[$i] = 'KGS'; @@ -395,7 +395,7 @@ mbflag='" . $_POST['MBFlag'] . "', eoq='" . filter_number_format($_POST['EOQ']) . "', volume='" . filter_number_format($_POST['Volume']) . "', - kgs='" . filter_number_format($_POST['KGS']) . "', + grossweight='" . filter_number_format($_POST['grossweight']) . "', barcode='" . $_POST['BarCode'] . "', discountcategory='" . $_POST['DiscountCategory'] . "', taxcatid='" . $_POST['TaxCat'] . "', @@ -567,7 +567,7 @@ serialised, perishable, volume, - kgs, + grossweight, barcode, discountcategory, taxcatid, @@ -586,7 +586,7 @@ '" . $_POST['Serialised']. "', '" . $_POST['Perishable']. "', '" . filter_number_format($_POST['Volume']) . "', - '" . filter_number_format($_POST['KGS']) . "', + '" . filter_number_format($_POST['grossweight']) . "', '" . $_POST['BarCode'] . "', '" . $_POST['DiscountCategory'] . "', '" . $_POST['TaxCat'] . "', @@ -664,7 +664,7 @@ unset($_POST['Serialised']); unset($_POST['Perishable']); unset($_POST['Volume']); - unset($_POST['KGS']); + unset($_POST['grossweight']); unset($_POST['BarCode']); unset($_POST['ReorderLevel']); unset($_POST['DiscountCategory']); @@ -810,7 +810,7 @@ unset($_POST['Serialised']); unset($_POST['Perishable']); unset($_POST['Volume']); - unset($_POST['KGS']); + unset($_POST['grossweight']); unset($_POST['BarCode']); unset($_POST['ReorderLevel']); unset($_POST['DiscountCategory']); @@ -873,7 +873,7 @@ perishable, eoq, volume, - kgs, + grossweight, barcode, discountcategory, taxcatid, @@ -898,7 +898,7 @@ $_POST['Serialised'] = $myrow['serialised']; $_POST['Perishable'] = $myrow['perishable']; $_POST['Volume'] = $myrow['volume']; - $_POST['KGS'] = $myrow['kgs']; + $_POST['grossweight'] = $myrow['grossweight']; $_POST['BarCode'] = $myrow['barcode']; $_POST['DiscountCategory'] = $myrow['discountcategory']; $_POST['TaxCat'] = $myrow['taxcatid']; @@ -1018,8 +1018,8 @@ if (!isset($_POST['Volume']) OR $_POST['Volume']==''){ $_POST['Volume']=0; } -if (!isset($_POST['KGS']) OR $_POST['KGS']==''){ - $_POST['KGS']=0; +if (!isset($_POST['grossweight']) OR $_POST['grossweight']==''){ + $_POST['grossweight']=0; } if (!isset($_POST['Controlled']) OR $_POST['Controlled']==''){ $_POST['Controlled']=0; @@ -1054,7 +1054,7 @@ </tr>'; echo '<tr> - <td>' . _('Packaged Weight (KGs)') . ':</td><td><input ' . (in_array('KGS',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="number" name="KGS" size="12" maxlength="10" value="' . locale_number_format($_POST['KGS'],'Variable') . '" /></td> + <td>' . _('Packaged Weight (KGs)') . ':</td><td><input ' . (in_array('grossweight',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="number" name="grossweight" size="12" maxlength="10" value="' . locale_number_format($_POST['grossweight'],'Variable') . '" /></td> </tr>'; echo '<tr> Modified: trunk/Z_ChangeStockCode.php =================================================================== --- trunk/Z_ChangeStockCode.php 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/Z_ChangeStockCode.php 2013-07-10 02:04:22 UTC (rev 6067) @@ -59,7 +59,7 @@ controlled, eoq, volume, - kgs, + grossweight, barcode, discountcategory, taxcatid, @@ -85,7 +85,7 @@ controlled, eoq, volume, - kgs, + grossweight, barcode, discountcategory, taxcatid, Modified: trunk/Z_ImportStocks.php =================================================================== --- trunk/Z_ImportStocks.php 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/Z_ImportStocks.php 2013-07-10 02:04:22 UTC (rev 6067) @@ -22,7 +22,7 @@ 'Serialised', // 9 'SERIALISED', 'Perishable', // 10 'PERISHABLE', 'Volume', // 11 'VOLUME', - 'KGS', // 12 'KGS', + 'grossweight', // 12 'grossweight', 'BarCode', // 13 'BARCODE', 'DiscountCategory', // 14 'DISCOUNTCATEGORY', 'TaxCat', // 15 'TAXCAT', @@ -195,7 +195,7 @@ serialised, perishable, volume, - kgs, + grossweight, barcode, discountcategory, taxcatid, Modified: trunk/api/api_stock.php =================================================================== --- trunk/api/api_stock.php 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/api/api_stock.php 2013-07-10 02:04:22 UTC (rev 6067) @@ -333,8 +333,8 @@ if (isset($StockItemDetails['volume'])){ $Errors=VerifyVolume($StockItemDetails['volume'], sizeof($Errors), $Errors); } - if (isset($StockItemDetails['kgs'])){ - $Errors=VerifyKgs($StockItemDetails['kgs'], sizeof($Errors), $Errors); + if (isset($StockItemDetails['grossweight'])){ + $Errors=VerifyKgs($StockItemDetails['grossweight'], sizeof($Errors), $Errors); } if (isset($StockItemDetails['barcode'])){ $Errors=VerifyBarCode($StockItemDetails['barcode'], sizeof($Errors), $Errors); @@ -453,8 +453,8 @@ if (isset($StockItemDetails['volume'])){ $Errors=VerifyVolume($StockItemDetails['volume'], sizeof($Errors), $Errors); } - if (isset($StockItemDetails['kgs'])){ - $Errors=VerifyKgs($StockItemDetails['kgs'], sizeof($Errors), $Errors); + if (isset($StockItemDetails['grossweight'])){ + $Errors=VerifyKgs($StockItemDetails['grossweight'], sizeof($Errors), $Errors); } if (isset($StockItemDetails['barcode'])){ $Errors=VerifyBarCode($StockItemDetails['barcode'], sizeof($Errors), $Errors); Modified: trunk/includes/SelectOrderItems_IntoCart.inc =================================================================== --- trunk/includes/SelectOrderItems_IntoCart.inc 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/includes/SelectOrderItems_IntoCart.inc 2013-07-10 02:04:22 UTC (rev 6067) @@ -36,7 +36,7 @@ stockmaster.stockid, stockmaster.units, stockmaster.volume, - stockmaster.kgs, + stockmaster.grossweight, (materialcost+labourcost+overheadcost) AS standardcost, locstock.quantity, stockmaster.mbflag, @@ -211,7 +211,7 @@ $Discount, $myItemRow['units'], $myItemRow['volume'], - $myItemRow['kgs'], + $myItemRow['grossweight'], $myItemRow['quantity'], $myItemRow['mbflag'], NULL, /*Actual Dispatch Date */ Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-09 09:07:19 UTC (rev 6066) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-10 02:04:22 UTC (rev 6067) @@ -171,5 +171,7 @@ INSERT INTO config VALUES ('ShopShowInfoLinks','1'); INSERT INTO config VALUES ('ShopTitle','Shop Home'); +ALTER TABLE `stockmaster` CHANGE `kgs` `grossweight` DECIMAL( 20, 4 ) NOT NULL DEFAULT '0.0000' + UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |
From: <ice...@us...> - 2013-07-10 11:38:07
|
Revision: 6070 http://sourceforge.net/p/web-erp/reponame/6070 Author: icedlava Date: 2013-07-10 11:38:04 +0000 (Wed, 10 Jul 2013) Log Message: ----------- Consistency changes for fixed assets docs with contents, menu title, maintenance entry and small grammar changes. Modified Paths: -------------- trunk/FixedAssetRegister.php trunk/MaintenanceTasks.php trunk/MaintenanceUserSchedule.php trunk/doc/Manual/ManualFixedAssets.html trunk/doc/Manual/ManualOutline.php Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2013-07-10 02:24:38 UTC (rev 6069) +++ trunk/FixedAssetRegister.php 2013-07-10 11:38:04 UTC (rev 6070) @@ -2,6 +2,9 @@ include ('includes/session.inc'); $Title = _('Fixed Asset Register'); + +$ViewTopic = 'FixedAssets'; +$BookMark = 'AssetRegister'; $csv_output = ''; // Reports being generated in HTML, PDF and CSV/EXCEL format if (isset($_POST['submit']) OR isset($_POST['pdf']) OR isset($_POST['csv'])) { Modified: trunk/MaintenanceTasks.php =================================================================== --- trunk/MaintenanceTasks.php 2013-07-10 02:24:38 UTC (rev 6069) +++ trunk/MaintenanceTasks.php 2013-07-10 11:38:04 UTC (rev 6070) @@ -4,7 +4,11 @@ include('includes/session.inc'); -$Title = _('Maintenance Tasks'); +$Title = _('Fixed Asset Maintenance Tasks'); + +$ViewTopic = 'FixedAssets'; +$BookMark = 'AssetMaintenance'; + include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/group_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title.'</p><br />'; @@ -47,7 +51,7 @@ userresponsible='" . $_POST['UserResponsible'] . "', manager='" . $_POST['Manager'] . "' WHERE taskid='".$_POST['TaskID']."'"; - + $ErrMsg = _('The task details cannot be updated because'); $Result=DB_query($sql,$db,$ErrMsg); unset($_POST['AssetID']); @@ -75,10 +79,10 @@ userresponsible, realname, manager - FROM fixedassettasks - INNER JOIN fixedassets + FROM fixedassettasks + INNER JOIN fixedassets ON fixedassettasks.assetid=fixedassets.assetid - INNER JOIN www_users + INNER JOIN www_users ON fixedassettasks.userresponsible=www_users.userid"; $ErrMsg = _('The maintenance task details cannot be retrieved because'); @@ -95,7 +99,7 @@ </tr>'; while ($myrow=DB_fetch_array($Result)) { - + if ($myrow['manager']!=''){ $ManagerResult = DB_query("SELECT realname FROM www_users WHERE userid='" . $myrow['manager'] . "'",$db); $ManagerRow = DB_fetch_array($ManagerResult); @@ -103,7 +107,7 @@ } else { $ManagerName = _('No Manager Set'); } - + echo '<tr> <td>' . $myrow['taskid'] . '</td> <td>' . $myrow['description'] . '</td> @@ -182,7 +186,7 @@ <td>'._('Task Description').':</td> <td><textarea name="TaskDescription" cols="40" rows="3">' . $_POST['TaskDescription'] . '</textarea></td> </tr>'; - + echo '<tr> <td>'._('Days Before Task Due').':</td> <td><input type="text" class="number" name="FrequencyDays" size="5" maxlength="5" value="' . $_POST['FrequencyDays'] . '" /></td> Modified: trunk/MaintenanceUserSchedule.php =================================================================== --- trunk/MaintenanceUserSchedule.php 2013-07-10 02:24:38 UTC (rev 6069) +++ trunk/MaintenanceUserSchedule.php 2013-07-10 11:38:04 UTC (rev 6070) @@ -5,6 +5,12 @@ include('includes/session.inc'); $Title = _('My Maintenance Jobs'); + +$Title = _('Fixed Assets Maintenance Schedule'); + +$ViewTopic = 'FixedAssets'; +$BookMark = 'AssetMaintenance'; + include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/group_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title.'</p><br />'; @@ -25,12 +31,12 @@ userresponsible, realname, manager - FROM fixedassettasks - INNER JOIN fixedassets + FROM fixedassettasks + INNER JOIN fixedassets ON fixedassettasks.assetid=fixedassets.assetid - INNER JOIN www_users + INNER JOIN www_users ON fixedassettasks.userresponsible=www_users.userid - WHERE userresponsible='" . $_SESSION['UserID'] . "' + WHERE userresponsible='" . $_SESSION['UserID'] . "' OR manager = '" . $_SESSION['UserID'] . "' ORDER BY ADDDATE(lastcompleted,frequencydays) DESC"; @@ -50,7 +56,7 @@ </tr>'; while ($myrow=DB_fetch_array($Result)) { - + if ($myrow['manager']!=''){ $ManagerResult = DB_query("SELECT realname FROM www_users WHERE userid='" . $myrow['manager'] . "'",$db); $ManagerRow = DB_fetch_array($ManagerResult); @@ -58,7 +64,7 @@ } else { $ManagerName = _('No Manager Set'); } - + echo '<tr> <td>' . $myrow['taskid'] . '</td> <td>' . $myrow['description'] . '</td> Modified: trunk/doc/Manual/ManualFixedAssets.html =================================================================== --- trunk/doc/Manual/ManualFixedAssets.html 2013-07-10 02:24:38 UTC (rev 6069) +++ trunk/doc/Manual/ManualFixedAssets.html 2013-07-10 11:38:04 UTC (rev 6070) @@ -1,64 +1,85 @@ -<h1><a id="Fixed Assets">Fixed Assets</a></h1> +<h1><a id="FixedAssets">Fixed Assets Manager</a></h1> -<h2>Features Overview</h2> +<div id="manualpage"> + <h2><a id="FixedAssetOverview">Features Overview</a></h2> -<p>The Fixed Assets module allows for recording a database of the individual assets with integration back to the webERP general ledger.</p> + <p>The Fixed Assets Manager module allows the recording of individual fixed assets into the database and integration back to the webERP General Ledger.</p> -<ul> - <li>Assets are assigned a unique id number</li> + <ul> + <li>Assets are assigned a unique id number.</li> - <li>Any number of fixed asset categories can be defined eg. Plant, Equipment, Buildings etc. </li> + <li>Any number of fixed asset categories can be defined eg. Plant, Equipment, Buildings etc. </li> - <li>Assets can be depreciated using either striaght line or diminishing value depreciation methods</li> + <li>Assets can be depreciated using either straight line or diminishing value depreciation methods.</li> - <li>Each asset can have it's own depreciation rate</li> + <li>Each asset can have it's own depreciation rate.</li> - <li>Any number of fixed asset locations can be defined. Assets can only belong to one location. Assets can be listed by category and location so they can be readily identified in a fixed asset audit.</li> + <li>Any number of fixed asset locations can be defined. Assets can only belong to one location. </li> - <li>Depreciation calculation and posting run checks if previously run and defaults the run date to avoid duplicated depreciation runs.</li> + <li>Assets can be listed by category and location so they can be readily identified in a fixed asset audit.</li> - <li>A transaction log of depreciation, additions and disposals is maintained</li> + <li>Depreciation calculation and posting run checks if it has been previously run, and defaults the run date to avoid duplicated depreciation runs.</li> - <li>Full fixed asset schedule of any date period range is possible</li> + <li>A transaction log of depreciation, additions and disposals is maintained by the system.</li> - <li>Fixed asset general ledger posting is performed based on the gl accounts in any number user defined fixed asset categories</li> -</ul> + <li>Full fixed asset schedule of any date period range is possible.</li> -<h2>Creating a New Fixed Asset</h2> + <li>Fixed asset general ledger posting is performed based on the GL accounts specified in any number of user defined, fixed asset categories.</li> -<p>The sequence of events in creating a new fixed asset is as follows:</p> + <li>Fixed asset maintenance tasks can be logged and assigned to an individual and manager which are used when a maintenance schedule is generated.</li> + </ul> + <div class="floatright"> + <a class="minitext" href="#top">⬆ Top</a> + </div> + <h2><a id="CreatingAnAsset">Creating a New Fixed Asset</a></h2> -<ul> - <li><h3><a id="AssetCategories">Define Fixed Asset Categories</a></h3>Any number of fixed asset categories are defined - from Fixed Asset Module -> Fixed Asset Categories. These are the groupings of like assets e.g. Plant, IT equipment, Buildings, Land etc. The general ledger accounts for depreciation, fixed asset cost and accumulated depreciation are all defined for all assets of the same category at this level.</li> + <p>The sequence of events in creating a new fixed asset is as follows:</p> - <li><h3><a id="AssetLocations">Define Fixed Asset Locations</a></h3>Fixed asset locations must be defined. These can be in a heirarchical manner e.g. "Head Office" may have a sub-location of "Server Room".</li> + <ul> + <li><h3><a id="AssetCategories">Define Fixed Asset Categories</a></h3>Any number of fixed asset categories are defined - from Fixed Asset Module -> Fixed Asset Categories. These are the groupings of like assets e.g. Plant, IT equipment, Buildings, Land etc. The general ledger accounts for depreciation, fixed asset cost and accumulated depreciation are all defined for all assets of the same category at this level.</li> - <li><h3><a id="AssetItems">Add Fixed Asset Items</a></h3>A fixed asset is created from the Fixed Assets module -> Add Fixed Asset. This process allows the description and a long description to be recorded, together with the asset's serial number or barcode, the category of fixed asset it belongs to and it's location in the business. The depreciation method and rate is also specified. At this point there is no cost (nor accumulated depreciation)associated with the asset</li> + <li><h3><a id="AssetLocations">Define Fixed Asset Locations</a></h3>Fixed asset locations must be defined. These can be in a heirarchical manner e.g. "Head Office" may have a sub-location of "Server Room".</li> - <li><h3>Purchase Orders For Fixed assets</h3>A purchase order is placed for the asset as a non-stock item. There is provision to enter the asset id of the asset into the purchase order. When the asset is received - the cost is posted to the general ledger account specified by the asset's category. It is also possible to add cost to existing assets in this way. Each cost added is recorded in the fixed asset transaction log so additions over a period can be identified easily.</li> + <li><h3><a id="AssetItems">Add Fixed Asset Items</a></h3>A fixed asset is created from the Fixed Assets module -> Add Fixed Asset. This process allows the description and a long description to be recorded, together with the asset's serial number or barcode, the category of fixed asset it belongs to and it's location in the business. The depreciation method and rate is also specified. At this point there is no cost (nor accumulated depreciation)associated with the asset</li> - <li><h3><a id="AssetInvoices">Purchase an Item Directly With Supplier Invoice</a></h3>Instead of entering a purchase order with the asset specified directly it is possible to enter a purchase invoice directly allocating the charges to any number of fixed assets. The supplier invoice form allows entry against fixed assets directly. All assets created - but with no cost will show in a select box - any of these can be selected or if the asset id is known it can be entered manually. In this way it is possible to add to existing assets. Depreciation will calculate on the new total cost of the asset (or book value if DV depreciation is being used).</li> -</ul> + <li><h3>Purchase Orders For Fixed assets</h3>A purchase order is placed for the asset as a non-stock item. There is provision to enter the asset id of the asset into the purchase order. When the asset is received - the cost is posted to the general ledger account specified by the asset's category. It is also possible to add cost to existing assets in this way. Each cost added is recorded in the fixed asset transaction log so additions over a period can be identified easily.</li> -<h2><a id="AssetSelection">Selecting A Fixed Asset</a></h2> + <li><h3><a id="AssetInvoices">Purchase an Item Directly With Supplier Invoice</a></h3>Instead of entering a purchase order with the asset specified directly it is possible to enter a purchase invoice directly allocating the charges to any number of fixed assets. The supplier invoice form allows entry against fixed assets directly. All assets created - but with no cost will show in a select box - any of these can be selected or if the asset id is known it can be entered manually. In this way it is possible to add to existing assets. Depreciation will calculate on the new total cost of the asset (or book value if DV depreciation is being used).</li> + </ul> + <div class="floatright"> + <a class="minitext" href="#top">⬆ Top</a> + </div> + <h2><a id="AssetSelection">Selecting A Fixed Asset</a></h2> -<p>From the main menu -> Fixed Assets Module tab -> Select Asset. There are options to select the asset category and the asset location and just look at assets for the given category and location. Alternatively the asset id can be entered or any part of the description.</p> + <p>From the main menu -> Fixed Assets Module tab -> Select Asset. There are options to select the asset category and the asset location and just look at assets for the given category and location. Alternatively the asset id can be entered or any part of the description.</p> -<p>Once and item is selected - the details of the asset shows including the cost and accumulated depreciation with all entered transactions reflected. The cost and accumulated depreciation cannot be entered or altered manually. The asset cost will always come from the accounts payable module and depreciation will always come from the automatic calculation of depreciation. However, all other details of the asset can be modified when an asset is selected. The description, serial number, barcode, category, location, depreciation type and rate etc can all be modified at will.</p> + <p>Once and item is selected - the details of the asset shows including the cost and accumulated depreciation with all entered transactions reflected. The cost and accumulated depreciation cannot be entered or altered manually. The asset cost will always come from the accounts payable module and depreciation will always come from the automatic calculation of depreciation. However, all other details of the asset can be modified when an asset is selected. The description, serial number, barcode, category, location, depreciation type and rate etc can all be modified at will.</p> -<h2><a id="AssetDepreciation">Fixed Asset Depreciation Run</a></h2> + <h2><a id="AssetDepreciation">Fixed Asset Depreciation Run</a></h2> -<p>The depreciation run must be run monthly to create the general ledger journals for depreciation at the rates and depreciation methods defined for the assets. In addition to the general ledger journals a log of the depreciation transactions is also created. The depreciation run checks the last month it was run and defaults to run for the following month ... in this way every time it is run it is self evident whether it has been run for the month under review. There is no functionality to reverse a depreciation run.</p> + <p>The depreciation run must be run monthly to create the general ledger journals for depreciation at the rates and depreciation methods defined for the assets. In addition to the general ledger journals a log of the depreciation transactions is also created. The depreciation run checks the last month it was run and defaults to run for the following month ... in this way every time it is run it is self evident whether it has been run for the month under review. There is no functionality to reverse a depreciation run.</p> -<h2><a id="AssetTransfer">Change Location of a Fixed Asset</a></h2> + <h2><a id="AssetTransfer">Change Location of a Fixed Asset</a></h2> -<p>Assets can be transferred to a different location. This enables the company to keep track of the location of their assets. To do this select 'Change Asset Location' from the Transactions menu of the Asset Manager module. Then just select the new location of the asset and all reports will be updated with this new location.</p> + <p>Assets can be transferred to a different location. This enables the company to keep track of the location of their assets. To do this select 'Change Asset Location' from the Transactions menu of the Asset Manager module. Then just select the new location of the asset and all reports will be updated with this new location.</p> -<h2>Fixed Asset Disposals</h2> + <h2>Fixed Asset Disposals</h2> -<p>To dispose of a fixed - an invoice is raised for a fixed asset in the usual order entry screen. Instead of selecting a stock item, there is a button that allows a fixed asset to be selected. By selecting a fixed asset to be sold, the system creates a stock item for the fixed asset. When the sales order is confirmed for invoicing and if the debtors ledger is integrated into the general ledger then entries to dispose of the asset to the general ledger accounts defined in the fixed asset category of the asset are created. The fixed asset transaction is created for the disposal and the fixed asset updated to show the date it was disposed and the proceeds on the disposal.</p> + <p>To dispose of a fixed - an invoice is raised for a fixed asset in the usual order entry screen. Instead of selecting a stock item, there is a button that allows a fixed asset to be selected. By selecting a fixed asset to be sold, the system creates a stock item for the fixed asset. When the sales order is confirmed for invoicing and if the debtors ledger is integrated into the general ledger then entries to dispose of the asset to the general ledger accounts defined in the fixed asset category of the asset are created. The fixed asset transaction is created for the disposal and the fixed asset updated to show the date it was disposed and the proceeds on the disposal.</p> -<h2>Fixed Asset Schedule</h2> + <h2>Fixed Asset Schedule</h2> -<p>The fixed asset schedule requires the entry of a starting date and an end date. The script can produce a pdf report, comma separated values for importing into a spreadsheet, or just view in html on screen. It shows the cost b/fwd at the start date, the total of any additions subsequent to the start date, the depreciation brought forward and the depreciation charged over the period, together with the carried forward cost, accumulated depreciation and net book value.</p><!-- Help End: Fixed Assets --> + <p>The fixed asset schedule requires the entry of a starting date and an end date. The script can produce a pdf report, comma separated values for importing into a spreadsheet, or just view in html on screen. It shows the cost b/fwd at the start date, the total of any additions subsequent to the start date, the depreciation brought forward and the depreciation charged over the period, together with the carried forward cost, accumulated depreciation and net book value.</p><!-- Help End: Fixed Assets --> + + <div class="floatright"> + <a class="minitext" href="#top">⬆ Top</a> + </div> + + + <h2><a id="AssetMaintenance">Fixed Asset Maintenance</a></h2> + + <p>Maintenance Task enables addition of maintenance tasks for any existing asset, with task description, person responsible, manager and days before due date. </p> + <p>The My Maintenance Schedule inquiry outputs a listing of all outstanding maintenance tasks in reverse due date order. From this Schedule tasks can also be marked as complete.</p> + +</div> \ No newline at end of file Modified: trunk/doc/Manual/ManualOutline.php =================================================================== --- trunk/doc/Manual/ManualOutline.php 2013-07-10 02:24:38 UTC (rev 6069) +++ trunk/doc/Manual/ManualOutline.php 2013-07-10 11:38:04 UTC (rev 6070) @@ -249,12 +249,13 @@ 'EDI', 'EDI setup', 'Sending EDI Invoices'), - 'FixedAssets' => array('Fixed assets', + 'FixedAssets' => array('Fixed Assets Manager', 'Fixed assets overview', 'Creating a fixed asset', 'Selecting fixed assets', 'Depreciation run', - 'Fixed asset schedule'), + 'Fixed asset schedule', + 'Maintenance tasks'), 'ReportBuilder' => array('SQL Report Writer', 'Report writer introduction', 'Reports administration', |
From: <te...@us...> - 2013-07-11 02:49:38
|
Revision: 6074 http://sourceforge.net/p/web-erp/reponame/6074 Author: tehonu Date: 2013-07-11 02:49:35 +0000 (Thu, 11 Jul 2013) Log Message: ----------- Proper calculation of International shipment costs and return the freight cost in the curreny of the invoice Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/DeliveryDetails.php trunk/includes/FreightCalculation.inc Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2013-07-11 00:46:22 UTC (rev 6073) +++ trunk/ConfirmDispatch_Invoice.php 2013-07-11 02:49:35 UTC (rev 6074) @@ -437,6 +437,7 @@ $_SESSION['Items'.$identifier]->totalVolume, $_SESSION['Items'.$identifier]->totalWeight, $_SESSION['Items'.$identifier]->Location, + $_SESSION['Items'.$identifier]->DefaultCurrency, $db); $_SESSION['Items'.$identifier]->ShipVia = $BestShipper; } Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2013-07-11 00:46:22 UTC (rev 6073) +++ trunk/DeliveryDetails.php 2013-07-11 02:49:35 UTC (rev 6074) @@ -126,7 +126,9 @@ $_POST['BrAdd6'], $_SESSION['Items'.$identifier]->totalVolume, $_SESSION['Items'.$identifier]->totalWeight, - $_SESSION['Items'.$identifier]->Location, $db); + $_SESSION['Items'.$identifier]->Location, + $_SESSION['Items'.$identifier]->DefaultCurrency, + $db); if ( !empty($BestShipper) ){ $_POST['FreightCost'] = round($_POST['FreightCost'],2); $_POST['ShipVia'] = $BestShipper; @@ -917,7 +919,7 @@ </tr> </table>'; - $DisplayVolume = locale_number_format($_SESSION['Items'.$identifier]->totalVolume,2); + $DisplayVolume = locale_number_format($_SESSION['Items'.$identifier]->totalVolume,5); $DisplayWeight = locale_number_format($_SESSION['Items'.$identifier]->totalWeight,2); echo '<br /> <table> @@ -976,7 +978,7 @@ $DisplayTotal = locale_number_format($_SESSION['Items'.$identifier]->total,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); - $DisplayVolume = locale_number_format($_SESSION['Items'.$identifier]->totalVolume,2); + $DisplayVolume = locale_number_format($_SESSION['Items'.$identifier]->totalVolume,5); $DisplayWeight = locale_number_format($_SESSION['Items'.$identifier]->totalWeight,2); echo '<table class="selection"> <tr> @@ -1079,13 +1081,8 @@ } echo '</select></td> </tr>'; -/* + echo' <tr> - <td>'. _('Delivery Address 6') . ':</td> - <td><input type="text" size="42" maxlength="40" name="BrAdd6" value="' . $_SESSION['Items'.$identifier]->DelAdd6 . '" /></td> - </tr>'; -*/ -echo' <tr> <td>'. _('Contact Phone Number') .':</td> <td><input type="text" size="25" maxlength="25" required name="PhoneNo" value="' . $_SESSION['Items'.$identifier]->PhoneNo . '" /></td> </tr> Modified: trunk/includes/FreightCalculation.inc =================================================================== --- trunk/includes/FreightCalculation.inc 2013-07-11 00:46:22 UTC (rev 6073) +++ trunk/includes/FreightCalculation.inc 2013-07-11 02:49:35 UTC (rev 6074) @@ -13,9 +13,10 @@ $TotalVolume, $TotalWeight, $FromLocation, + $Currency, $db){ - # make an array of all the words that could be the name of the destination zone (city, state or ZIP) + // make an array of all the words that could be the name of the destination zone (city, state or ZIP) $FindCity = explode(' ', $BrAdd2 . ' ' . $BrAdd3 . ' ' . $BrAdd4 . ' ' . $BrAdd5); $sql = "SELECT shipperid, @@ -34,8 +35,13 @@ foreach ($FindCity as $City) { $sql = $sql . " destination LIKE '" . ucwords($City) . "%' OR"; } + if ($BrAddCountry != $CountriesArray[$_SESSION['CountryOfOperation']]){ + /* For international shipments empty destination (ANY) is allowed */ + $sql = $sql . " destination = '' OR"; + } $sql = mb_substr($sql, 0, strrpos($sql,' OR')) . ')'; } + $CalcFreightCostResult = DB_query($sql,$db); if (DB_error_no($db) !=0) { echo _('The freight calculation for the destination city cannot be performed because') . ' - ' . DB_error_msg($db); @@ -45,9 +51,9 @@ while ($myrow = DB_fetch_array($CalcFreightCostResult)) { - /********** FREIGHT CALCULATION - IF FIXED PRICE TAKE IT IF BEST PRICE SO FAR OTHERWISE - TAKE HIGHER OF CUBE, KG OR MINIMUM CHARGE COST **********/ + /********** FREIGHT CALCULATION + IF FIXED PRICE TAKE IT IF BEST PRICE SO FAR OTHERWISE + TAKE HIGHER OF CUBE, KG OR MINIMUM CHARGE COST **********/ if ($myrow['fixedprice']!=0) { if ($myrow['fixedprice'] < $CalcFreightCost) { @@ -72,14 +78,24 @@ } } } else { - $CalcFreightCost = _('Unrecognised destination, delivery only to cities in') . ' ' . $_SESSION['CountryOfOperation']; + $CalcFreightCost = _('Unrecognised destination'); } if ($TotalValue >= $_SESSION['FreightChargeAppliesIfLessThan']){ - /*Even though the order is over the freight free threshold - still need to calculate the best shipper to ensure get best deal*/ - $CalcFreightCost =0; } + + if ($Currency != $_SESSION['CompanyRecord']['currencydefault']){ + $ExRateResult = DB_query("SELECT rate FROM currencies WHERE currabrev='" . $Currency . "'",$db); + if (DB_num_rows($ExRateResult)>0){ + $ExRateRow = DB_fetch_row($ExRateResult); + $ExRate = $ExRateRow[0]; + } else { + $ExRate =1; + } + $CalcFreightCost = $CalcFreightCost * $ExRate; + } + return array ($CalcFreightCost, $CalcBestShipper); } |
From: <te...@us...> - 2013-07-13 02:19:01
|
Revision: 6077 http://sourceforge.net/p/web-erp/reponame/6077 Author: tehonu Date: 2013-07-13 02:18:57 +0000 (Sat, 13 Jul 2013) Log Message: ----------- Use of 3 options for $AllowCompanySelectionBox: ShowSelectionBox, ShowInputBox, Hide. Modified Paths: -------------- trunk/config.distrib.php trunk/includes/Login.php trunk/install/save.php Modified: trunk/config.distrib.php =================================================================== --- trunk/config.distrib.php 2013-07-12 14:54:12 UTC (rev 6076) +++ trunk/config.distrib.php 2013-07-13 02:18:57 UTC (rev 6077) @@ -41,12 +41,19 @@ $DBUser = 'weberp_db_user'; $DBPassword = 'weberp_db_pwd'; -//It would probably be inappropraite to allow selection of the company in a hosted envionment so this option can be turned off with this parameter -//webERP examines each of the directories under the companies directory to determine all the companies that can be logged into -//a new company directory together with the necessary subdirectories is created each time a new company is created by Z_MakeNewCompany.php -$AllowCompanySelectionBox = true; +// It would probably be inappropraite to allow selection of the company in a hosted envionment so this option can be switched to 'ShowInputBox' or 'Hide' +// depending if you allow the user to select the name of the company or must use the default one described at $DefaultCompany +// If set to 'ShowSelectionBox' webERP examines each of the directories under the companies directory to determine all the companies that can be logged into +// a new company directory together with the necessary subdirectories is created each time a new company is created by Z_MakeNewCompany.php +// It would also be inappropiate in some environments to show the name of the company (database name) --> Choose 'Hide'. +// Options: +// 'ShowSelectionBox' (default) +// 'ShowInputBox' +// 'Hide' -//If $AllowCompanySelectionBox = false above then the $DefaultCompany string is entered in the login screen as a default +$AllowCompanySelectionBox = 'ShowSelectionBox'; + +//If $AllowCompanySelectionBox is not 'ShowSelectionBox' above then the $DefaultCompany string is entered in the login screen as a default //otherwise the user is expected to know the name of the company to log into. $DefaultCompany = 'weberpdemo'; Modified: trunk/includes/Login.php =================================================================== --- trunk/includes/Login.php 2013-07-12 14:54:12 UTC (rev 6076) +++ trunk/includes/Login.php 2013-07-13 02:18:57 UTC (rev 6077) @@ -35,12 +35,18 @@ <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8');?>" method="post"> <div> <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> - <span><?php echo _('Company'); ?>:</span> - + <span> <?php - if ($AllowCompanySelectionBox == true){ + if ($AllowCompanySelectionBox == 'Hide'){ + // do not show input or selection box + echo '<input type="hidden" name="CompanyNameField" value="' . $DefaultCompany . '" />'; + } else if ($AllowCompanySelectionBox == 'ShowInputBox'){ + // show input box + echo _('Company') . '<input type="text" name="CompanyNameField" value="' . $DefaultCompany . '" />'; + }else{ + // Show selection box ($AllowCompanySelectionBox == 'ShowSelectionBox') + echo _('Company'); echo '<select name="CompanyNameField">'; - $Companies = scandir('companies/', 0); foreach ($Companies as $CompanyEntry){ if (is_dir('companies/' . $CompanyEntry) AND $CompanyEntry != '..' AND $CompanyEntry != '' AND $CompanyEntry!='.svn' AND $CompanyEntry!='.'){ @@ -52,11 +58,9 @@ } } echo '</select>'; - } else { - echo '<input type="text" name="CompanyNameField" value="' . $DefaultCompany . '" />'; - } + } ?> - + </span> <br /> <span><?php echo _('User name'); ?>:</span><br /> <input type="text" name="UserNameEntryField" maxlength="20" /><br /> Modified: trunk/install/save.php =================================================================== --- trunk/install/save.php 2013-07-12 14:54:12 UTC (rev 6076) +++ trunk/install/save.php 2013-07-13 02:18:57 UTC (rev 6077) @@ -295,7 +295,7 @@ $msg .= "// The timezone of the business - this allows the possibility of having;\n"; $msg .= "date_default_timezone_set('" . $_POST['timezone'] . "');\n"; $msg .= "putenv('TZ=" . $_POST['timezone'] . "');\n"; -$msg .= "\$AllowCompanySelectionBox = true;\n"; +$msg .= "\$AllowCompanySelectionBox = 'ShowSelectionBox' ;\n"; if ($_POST['DemoData'] ==false){ $msg .= "\$DefaultCompany = '" . $_POST['company_name']. "';\n"; } else { |
From: <te...@us...> - 2013-07-17 02:01:31
|
Revision: 6088 http://sourceforge.net/p/web-erp/reponame/6088 Author: tehonu Date: 2013-07-17 02:01:27 +0000 (Wed, 17 Jul 2013) Log Message: ----------- Added ShopShowTopCategoryMenu parameter to webSHOP Modified Paths: -------------- trunk/ShopParameters.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2013-07-16 11:41:14 UTC (rev 6087) +++ trunk/ShopParameters.php 2013-07-17 02:01:27 UTC (rev 6088) @@ -72,6 +72,10 @@ } } + if ($_SESSION['ShopShowTopCategoryMenu'] != $_POST['X_ShopShowTopCategoryMenu'] ) { + $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowTopCategoryMenu']."' WHERE confname = 'ShopShowTopCategoryMenu'"; + } + if ($_SESSION['ShopShowLeftCategoryMenu'] != $_POST['X_ShopShowLeftCategoryMenu'] ) { $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowLeftCategoryMenu']."' WHERE confname = 'ShopShowLeftCategoryMenu'"; } @@ -93,8 +97,6 @@ if ($_SESSION['ShopAllowBankTransfer'] != $_POST['X_ShopAllowBankTransfer'] ) { $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopAllowBankTransfer']."' WHERE confname = 'ShopAllowBankTransfer'"; } - - if ($_SESSION['ShopPayPalSurcharge'] != $_POST['X_ShopPayPalSurcharge'] ) { $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopPayPalSurcharge']."' WHERE confname = 'ShopPayPalSurcharge'"; @@ -303,7 +305,22 @@ </tr>'; echo '<tr> - <td>' . _('Show/Hide Left Column Menu') . ':</td> + <td>' . _('Show/Hide Top Sales Categories Menu') . ':</td> + <td><select name="X_ShopShowTopCategoryMenu">'; +if ($_SESSION['ShopShowTopCategoryMenu'] == '1') { + echo '<option selected="selected" value="1">' . _('Show') . '</option>'; + echo '<option value="0">' . _('Hide') . '</option>'; +} else { + echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; + echo '<option value="1">' . _('Show') . '</option>'; +} + +echo '</select></td> + <td>' . _('Shows / Hides the horizontal sales categories menu below the webSHOP cart summary.') . '</td> + </tr>'; + +echo '<tr> + <td>' . _('Show/Hide Left Sales Categories Menu') . ':</td> <td><select name="X_ShopShowLeftCategoryMenu">'; if ($_SESSION['ShopShowLeftCategoryMenu'] == '1') { echo '<option selected="selected" value="1">' . _('Show') . '</option>'; @@ -312,6 +329,7 @@ echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; echo '<option value="1">' . _('Show') . '</option>'; } + echo '</select></td> <td>' . _('Shows / Hides the vertical sales categories menu on the left column.') . '</td> </tr>'; Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-16 11:41:14 UTC (rev 6087) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-17 02:01:27 UTC (rev 6088) @@ -177,5 +177,7 @@ CHANGE `brpostaddr4` `brpostaddr4` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', CHANGE `brpostaddr6` `brpostaddr6` VARCHAR( 40 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ''; +INSERT INTO config VALUES ('ShopShowTopCategoryMenu','1'); + UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |
From: <te...@us...> - 2013-07-17 02:29:53
|
Revision: 6089 http://sourceforge.net/p/web-erp/reponame/6089 Author: tehonu Date: 2013-07-17 02:29:50 +0000 (Wed, 17 Jul 2013) Log Message: ----------- Added ShopShowLogoAndShopName Parameter and visual reorganization of parameters Modified Paths: -------------- trunk/ShopParameters.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2013-07-17 02:01:27 UTC (rev 6088) +++ trunk/ShopParameters.php 2013-07-17 02:29:50 UTC (rev 6089) @@ -80,6 +80,10 @@ $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowLeftCategoryMenu']."' WHERE confname = 'ShopShowLeftCategoryMenu'"; } + if ($_SESSION['ShopShowLogoAndShopName'] != $_POST['X_ShopShowLogoAndShopName'] ) { + $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowLogoAndShopName']."' WHERE confname = 'ShopShowLogoAndShopName'"; + } + if ($_SESSION['ShopShowInfoLinks'] != $_POST['X_ShopShowInfoLinks'] ) { $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowInfoLinks']."' WHERE confname = 'ShopShowInfoLinks'"; } @@ -301,53 +305,8 @@ echo '<option value="1">' . _('Show') . '</option>'; } echo '</select></td> - <td>' . _('Shows / Hides the QOH column Select Hide if you do not want customers to know how many stock do you currently hold.') . '</td> + <td>' . _('Shows / Hides the QOH column Select Hide if you do not want webSHOP visitors to know how many stock do you currently hold.') . '</td> </tr>'; - -echo '<tr> - <td>' . _('Show/Hide Top Sales Categories Menu') . ':</td> - <td><select name="X_ShopShowTopCategoryMenu">'; -if ($_SESSION['ShopShowTopCategoryMenu'] == '1') { - echo '<option selected="selected" value="1">' . _('Show') . '</option>'; - echo '<option value="0">' . _('Hide') . '</option>'; -} else { - echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; - echo '<option value="1">' . _('Show') . '</option>'; -} - -echo '</select></td> - <td>' . _('Shows / Hides the horizontal sales categories menu below the webSHOP cart summary.') . '</td> - </tr>'; - -echo '<tr> - <td>' . _('Show/Hide Left Sales Categories Menu') . ':</td> - <td><select name="X_ShopShowLeftCategoryMenu">'; -if ($_SESSION['ShopShowLeftCategoryMenu'] == '1') { - echo '<option selected="selected" value="1">' . _('Show') . '</option>'; - echo '<option value="0">' . _('Hide') . '</option>'; -} else { - echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; - echo '<option value="1">' . _('Show') . '</option>'; -} - -echo '</select></td> - <td>' . _('Shows / Hides the vertical sales categories menu on the left column.') . '</td> - </tr>'; - -echo '<tr> - <td>' . _('Show/Hide InfoLinks Menu') . ':</td> - <td><select name="X_ShopShowInfoLinks">'; -if ($_SESSION['ShopShowInfoLinks'] == '1') { - echo '<option selected="selected" value="1">' . _('Show') . '</option>'; - echo '<option value="0">' . _('Hide') . '</option>'; -} else { - echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; - echo '<option value="1">' . _('Show') . '</option>'; -} -echo '</select></td> - <td>' . _('Shows / Hides the information links menu at the footer of all the shop webpages. Useful to use Hide if webSHOP is used as an iFrame in a CMS system, if the information displayed is already in the CMS system.') . '</td> - </tr>'; - if (mb_strlen($_SESSION['ShopStockLocations'])>1){ $Locations = explode(',',$_SESSION['ShopStockLocations']); @@ -398,8 +357,67 @@ <td>' . _('Select the webERP service item to use for payment surcharges to be processed as') . '</td> </tr>'; +echo '<tr><th colspan="3">' . _('Web-Store CMS Integration Settings') . '</th></tr>'; +echo $TableHeader; +echo '<tr> + <td>' . _('Show/Hide Top Sales Categories Menu') . ':</td> + <td><select name="X_ShopShowTopCategoryMenu">'; +if ($_SESSION['ShopShowTopCategoryMenu'] == '1') { + echo '<option selected="selected" value="1">' . _('Show') . '</option>'; + echo '<option value="0">' . _('Hide') . '</option>'; +} else { + echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; + echo '<option value="1">' . _('Show') . '</option>'; +} + +echo '</select></td> + <td>' . _('Shows / Hides the horizontal sales categories menu below the webSHOP cart summary.') . '</td> + </tr>'; + +echo '<tr> + <td>' . _('Show/Hide Left Sales Categories Menu') . ':</td> + <td><select name="X_ShopShowLeftCategoryMenu">'; +if ($_SESSION['ShopShowLeftCategoryMenu'] == '1') { + echo '<option selected="selected" value="1">' . _('Show') . '</option>'; + echo '<option value="0">' . _('Hide') . '</option>'; +} else { + echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; + echo '<option value="1">' . _('Show') . '</option>'; +} + +echo '</select></td> + <td>' . _('Shows / Hides the vertical sales categories menu on the left column.') . '</td> + </tr>'; + +echo '<tr> + <td>' . _('Show/Hide Logo and Shop Name') . ':</td> + <td><select name="X_ShopShowLogoAndShopName">'; +if ($_SESSION['ShopShowLogoAndShopName'] == '1') { + echo '<option selected="selected" value="1">' . _('Show') . '</option>'; + echo '<option value="0">' . _('Hide') . '</option>'; +} else { + echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; + echo '<option value="1">' . _('Show') . '</option>'; +} +echo '</select></td> + <td>' . _('Shows / Hides the logo and webSHOP names. Useful to use Hide if webSHOP is used as an iFrame in a CMS system, if the information displayed is already in the CMS system.') . '</td> + </tr>'; +echo '<tr> + <td>' . _('Show/Hide InfoLinks Menu') . ':</td> + <td><select name="X_ShopShowInfoLinks">'; +if ($_SESSION['ShopShowInfoLinks'] == '1') { + echo '<option selected="selected" value="1">' . _('Show') . '</option>'; + echo '<option value="0">' . _('Hide') . '</option>'; +} else { + echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; + echo '<option value="1">' . _('Show') . '</option>'; +} +echo '</select></td> + <td>' . _('Shows / Hides the information links menu at the footer of all the shop webpages. Useful to use Hide if webSHOP is used as an iFrame in a CMS system, if the information displayed is already in the CMS system.') . '</td> + </tr>'; + echo '<tr><th colspan="3">' . _('Bank Transfer Settings') . '</th></tr>'; echo $TableHeader; Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-17 02:01:27 UTC (rev 6088) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-17 02:29:50 UTC (rev 6089) @@ -178,6 +178,7 @@ CHANGE `brpostaddr6` `brpostaddr6` VARCHAR( 40 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ''; INSERT INTO config VALUES ('ShopShowTopCategoryMenu','1'); +INSERT INTO config VALUES ('ShopShowLogoAndShopName','1'); UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |
From: <rc...@us...> - 2013-07-17 18:05:35
|
Revision: 6095 http://sourceforge.net/p/web-erp/reponame/6095 Author: rchacon Date: 2013-07-17 18:05:31 +0000 (Wed, 17 Jul 2013) Log Message: ----------- Messages es-ES: Minor changes. Modified Paths: -------------- trunk/includes/PDFStarter.php trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po Modified: trunk/includes/PDFStarter.php =================================================================== --- trunk/includes/PDFStarter.php 2013-07-17 12:35:41 UTC (rev 6094) +++ trunk/includes/PDFStarter.php 2013-07-17 18:05:31 UTC (rev 6095) @@ -166,11 +166,9 @@ // $PageSize = array(0,0,$Page_Width,$Page_Height); // $pdf = new Cpdf($PageSize); $pdf = new Cpdf($DocumentOrientation, 'pt', $DocumentPaper); - $pdf->addInfo('Creator', 'WebERP http://www.weberp.org'); $pdf->addInfo('Author', 'WebERP ' . $Version); - /* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user, I corrected it to match TCPDF, but it still needs check, after which, I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */ Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2013-07-17 12:35:41 UTC (rev 6094) +++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2013-07-17 18:05:31 UTC (rev 6095) @@ -8,7 +8,7 @@ "Project-Id-Version: WebERP 4.081\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-07-06 15:49+1200\n" -"PO-Revision-Date: 2013-07-05 07:41-0600\n" +"PO-Revision-Date: 2013-07-15 09:49-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: TecnoSoluciones.com <web...@te...>\n" "MIME-Version: 1.0\n" @@ -7489,7 +7489,7 @@ #: CustomerPurchases.php:71 WWW_Users.php:285 WWW_Users.php:528 #: includes/PDFCustomerListPageHeader.inc:84 api/api_xml-rpc.php:241 msgid "Branch Code" -msgstr "Código de la Sucursal" +msgstr "Código de sucursal" #: CustLoginSetup.php:187 SuppLoginSetup.php:207 WWW_Users.php:562 msgid "Reports Page Size" @@ -7753,7 +7753,7 @@ #: CustomerBranches.php:61 msgid "The Branch code must be at least one character long" -msgstr "El Código de la Sucursal no puede estar vacío" +msgstr "El código de sucursal debe tener al menos un carácter de longitud" #: CustomerBranches.php:67 msgid "" @@ -12284,7 +12284,7 @@ #: geocode.php:83 msgid "Customer Branch Code:" -msgstr "Código de la Sucursal del Cliente:" +msgstr "Código de sucursal del cliente:" #: geocode.php:83 msgid "failed to geocode." @@ -21655,7 +21655,7 @@ #: Prices_Customer.php:84 msgid "The branch code entered is not currently defined" -msgstr "El código de la Sucursal entrado no está definido actualmente" +msgstr "El código de sucursal introducido no está definido actualmente" #: Prices_Customer.php:94 Prices.php:81 msgid "The date this price is be in effect to must be entered in the format" @@ -22348,7 +22348,7 @@ #: PrintCustTrans.php:810 PrintCustTransPortrait.php:856 msgid "Consignment Ref" -msgstr "Consignación de Referencia" +msgstr "Referencia de envío" #: PrintCustTrans.php:964 PrintCustTrans.php:1013 #: PrintCustTransPortrait.php:1019 PrintCustTransPortrait.php:1075 @@ -27093,7 +27093,7 @@ #: Shippers.php:130 Shippers.php:193 msgid "Shipper Name" -msgstr "Nombre del Transportista" +msgstr "Transportista" #: Shippers.php:145 #, php-format @@ -43395,17 +43395,17 @@ #: includes/PDFTransPageHeader.inc:58 #: includes/PDFTransPageHeaderPortrait.inc:69 msgid "Dispatch Detail" -msgstr "Detalle de la Nota de Entrega" +msgstr "Datos de envío" #: includes/PDFTransPageHeader.inc:60 #: includes/PDFTransPageHeaderPortrait.inc:72 msgid "Dispatched From" -msgstr "Despachado Desde" +msgstr "Distribuido desde" #: includes/PDFTransPageHeader.inc:91 #: includes/PDFTransPageHeaderPortrait.inc:122 msgid "Sold To" -msgstr "Vendido A" +msgstr "Vendido a" #: includes/PDFTransPageHeader.inc:182 msgid "Customer Tax Ref" @@ -43417,19 +43417,19 @@ #: includes/PDFTransPageHeaderPortrait.inc:157 msgid "Delivered To (check Dispatch Detail)" -msgstr "Entregado a (Ver Detalle de Despacho)" +msgstr "Entregado a (ver datos de envío)" #: includes/PDFTransPageHeaderPortrait.inc:238 msgid "Cust. Tax Ref" -msgstr "Referencia Fiscal" +msgstr "Ref. fiscal cliente" #: includes/PDFTransPageHeaderPortrait.inc:241 msgid "Cust. Reference No." -msgstr "Nº de Referencia del Cliente" +msgstr "Referencia del cliente" #: includes/PDFTransPageHeaderPortrait.inc:266 msgid "Disc." -msgstr "Descuento" +msgstr "Desc." #: includes/PO_PDFOrderPageHeader.inc:14 includes/PO_PDFOrderPageHeader #: (puppypc32158's conflicted copy 2013-05-23).inc:14 2013-06-24).inc:14 |
From: <dai...@us...> - 2013-07-19 10:07:05
|
Revision: 6112 http://sourceforge.net/p/web-erp/reponame/6112 Author: daintree Date: 2013-07-19 10:07:00 +0000 (Fri, 19 Jul 2013) Log Message: ----------- HTML 5 work and start on table sorting Modified Paths: -------------- trunk/AccountGroups.php trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/AuditTrail.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/BankAccounts.php trunk/BankMatching.php trunk/BankReconciliation.php trunk/CompanyPreferences.php trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/ContractOtherReqts.php trunk/Contracts.php trunk/CopyBOM.php trunk/CounterReturns.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustWhereAlloc.php trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/CustomerInquiry.php trunk/CustomerPurchases.php trunk/CustomerReceipt.php trunk/CustomerTransInquiry.php trunk/CustomerTypes.php trunk/Customers.php trunk/DailyBankTransactions.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/Departments.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EmailCustTrans.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLBudgets.php trunk/GLCodesInquiry.php trunk/GLJournal.php trunk/GLTags.php trunk/GoodsReceived.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/WorkOrderIssue.php trunk/css/aguapop/default.css trunk/css/default/default.css trunk/css/fluid/default.css trunk/css/fresh/default.css trunk/css/gel/default.css trunk/css/professional/default.css trunk/css/professional-rtl/default.css trunk/css/silverwolf/default.css trunk/css/wood/default.css trunk/includes/Login.php trunk/javascripts/MiscFunctions.js Added Paths: ----------- trunk/Logout.php Removed Paths: ------------- trunk/Logout.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/AccountGroups.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -401,7 +401,7 @@ } echo '<tr> <td>' . _('Account Group Name') . ':' . '</td> - <td><input tabindex="1" autofocus required placeholder="' . _('Enter the account group name') . '" ' . (in_array('GroupName',$Errors) ? '"class=inputerror"' : '' ) . ' type="text" name="GroupName" size="30" maxlength="30" value="' . $_POST['GroupName'] . '" title="' . _('A unique name for the account group must be entered - at least 3 characters long and less than 30 characters long') . '" /></td> + <td><input tabindex="1" autofocus="autofocus" required="required" pattern="[a-zA-Z0-9_\-\ ]*" placeholder="' . _('Enter the account group name') . '" ' . (in_array('GroupName',$Errors) ? '"class=inputerror"' : '' ) . ' type="text" name="GroupName" size="30" minlength="3" maxlength="30" value="' . $_POST['GroupName'] . '" title="' . _('A unique name for the account group must be entered - at least 3 characters long and less than 30 characters long. Only alpha numeric characters can be used.') . '" /></td> </tr> <tr> <td>' . _('Parent Group') . ':' . '</td> @@ -459,18 +459,16 @@ </tr> <tr> <td>' . _('Sequence In TB') . ':' . '</td> - <td><input tabindex="5" type="number" min="0" maxlength="4" name="SequenceInTB" required class="number" value="' . $_POST['SequenceInTB'] . '" title="' . _('Enter the sequence number that this account group and its child general ledger accounts should display in the trial balance') . '" /></td> + <td><input tabindex="5" type="text" maxlength="4" name="SequenceInTB" required="required" class="number" value="' . $_POST['SequenceInTB'] . '" title="' . _('Enter the sequence number that this account group and its child general ledger accounts should display in the trial balance') . '" /></td> </tr> <tr> <td colspan="2"><div class="centre"><input tabindex="6" type="submit" name="submit" value="' . _('Enter Information') . '" /></div></td> </tr> </table> - <br />'; + <br /> + </div> + </form>'; - echo '<script type="text/javascript">defaultControl(document.forms[0].GroupName);</script>'; - echo '</div> - </form>'; - } //end if record deleted no point displaying form to add record include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/AccountSections.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -251,11 +251,12 @@ echo '<table class="selection"> <tr> <td>' . _('Section Number') . ':' . '</td> - <td><input tabindex="1" ' . (in_array('SectionID',$Errors) ? 'class="inputerror"' : '' ) .' type="number" autofocus required min="0" name="SectionID" class="number" size="4" maxlength="4" value="' . $_POST['SectionID'] . '" /></td> + <td><input tabindex="1" ' . (in_array('SectionID',$Errors) ? 'class="inputerror"' : '' ) .' type="text" autofocus="autofocus" required="required" name="SectionID" class="number" size="4" maxlength="4" value="' . $_POST['SectionID'] . '" /></td> </tr>'; } - echo '<tr><td>' . _('Section Description') . ':' . '</td> - <td><input tabindex="2" ' . (in_array('SectionName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="SectionName" required size="30" maxlength="30" value="' . $_POST['SectionName'] . '" /></td> + echo '<tr> + <td>' . _('Section Description') . ':' . '</td> + <td><input tabindex="2" ' . (in_array('SectionName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="SectionName" required="required" size="30" maxlength="30" value="' . $_POST['SectionName'] . '" /></td> </tr>'; echo '<tr> Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/AddCustomerContacts.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -213,10 +213,10 @@ echo '<tr> <td>'. _('Contact Name') . '</td>'; if (isset($_POST['ContactName'])) { - echo '<td><input type="text" autofocus required name="ContactName" value="' . $_POST['ContactName']. '" size="35" maxlength="40" /></td> + echo '<td><input type="text" autofocus="autofocus" required="required" name="ContactName" value="' . $_POST['ContactName']. '" size="35" maxlength="40" /></td> </tr>'; } else { - echo '<td><input type="text" required name="ContactName" size="35" maxlength="40" /></td> + echo '<td><input type="text" required="required" name="ContactName" size="35" maxlength="40" /></td> </tr>'; } echo '<tr> Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/AgedDebtors.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -457,11 +457,11 @@ <table class="selection"> <tr> <td>' . _('From Customer Code') . ':' . '</td> - <td><input tabindex="1" autofocus required type="text" maxlength="6" size="7" name="FromCriteria" value="0" /></td> + <td><input tabindex="1" autofocus="autofocus" required="required" type="text" maxlength="6" size="7" name="FromCriteria" value="0" title="' . _('Enter the first customer code alphabetically to include in the report') . '" /></td> </tr> <tr> <td>' . _('To Customer Code') . ':' . '</td> - <td><input tabindex="2" type="text" required maxlength="6" size="7" name="ToCriteria" value="zzzzzz" /></td> + <td><input tabindex="2" type="text" required="required" maxlength="6" size="7" name="ToCriteria" value="zzzzzz" title="' . _('Enter the last customer code alphabetically to include in the report') . '" /></td> </tr> <tr> <td>' . _('All balances or overdues only') . ':' . '</td> Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/AgedSuppliers.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -285,11 +285,11 @@ <table class="selection"> <tr> <td>' . _('From Supplier Code') . ':</td> - <td><input tabindex="1" type="text" maxlength="6" size="7" name="FromCriteria" value="1" /></td> + <td><input tabindex="1" type="text" required="required" autofocus="autofocus" maxlength="6" size="7" name="FromCriteria" value="1" title+"' . _('Enter the first supplier code alphabetially to include in the report') . '" /></td> </tr> <tr> <td>' . _('To Supplier Code') . ':</td> - <td><input tabindex="2" type="text" maxlength="6" size="7" name="ToCriteria" value="zzzzzz" /></td> + <td><input tabindex="2" type="text" maxlength="6" size="7" name="ToCriteria" required="required" value="zzzzzz" title="' . _('Enter the last supplier code alphabetically to include in the report') . '" /></td> </tr> <tr> <td>' . _('All balances or overdues only') . ':' . '</td> @@ -332,4 +332,4 @@ include('includes/footer.inc'); } /*end of else not PrintPDF */ -?> +?> \ No newline at end of file Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/Areas.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -215,12 +215,12 @@ echo '<table class="selection"> <tr> <td>' . _('Area Code') . ':</td> - <td><input tabindex="1" ' . (in_array('AreaCode',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="AreaCode" required autofocus value="' . $_POST['AreaCode'] . '" size="3" maxlength="3" title="' . _('Enter the sales area code - up to 3 characters are allowed') . '" /></td> + <td><input tabindex="1" ' . (in_array('AreaCode',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="AreaCode" required="required" autofocus="autofocus" value="' . $_POST['AreaCode'] . '" size="3" maxlength="3" title="' . _('Enter the sales area code - up to 3 characters are allowed') . '" /></td> </tr>'; } echo '<tr><td>' . _('Area Name') . ':</td> - <td><input tabindex="2" ' . (in_array('AreaDescription',$Errors) ? 'class="inputerror"' : '' ) .' type="text" required name="AreaDescription" value="' . $_POST['AreaDescription'] .'" size="26" maxlength="25" title="' . _('Enter the description of the sales area') . '" /></td> + <td><input tabindex="2" ' . (in_array('AreaDescription',$Errors) ? 'class="inputerror"' : '' ) .' type="text" required="required" name="AreaDescription" value="' . $_POST['AreaDescription'] .'" size="26" maxlength="25" title="' . _('Enter the description of the sales area') . '" /></td> </tr>'; echo '<tr> Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/AuditTrail.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -39,33 +39,39 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; -echo '<tr><td>'. _('From Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> - <td><input tabindex="1" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size="11" maxlength="10" value="' .$_POST['FromDate']. '" /></td></tr>'; -echo '<tr><td>'. _('To Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> - <td><input tabindex="2" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size="11" maxlength="10" value="' . $_POST['ToDate'] . '" /></td></tr>'; +echo '<tr> + <td>'. _('From Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> + <td><input tabindex="1" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size="11" maxlength="10" autofocus="autofocus" required="required" value="' .$_POST['FromDate']. '" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')"/></td> + </tr> + <tr> + <td>'. _('To Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> + <td><input tabindex="2" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size="11" maxlength="10" required="required" value="' . $_POST['ToDate'] . '" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')"/></td> + </tr>'; // Show user selections -echo '<tr><td>'. _('User ID'). '</td> - <td><select tabindex="3" name="SelectedUser">'; -echo '<option value="ALL">' . _('All') . '</option>'; -while ($users = DB_fetch_row($UserResult)) { +echo '<tr> + <td>'. _('User ID'). '</td> + <td><select tabindex="3" name="SelectedUser"> + <option value="ALL">' . _('All') . '</option>'; +while ($Users = DB_fetch_row($UserResult)) { if (isset($_POST['SelectedUser']) and $users[0]==$_POST['SelectedUser']) { - echo '<option selected="selected" value="' . $users[0] . '">' . $users[0] . '</option>'; + echo '<option selected="selected" value="' . $Users[0] . '">' . $Users[0] . '</option>'; } else { - echo '<option value="' . $users[0] . '">' . $users[0] . '</option>'; + echo '<option value="' . $Users[0] . '">' . $Users[0] . '</option>'; } } echo '</select></td></tr>'; // Show table selections -echo '<tr><td>'. _('Table '). '</td> - <td><select tabindex="4" name="SelectedTable">'; -echo '<option value="ALL">' . _('All') . '</option>'; -while ($tables = DB_fetch_row($TableResult)) { - if (isset($_POST['SelectedTable']) and $tables[0]==$_POST['SelectedTable']) { - echo '<option selected="selected" value="' . $tables[0] . '">' . $tables[0] . '</option>'; +echo '<tr> + <td>'. _('Table '). '</td> + <td><select tabindex="4" name="SelectedTable"> + <option value="ALL">' . _('All') . '</option>'; +while ($Tables = DB_fetch_row($TableResult)) { + if (isset($_POST['SelectedTable']) and $Tables[0]==$_POST['SelectedTable']) { + echo '<option selected="selected" value="' . $Tables[0] . '">' . $Tables[0] . '</option>'; } else { - echo '<option value="' . $tables[0] . '">' . $tables[0] . '</option>'; + echo '<option value="' . $Tables[0] . '">' . $Tables[0] . '</option>'; } } echo '</select></td></tr>'; @@ -74,15 +80,18 @@ $_POST['ContainingText']=''; } // Show the text -echo '<tr><td>' . _('Containing text') . ':</td>'; -echo '<td><input type="text" name="ContainingText" size="20" maxlength="20" value="'. $_POST['ContainingText'] . '" /></td></tr>'; +echo '<tr> + <td>' . _('Containing text') . ':</td> + <td><input type="text" name="ContainingText" size="20" maxlength="20" value="'. $_POST['ContainingText'] . '" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input tabindex="5" type="submit" name="View" value="' . _('View') . '" /> + </div> + </div> + </form>'; - -echo '</table><br />'; -echo '<div class="centre"><input tabindex="5" type="submit" name="View" value="' . _('View') . '" /></div>'; -echo '</div>'; -echo '</form>'; - // View the audit trail if (isset($_POST['View'])) { @@ -161,13 +170,14 @@ } $result = DB_query($sql,$db); - echo '<table border="0" width="98%" class="selection">'; - echo '<tr><th>' . _('Date/Time') . '</th> - <th>' . _('User') . '</th> - <th>' . _('Type') . '</th> - <th>' . _('Table') . '</th> - <th>' . _('Field Name') . '</th> - <th>' . _('Value') . '</th></tr>'; + echo '<table border="0" width="98%" class="selection"> + <tr> + <th>' . _('Date/Time') . '</th> + <th>' . _('User') . '</th> + <th>' . _('Type') . '</th> + <th>' . _('Table') . '</th> + <th>' . _('Field Name') . '</th> + <th>' . _('Value') . '</th></tr>'; while ($myrow = DB_fetch_row($result)) { if (Query_Type($myrow[2]) == "INSERT") { InsertQueryInfo(str_replace("INSERT INTO",'',$myrow[2])); Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BOMExtendedQty.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -257,11 +257,11 @@ <table class="selection"> <tr> <td>' . _('Part') . ':</td> - <td><input type ="text" name="Part" size="20" /></td> + <td><input type="text" autofocus="autofocus" required="required" name="Part" size="20" title="' . _('Enter the item code that you wish to display the extended bill of material for') . '" /></td> </tr> <tr> <td>' . _('Quantity') . ':</td> - <td><input type="text" class="number" name="Quantity" size="4" /></td> + <td><input type="text" class="number" required="required" name="Quantity" size="4" /></td> </tr> <tr> <td>' . _('Selection Option') . ':</td> Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BOMIndented.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -11,7 +11,7 @@ include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Indented BOM Listing')); $pdf->addInfo('Subject',_('Indented BOM Listing')); - $FontSize=9; + $FontSize=9;put $PageNumber=1; $line_height=12; @@ -251,7 +251,7 @@ <table class="selection">'; echo '<tr> <td>' . _('Part') . ':</td> - <td><input type ="text" name="Part" size="20" /></td> + <td><input type="text" name="Part" autofocus="autofocus" required="required" pattern="[0-9a-zA-Z\-_]*" title="' . _('Enter the item code of parent item to list the bill of material for') . '" size="20" /></td> </tr> <tr> <td>' . _('Levels') . ':</td> Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BOMIndentedReverse.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -239,7 +239,7 @@ <table class="selection"> <tr> <td>' . _('Part') . ':</td> - <td><input type ="text" name="Part" size="20" /></td> + <td><input type="text" autofocus-"autofocus" required="required" title="' ._('Enter the item code required to list the bill of material for') . '" name="Part" size="20" /></td> </tr> <tr> <td>' . _('Print Option') . ':</td> Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BOMInquiry.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -24,7 +24,7 @@ <table class="selection"> <tr> <td>' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</td> - <td><input tabindex="1" type="text" name="Keywords" size="20" maxlength="25" /></td> + <td><input tabindex="1" type="text" autofocus="autofocus" name="Keywords" size="20" maxlength="25" /></td> <td><b>' . _('OR') . '</b></td> <td>' . _('Enter extract of the') . ' <b>' . _('Stock Code') . '</b>:</td> <td><input tabindex="2" type="text" name="StockCode" size="15" maxlength="20" /></td> @@ -257,8 +257,5 @@ prnMsg(_('Enter a stock item code above') . ', ' . _('to view the costed bill of material for'),'info'); } -if (!isset($_POST['StockID']) or $_POST['StockID']=='') { - echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; -} include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BOMListing.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -118,11 +118,11 @@ <table class="selection">'; echo '<tr><td>' . _('From Inventory Part Code') . ':' . '</td> - <td><input tabindex="1" type="text" name="FromCriteria" size="20" maxlength="20" value="1" /></td> + <td><input tabindex="1" type="text" autofocus="autofocus" required="required" pattern="[0-9a-zA-Z\-_]*" title="' . _('Enter the lowest alpha code of parent bom items to list the bill of material for') . '" name="FromCriteria" size="20" maxlength="20" value="1" /></td> </tr>'; echo '<tr><td>' . _('To Inventory Part Code') . ':' . '</td> - <td><input tabindex="2" type="text" name="ToCriteria" size="20" maxlength="20" value="zzzzzzz" /></td> + <td><input tabindex="2" type="text" required="required" pattern="[0-9a-zA-Z\-_]*" title="' . _('Enter the end alpha numeric code of any parent bom items to list the bill of material for') . '" name="ToCriteria" size="20" maxlength="20" value="zzzzzzz" /></td> </tr>'; @@ -130,7 +130,6 @@ <br /><div class="centre"><input tabindex="3" type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div> </div> </form>'; - echo '<script type="text/javascript">defaultControl(document.forms[0].FromCriteria);</script>'; } include('includes/footer.inc'); Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BOMs.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -735,7 +735,7 @@ </tr> <tr> <td>' . _('Quantity') . ': </td> - <td><input ' . (in_array('Quantity',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="4" type="text" class="number" name="Quantity" size="10" maxlength="8" value="'; + <td><input ' . (in_array('Quantity',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="4" type="text" class="number" required="required" name="Quantity" size="10" maxlength="8" title="' . _('Enter the quantity of this item required for the parent item') . '" value="'; if (isset($_POST['Quantity'])){ echo $_POST['Quantity']; } else { @@ -754,7 +754,7 @@ echo '<tr> <td>' . _('Effective After') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> - <td><input ' . (in_array('EffectiveAfter',$Errors) ? 'class="inputerror"' : '' ) . ' tabindex="5" type="text" name="EffectiveAfter" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" size="11" maxlength="10" value="' . $_POST['EffectiveAfter'] .'" /></td> + <td><input ' . (in_array('EffectiveAfter',$Errors) ? 'class="inputerror"' : '' ) . ' tabindex="5" type="text" required="required" name="EffectiveAfter" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" size="11" maxlength="10" value="' . $_POST['EffectiveAfter'] .'" /></td> </tr> <tr> <td>' . _('Effective To') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> @@ -762,9 +762,10 @@ </tr>'; if ($ParentMBflag=='M' OR $ParentMBflag=='G'){ - echo '<tr><td>' . _('Auto Issue this Component to Work Orders') . ':</td> - <td> - <select tabindex="7" name="AutoIssue">'; + echo '<tr> + <td>' . _('Auto Issue this Component to Work Orders') . ':</td> + <td> + <select tabindex="7" name="AutoIssue">'; if (!isset($_POST['AutoIssue'])){ $_POST['AutoIssue'] = $_SESSION['AutoIssue']; @@ -778,13 +779,16 @@ } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } else { echo '<input type="hidden" name="AutoIssue" value="0" />'; } echo '</table> - <br /><div class="centre"><input tabindex="8" type="submit" name="Submit" value="' . _('Enter Information') . '" /> + <br /> + <div class="centre"> + <input tabindex="8" type="submit" name="Submit" value="' . _('Enter Information') . '" /> </div> </div> </form>'; Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BankAccounts.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -288,7 +288,7 @@ echo '<table class="selection"> <tr> <td>' . _('Bank Account GL Code') . ':</td> - <td><select tabindex="1" ' . (in_array('AccountCode',$Errors) ? 'class="selecterror"' : '' ) .' name="AccountCode">'; + <td><select tabindex="1" ' . (in_array('AccountCode',$Errors) ? 'class="selecterror"' : '' ) .' name="AccountCode" autofocus="autofocus" >'; $sql = "SELECT accountcode, accountname @@ -326,7 +326,7 @@ echo '<tr> <td>' . _('Bank Account Name') . ': </td> - <td><input tabindex="2" ' . (in_array('AccountName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="BankAccountName" value="' . $_POST['BankAccountName'] . '" size="40" maxlength="50" /></td> + <td><input tabindex="2" ' . (in_array('AccountName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" required="required" name="BankAccountName" value="' . $_POST['BankAccountName'] . '" size="40" maxlength="50" /></td> </tr> <tr> <td>' . _('Bank Account Code') . ': </td> Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BankMatching.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -98,7 +98,7 @@ echo '<table class="selection"> <tr> <td align="left">' . _('Bank Account') . ':</td> - <td colspan="3"><select tabindex="1" name="BankAccount">'; + <td colspan="3"><select tabindex="1" autofocus="autofocus" name="BankAccount">'; $sql = "SELECT accountcode, bankaccountname FROM bankaccounts"; $resultBankActs = DB_query($sql,$db); @@ -125,12 +125,12 @@ // Change to allow input of FROM DATE and then TO DATE, instead of previous back-to-front method, add datepicker echo '<tr> <td>' . _('Show') . ' ' . $TypeName . ' ' . _('from') . ':</td> - <td><input tabindex="3" type="text" name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['AfterDate'] . '" /></td> + <td><input tabindex="3" type="text" name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" required="required" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['AfterDate'] . '" /></td> </tr>'; echo '<tr> <td>' . _('to') . ':</td> - <td><input tabindex="2" type="text" name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['BeforeDate'] . '" /></td> + <td><input tabindex="2" type="text" name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" required="required" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['BeforeDate'] . '" /></td> </tr>'; echo '<tr> <td colspan="3">' . _('Choose outstanding') . ' ' . $TypeName . ' ' . _('only or all') . ' ' . $TypeName . ' ' . _('in the date range') . ':</td> Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BankReconciliation.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -355,7 +355,7 @@ } echo '<tr> <td colspan="6">' . _('Enter the actual bank statement balance') . ' (' . $CurrencyRow['currcode'] . ')</b></td> - <td class="number"><input type="text" name="BankStatementBalance" maxlength="15" size="15" value="' . locale_number_format($_POST['BankStatementBalance'],$CurrencyRow['currdecimalplaces']) . '" /><td> + <td class="number"><input type="text" name="BankStatementBalance" class="number" autofocus="autofocus" required="required" maxlength="15" size="15" value="' . locale_number_format($_POST['BankStatementBalance'],$CurrencyRow['currdecimalplaces']) . '" /><td> </tr> <tr> <td colspan="7" align="center"><input type="submit" name="PostExchangeDifference" value="' . _('Calculate and Post Exchange Difference') . '" onclick="return confirm(\'' . _('This will create a general ledger journal to write off the exchange difference in the current balance of the account. It is important that the exchange rate above reflects the current value of the bank account currency') . ' - ' . _('Are You Sure?') . '\');" /></td> Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/CompanyPreferences.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -6,8 +6,8 @@ $Title = _('Company Preferences'); /* webERP manual links before header.inc */ -$ViewTopic= "CreatingNewSystem"; -$BookMark = "CompanyParameters"; +$ViewTopic= 'CreatingNewSystem'; +$BookMark = 'CompanyParameters'; include('includes/header.inc'); if (isset($Errors)) { @@ -33,60 +33,7 @@ $Errors[$i] = 'CoyName'; $i++; } - if (mb_strlen($_POST['RegOffice1']) >40) { - $InputError = 1; - prnMsg(_('The Line 1 of the address must be forty characters or less long'),'error'); - $Errors[$i] = 'RegOffice1'; - $i++; - } - if (mb_strlen($_POST['RegOffice2']) >40) { - $InputError = 1; - prnMsg(_('The Line 2 of the address must be forty characters or less long'),'error'); - $Errors[$i] = 'RegOffice2'; - $i++; - } - if (mb_strlen($_POST['RegOffice3']) >40) { - $InputError = 1; - prnMsg(_('The Line 3 of the address must be forty characters or less long'),'error'); - $Errors[$i] = 'RegOffice3'; - $i++; - } - if (mb_strlen($_POST['RegOffice4']) >40) { - $InputError = 1; - prnMsg(_('The Line 4 of the address must be forty characters or less long'),'error'); - $Errors[$i] = 'RegOffice4'; - $i++; - } - if (mb_strlen($_POST['RegOffice5']) >20) { - $InputError = 1; - prnMsg(_('The Line 5 of the address must be twenty characters or less long'),'error'); - $Errors[$i] = 'RegOffice5'; - $i++; - } - if (mb_strlen($_POST['RegOffice6']) >15) { - $InputError = 1; - prnMsg(_('The Line 6 of the address must be fifteen characters or less long'),'error'); - $Errors[$i] = 'RegOffice6'; - $i++; - } - if (mb_strlen($_POST['Telephone']) >25) { - $InputError = 1; - prnMsg(_('The telephone number must be 25 characters or less long'),'error'); - $Errors[$i] = 'Telephone'; - $i++; - } - if (mb_strlen($_POST['Fax']) >25) { - $InputError = 1; - prnMsg(_('The fax number must be 25 characters or less long'),'error'); - $Errors[$i] = 'Fax'; - $i++; - } - if (mb_strlen($_POST['Email']) >55) { - $InputError = 1; - prnMsg(_('The email address must be 55 characters or less long'),'error'); - $Errors[$i] = 'Email'; - $i++; - } + if (mb_strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { $InputError = 1; prnMsg(_('The email address is not correctly formed'),'error'); @@ -224,7 +171,7 @@ echo '<tr> <td>' . _('Name') . ' (' . _('to appear on reports') . '):</td> - <td><input '.(in_array('CoyName',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="1" type="text" name="CoyName" value="' . stripslashes($_POST['CoyName']) . '" size="52" maxlength="50" /></td> + <td><input '.(in_array('CoyName',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="1" type="text" autofocus="autofocus" required="required" name="CoyName" value="' . stripslashes($_POST['CoyName']) . '" minlength="5" pattern="[a-zA-Z0-9_\-\ ]*" title="' . _('Enter the name of the business, this will appear on all reports and at the top of each screen. Only alphanumeric characters space and dashes are allowed.') . '" size="52" maxlength="50" /></td> </tr>'; echo '<tr> @@ -239,22 +186,22 @@ echo '<tr> <td>' . _('Address Line 1') . ':</td> - <td><input '.(in_array('RegOffice1',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="4" type="text" name="RegOffice1" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice1']) . '" /></td> + <td><input '.(in_array('RegOffice1',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="4" type="text" name="RegOffice1" title="' . _('Enter the first line of the company registered office. This will appear on invoices and statements.') . '" required="required" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice1']) . '" /></td> </tr>'; echo '<tr> <td>' . _('Address Line 2') . ':</td> - <td><input '.(in_array('RegOffice2',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="5" type="text" name="RegOffice2" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice2']) . '" /></td> + <td><input '.(in_array('RegOffice2',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="5" type="text" name="RegOffice2" title="' . _('Enter the second line of the company registered office. This will appear on invoices and statements.') . '" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice2']) . '" /></td> </tr>'; echo '<tr> <td>' . _('Address Line 3') . ':</td> - <td><input '.(in_array('RegOffice3',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="6" type="text" name="RegOffice3" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice3']) . '" /></td> + <td><input '.(in_array('RegOffice3',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="6" type="text" name="RegOffice3" title="' . _('Enter the third line of the company registered office. This will appear on invoices and statements.') . '" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice3']) . '" /></td> </tr>'; echo '<tr> <td>' . _('Address Line 4') . ':</td> - <td><input '.(in_array('RegOffice4',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="7" type="text" name="RegOffice4" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice4']) . '" /></td> + <td><input '.(in_array('RegOffice4',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="7" type="text" name="RegOffice4" title="' . _('Enter the fourth line of the company registered office. This will appear on invoices and statements.') . '" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice4']) . '" /></td> </tr>'; echo '<tr> @@ -269,7 +216,7 @@ echo '<tr> <td>' . _('Telephone Number') . ':</td> - <td><input '.(in_array('Telephone',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="10" type="text" name="Telephone" size="26" maxlength="25" value="' . $_POST['Telephone'] . '" /></td> + <td><input '.(in_array('Telephone',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="10" type="tel" name="Telephone" required="required" title="' . _('Enter the main telephone number of the company registered office. This will appear on invoices and statements.') . '" size="26" maxlength="25" value="' . $_POST['Telephone'] . '" /></td> </tr>'; echo '<tr> @@ -279,7 +226,7 @@ echo '<tr> <td>' . _('Email Address') . ':</td> - <td><input '.(in_array('Email',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="12" type="text" name="Email" size="50" maxlength="55" value="' . $_POST['Email'] . '" /></td> + <td><input '.(in_array('Email',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="12" type="email" name="Email" title="' . _('Enter the main company email address. This will appear on invoices and statements.') . '" required="required" placeholder="acc...@ex..." size="50" maxlength="55" value="' . $_POST['Email'] . '" /></td> </tr>'; @@ -312,7 +259,7 @@ echo '<tr> <td>' . _('Debtors Control GL Account') . ':</td> - <td><select tabindex="14" name="DebtorsAct">'; + <td><select tabindex="14" title="' . _('Select the general ledger account to be used for posting the local currency value of all customer transactions to. This account will always represent the total amount owed by customers to the business. Only balance sheet accounts are available for this selection.') . '" name="DebtorsAct">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['DebtorsAct']==$myrow[0]){ @@ -329,7 +276,7 @@ echo '<tr> <td>' . _('Creditors Control GL Account') . ':</td> - <td><select tabindex="15" name="CreditorsAct">'; + <td><select tabindex="15" title="' . _('Select the general ledger account to be used for posting the local currency value of all supplier transactions to. This account will always represent the total amount owed by the business to suppliers. Only balance sheet accounts are available for this selection.') . '" name="CreditorsAct">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['CreditorsAct']==$myrow[0]){ @@ -363,7 +310,7 @@ echo '<tr> <td>' . _('Goods Received Clearing GL Account') . ':</td> - <td><select tabindex="17" name="GRNAct">'; + <td><select title="' . _('Select the general ledger account to be used for posting the cost of goods received pending the entry of supplier invoices for the goods. This account will represent the value of goods received yet to be invoiced by suppliers. Only balance sheet accounts are available for this selection.') . '" tabindex="17" name="GRNAct">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['GRNAct']==$myrow[0]){ @@ -379,7 +326,7 @@ echo '<tr> <td>' . _('Retained Earning Clearing GL Account') . ':</td> - <td><select tabindex="18" name="RetainedEarnings">'; + <td><select title="' . _('Select the general ledger account to be used for clearing profit and loss accounts to that represents the accumulated retained profits of the business. Only balance sheet accounts are available for this selection.') . '" tabindex="18" name="RetainedEarnings">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['RetainedEarnings']==$myrow[0]){ @@ -421,7 +368,7 @@ echo '<tr> <td>' . _('Sales Exchange Variances GL Account') . ':</td> - <td><select tabindex="20" name="ExchangeDiffAct">'; + <td><select title="' . _('Select the general ledger account to be used for posting accounts receivable exchange rate differences to - where the exchange rate on sales invocies is different to the exchange rate of currency receipts from customers, the exchange rate is calculated automatically and posted to this general ledger account. Only profit and loss general ledger accounts are available for this selection.') . '" tabindex="20" name="ExchangeDiffAct">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['ExchangeDiffAct']==$myrow[0]){ @@ -438,7 +385,7 @@ echo '<tr> <td>' . _('Purchases Exchange Variances GL Account') . ':</td> - <td><select tabindex="21" name="PurchasesExchangeDiffAct">'; + <td><select tabindex="21" title="' . _('Select the general ledger account to be used for posting the exchange differences on the accounts payable transactions to. Supplier invoices entered at one currency and paid in the supplier currency at a different exchange rate have the differences calculated automatically and posted to this general ledger account. Only profit and loss general ledger accounts are available for this selection.') . '" name="PurchasesExchangeDiffAct">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['PurchasesExchangeDiffAct']==$myrow[0]){ @@ -455,7 +402,7 @@ echo '<tr> <td>' . _('Payment Discount GL Account') . ':</td> - <td><select tabindex="22" name="PytDiscountAct">'; + <td><select title="' . _('Select the general ledger account to be used for posting the value of payment discounts given to customers at the time of entering a receipt. Only profit and loss general ledger accounts are available for this selection.') . '" tabindex="22" name="PytDiscountAct">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['PytDiscountAct']==$myrow[0]){ @@ -472,7 +419,7 @@ echo '<tr> <td>' . _('Create GL entries for accounts receivable transactions') . ':</td> - <td><select tabindex="23" name="GLLink_Debtors">'; + <td><select title="' . _('Select yes to ensure that webERP creates general ledger journals for all accounts receivable transactions. webERP will maintain the debtors control account (selected above) to ensure it should always balance to the list of customer balances in local currency.') . '" tabindex="23" name="GLLink_Debtors">'; if ($_POST['GLLink_Debtors']==0){ echo '<option selected="selected" value="0">' . _('No') . '</option>'; @@ -487,7 +434,7 @@ echo '<tr> <td>' . _('Create GL entries for accounts payable transactions') . ':</td> - <td><select tabindex="24" name="GLLink_Creditors">'; + <td><select title="' . _('Select yes to ensure that webERP creates general ledger journals for all accounts payable transactions. webERP will maintain the creditors control account (selected above) to ensure it should always balance to the list of supplier balances in local currency.') . '" tabindex="24" name="GLLink_Creditors">'; if ($_POST['GLLink_Creditors']==0){ echo '<option selected="selected" value="0">' . _('No') . '</option>'; @@ -502,7 +449,7 @@ echo '<tr> <td>' . _('Create GL entries for stock transactions') . ':</td> - <td><select tabindex="25" name="GLLink_Stock">'; + <td><select title="' . _('Select yes to ensure that webERP creates general ledger journals for all inventory transactions. webERP will maintain the stock control accounts (selected under the inventory categories set up) to ensure they balance. Only balance sheet general ledger accounts can be selected.') . '" tabindex="25" name="GLLink_Stock">'; if ($_POST['GLLink_Stock']=='0'){ echo '<option selected="selected" value="0">' . _('No') . '</option>'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/ConfirmDispatch_Invoice.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -343,7 +343,7 @@ if (isset($_POST['ProcessInvoice'])) { echo '<td class="number">' . locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</td>'; } else { - echo '<td class="number"><input tabindex="'.$j.'" type="text" class="number" name="' . $LnItm->LineNumber . '_QtyDispatched" maxlength="12" size="12" value="' . locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '" /></td>'; + echo '<td class="number"><input tabindex="'.$j.'" type="text" ' . ($j==1 ? 'autofocus="autofocus" ':'') . ' class="number" required="required" title="' . _('Enter the quantity to charge the customer for, that has been dispatched') . '" name="' . $LnItm->LineNumber . '_QtyDispatched" maxlength="12" size="12" value="' . locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '" /></td>'; } } $DisplayDiscountPercent = locale_number_format($LnItm->DiscountPercent*100,2) . '%'; @@ -380,7 +380,7 @@ if (isset($_POST['ProcessInvoice'])) { echo $Tax->TaxRate*100; } else { - echo '<input type="text" class="number" name="' . $LnItm->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength="4" size="4" value="' . $Tax->TaxRate*100 . '" />'; + echo '<input type="text" class="number" required="required" title="' . _('Enter the tax rate applicable as a number') . '" name="' . $LnItm->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength="4" size="4" value="' . $Tax->TaxRate*100 . '" />'; } $i++; if ($Tax->TaxOnTax ==1){ @@ -490,7 +490,7 @@ 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>'; + <td><input tabindex="'.$j.'" type="text" required="required" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0" /></td>'; $_SESSION['Items'.$identifier]->FreightCost=0; } else { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td>'; @@ -1656,17 +1656,17 @@ 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> + <td><input tabindex="'.$j.'" type="text" maxlength="10" size="15" required="required" 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> + <td><input tabindex="'.$j.'" type="text" pattern="[a-zA-Z0-9_\-\ ]*" title="' . _('Enter the consignment note reference to enable tracking of the delivery in the event of customer proof of delivery issues') . '" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '" /></td> </tr>'; $j++; echo '<tr> <td>' . _('No Of Packages in Delivery'). ':</td> - <td><input tabindex="'.$j.'" type="text" maxlength="6" size="6" class="number" name="Packages" value="' . $_POST['Packages'] . '" /></td> + <td><input tabindex="'.$j.'" type="number" maxlength="6" size="6" class="integer" name="Packages" value="' . $_POST['Packages'] . '" /></td> </tr>'; $j++; Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/ContractBOM.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -265,11 +265,11 @@ echo '<td>' . $ContractComponent->StockID . '</td> <td>' . $ContractComponent->ItemDescription . '</td> - <td><input type="text" class="number" name="Qty' . $ContractComponent->ComponentID . '" size="11" value="' . locale_number_format($ContractComponent->Quantity,$ContractComponent->DecimalPlaces) . '" /></td> + <td><input type="text" class="number" required="required" title="' . _('Enter the quantity of this component required to complete the contract') . '" name="Qty' . $ContractComponent->ComponentID . '" size="11" value="' . locale_number_format($ContractComponent->Quantity,$ContractComponent->DecimalPlaces) . '" /></td> <td>' . $ContractComponent->UOM . '</td> <td class="number">' . locale_number_format($ContractComponent->ItemCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td class="number">' . $DisplayLineTotal . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractComponent->ComponentID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this item from the contract BOM?') . '\');">' . _('Delete') . '</a></td></tr>'; + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractComponent->ComponentID . '" onclick="return MakeConfirm(\'' . _('Are you sure you wish to delete this item from the contract BOM?') . ',' . _('Confirm Deletion') . '\');">' . _('Delete') . '</a></td></tr>'; $TotalCost += $LineTotal; } @@ -300,7 +300,8 @@ '</p>'; echo '<table class="selection"> <tr></tr> - <tr><td><select name="StockCat">'; + <tr> + <td><select name="StockCat">'; echo '<option selected="selected" value="All">' . _('All').'</option>'; while ($myrow1 = DB_fetch_array($result1)) { @@ -324,12 +325,12 @@ echo '</select></td> <td>' . _('Enter text extracts in the description') . ':</td> - <td><input type="text" name="Keywords" size="20" maxlength="25" value="' . $_POST['Keywords'] . '" /></td> + <td><input type="text" autofocus="autofocus" title="' . _('Enter any text that should appear in the item description as the basis of your search') . '" name="Keywords" size="20" maxlength="25" value="' . $_POST['Keywords'] . '" /></td> </tr> <tr> <td></td> <td><b>' . _('OR') . ' </b>' . _('Enter extract of the Stock Code') . ':</td> - <td><input type="text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '" /></td> + <td><input type="text" title="' . _('Enter any part of an item code to seach for all matching items containing that text in the code') . '" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '" /></td> </tr> <tr> <td></td> @@ -375,12 +376,12 @@ $ImageSource = '<i>'._('No Image').'</i>'; } - echo '<td>'.$myrow['stockid'].'</td> - <td>'.$myrow['description'].'</td> - <td>'.$myrow['units'] . '</td> - <td>'.$ImageSource.'</td> - <td><input class="number" type="text" size="6" value="0" name="Qty'.$i.'" /> - <input type="hidden" name="StockID'.$i.'" value="' . $myrow['stockid'] . '" /> + echo '<td>' . $myrow['stockid'] . '</td> + <td>' . $myrow['description'] . '</td> + <td>' . $myrow['units'] . '</td> + <td>' . $ImageSource . '</td> + <td><input class="number" type="text" title="' . _('Enter the quantity required of this item to complete the contract') . '" required="required" size="6" value="0" name="Qty'.$i.'" /> + <input type="hidden" name="StockID' . $i . '" value="' . $myrow['stockid'] . '" /> </td> </tr>'; $i++; Modified: trunk/ContractOtherReqts.php =================================================================== --- trunk/ContractOtherReqts.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/ContractOtherReqts.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -117,9 +117,9 @@ $k=1; } - echo '<td><textarea name="Requirement' . $ContractReqtID . '" cols="30" rows="3">' . $ContractComponent->Requirement . '</textarea></td> - <td><input type="text" class="number" name="Qty' . $ContractReqtID . '" size="11" value="' . locale_number_format($ContractComponent->Quantity,'Variable') . '" /></td> - <td><input type="text" class="number" name="CostPerUnit' . $ContractReqtID . '" size="11" value="' . locale_number_format($ContractComponent->CostPerUnit,$_SESSION['CompanyRecord']['decimalplaces']) . '" /></td> + echo '<td><textarea name="Requirement' . $ContractReqtID . '" cols="30" rows="3" required="required" title="' . _('Enter a description of this requirement for the contract') . '" >' . $ContractComponent->Requirement . '</textarea></td> + <td><input type="text" class="number" required="required" title="' . _('Enter the quantity of this requirement for the contract') . '" name="Qty' . $ContractReqtID . '" size="11" value="' . locale_number_format($ContractComponent->Quantity,'Variable') . '" /></td> + <td><input type="text" class="number" name="CostPerUnit' . $ContractReqtID . '" size="11" required="required" value="' . locale_number_format($ContractComponent->CostPerUnit,$_SESSION['CompanyRecord']['decimalplaces']) . '" /></td> <td class="number">' . $DisplayLineTotal . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractReqtID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this contract requirement?') . '\');">' . _('Delete') . '</a></td> </tr>'; @@ -153,15 +153,15 @@ </tr> <tr> <td>' . _('Requirement Description') . '</td> - <td><textarea name="RequirementDescription" cols="30" rows="3">' . $_POST['RequirementDescription'] . '</textarea></td> + <td><textarea name="RequirementDescription" cols="30" rows="3" minlength="5" title="' . _('Enter a description of this requirement for the contract') . '" >' . $_POST['RequirementDescription'] . '</textarea></td> </tr> <tr> <td>' . _('Quantity Required') . ':</td> - <td><input type="text" class="number" name="Quantity" size="10" maxlength="10" value="' . $_POST['Quantity'] . '" /></td> + <td><input type="text" class="number" name="Quantity" required="required" title="' . _('Enter the quantity of this requirement for the contract') . '" size="10" maxlength="10" value="' . $_POST['Quantity'] . '" /></td> </tr> <tr> <td>' . _('Cost Per Unit') . ':</td> - <td><input type="text" class="number" name="CostPerUnit" size="10" maxlength="10" value="' . $_POST['CostPerUnit'] . '" /></td> + <td><input type="text" class="number" name="CostPerUnit" size="10" required="required" title="' . _('Enter the cost per unit of this requirement') . '" maxlength="10" value="' . $_POST['CostPerUnit'] . '" /></td> </tr> </table> Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/Contracts.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -84,8 +84,8 @@ /*User hit the button to enter line items - then meta refresh to Contract_Items.php*/ $InputError = false; - if(mb_strlen($_SESSION['Contract'.$identifier]->ContractRef)<2){ - prnMsg(_('The contract reference must be entered (and be longer than 2 characters) before the requirements of the contract can be setup'),'warn'); + if(mb_strlen($_SESSION['Contract'.$identifier]->ContractRef)<5){ + prnMsg(_('The contract reference must be entered (and be longer than 5 characters) before the requirements of the contract can be setup'),'warn'); $InputError = true; } @@ -755,17 +755,20 @@ echo '<table cellpadding="3" 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" autofocus="autofocus" 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" pattern="[a-zA-Z0-9_\-]*" title="' . _('Enter an extract of the customer code to search for. Customer codes can only contain alpha-numeric characters, underscore or hyphens') . '" 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="tel" name="CustPhone" size="15" maxlength="18" /></td> </tr> </table> - <br /><div class="centre"><input tabindex="4" type="submit" name="SearchCustomers" value="' . _('Search Now') . '" /> - <input tabindex="5" type="submit" name="reset" value="' . _('Reset') .'" /></div>'; + <br /> + <div class="centre"> + <input tabindex="4" type="submit" name="SearchCustomers" value="' . _('Search Now') . '" /> + <input tabindex="5" type="submit" name="reset" value="' . _('Reset') .'" /> + </div>'; if (isset($result_CustSelect)) { @@ -838,13 +841,14 @@ <td>'; if ($_SESSION['Contract'.$identifier]->Status==0) { /*Then the contract has not become an order yet and we can allow changes to the ContractRef */ - echo '<input type="text" name="ContractRef" size="21" maxlength="20" value="' . $_SESSION['Contract'.$identifier]->ContractRef . '" />'; + echo '<input type="text" name="ContractRef" autofocus="autofocus" required="required" size="21" title="' . _('Enter the contract reference. This reference will be used as the item code so no more than 20 alpha-numeric characters or underscore') . '" pattern="[a-zA-Z0-9_]*" maxlength="20" value="' . $_SESSION['Contract'.$identifier]->ContractRef . '" />'; } else { /*Just show the contract Ref - dont allow modification */ - echo '<input type="hidden" name="ContractRef" value="' . $_SESSION['Contract'.$identifier]->ContractRef . '" />' . $_SESSION['Contract'.$identifier]->ContractRef; + echo '<input type="hidden" name="ContractRef" title="' . _('Enter the contract reference. This reference will be used as the item code so no more than 20 alpha-numeric characters or underscore') . '" pattern="[a-zA-Z0-9_]*" value="' . $_SESSION['Contract'.$identifier]->ContractRef . '" />' . $_SESSION['Contract'.$identifier]->ContractRef; } - echo '</td></tr>'; - echo '<tr> + echo '</td> + </tr> + <tr> <td>' . _('Category') . ':</td> <td><select name="CategoryID" >'; @@ -907,7 +911,7 @@ </tr> <tr> <td>' . _('Contract Description') . ':</td> - <td><textarea name="ContractDescription" style="width:100%" rows="5" cols="40">' . $_SESSION['Contract'.$identifier]->ContractDescription . '</textarea></td> + <td><textarea name="ContractDescription" style="width:100%" required="required" title="' . _('A description of the contract is required') . '" minlength="5" rows="5" cols="40">' . $_SESSION['Contract'.$identifier]->ContractDescription . '</textarea></td> </tr><tr> <td>'. _('Drawing File') . ' .jpg' . ' ' . _('format only') .':</td> <td><input type="file" id="Drawing" name="Drawing" /></td> @@ -919,25 +923,25 @@ echo '<tr> <td>' . _('Required Date') . ':</td> - <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="RequiredDate" size="11" value="' . $_SESSION['Contract'.$identifier]->RequiredDate . '" /></td> + <td><input type="text" required="required" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="RequiredDate" size="11" value="' . $_SESSION['Contract'.$identifier]->RequiredDate . '" /></td> </tr>'; echo '<tr> <td>' . _('Customer Reference') . ':</td> - <td><input type="text" name="CustomerRef" size="21" maxlength="20" value="' . $_SESSION['Contract'.$identifier]->CustomerRef . '" /></td> + <td><input type="text" name="CustomerRef" required="required" title="' . _('Enter the reference that the customer uses for this contract') . '" size="21" maxlength="20" value="' . $_SESSION['Contract'.$identifier]->CustomerRef . '" /></td> </tr>'; if (!isset($_SESSION['Contract'.$identifier]->Margin)){ $_SESSION['Contract'.$identifier]->Margin =50; } echo '<tr> <td>' . _('Gross Profit') . ' %:</td> - <td><input class="number" type="text" name="Margin" size="6" maxlength="6" value="' . locale_number_format($_SESSION['Contract'.$identifier]->Margin, 2) . '" /></td> + <td><input class="number" type="text" name="Margin" required="required" size="6" maxlength="6" value="' . locale_number_format($_SESSION['Contract'.$identifier]->Margin, 2) . '" /></td> </tr>'; if ($_SESSION['CompanyRecord']['currencydefault'] != $_SESSION['Contract'.$identifier]->CurrCode){ echo '<tr> <td>' . $_SESSION['Contract'.$identifier]->CurrCode . ' ' . _('Exchange Rate') . ':</td> - <td><input class="number" type="text" name="ExRate" size="10" maxlength="10" value="' . locale_number_format($_SESSION['Contract'.$identifier]->ExRate,'Variable') . '" /></td> + <td><input class="number" type="text" name="ExRate" required="required" title="' . _('The exchange rate between the customer\'s currency and the functional currency of the business must be entered') . '" size="10" maxlength="10" value="' . locale_number_format($_SESSION['Contract'.$identifier]->ExRate,'Variable') . '" /></td> </tr>'; } else { echo '<input type="hidden" name="ExRate" value="' . locale_number_format($_SESSION['Contract'.$identifier]->ExRate,'Variable') . '" />'; Modified: trunk/CopyBOM.php =================================================================== --- trunk/CopyBOM.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/CopyBOM.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -177,7 +177,7 @@ </tr>'; echo '<tr> <td><input type="radio" name="NewOrExisting" value="N" />' . _(' To New Stock ID') . '</td>'; - echo '<td><input type="text" maxlength="20" name="ToStockID" /></td></tr>'; + echo '<td><input type="text" maxlength="20" autofocus="autofocus" pattern="[a-zA-Z0-9_\-]*" name="ToStockID" title="' . _('Enter a new item code to copy the existing item and its bill of material to. Item codes can contain only alpha-numeric characters, underscore or hyphens.') . '" /></td></tr>'; $sql = "SELECT stockid, description @@ -188,7 +188,7 @@ if (DB_num_rows($result) > 0) { echo '<tr> - <td><input type="radio" name="NewOrExisting" value="E" />'._('To Existing Stock ID') . '</td><td>'; + <td><input type="radio" name="NewOrExisting" checked="checked" value="E" />'._('To Existing Stock ID') . '</td><td>'; echo '<select name="ExStockID">'; while($myrow = DB_fetch_row($result)) { echo '<option value="'.$myrow[0].'">'.$myrow[0].' -- '.$myrow[1].'</option>'; Modified: trunk/CounterReturns.php ==========================================================... [truncated message content] |