|
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>' . $R...
[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($_SESSIO...
[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` (`userresp...
[truncated message content] |
|
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...
[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:...
[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] = 'RegOff...
[truncated message content] |