|
From: <dai...@us...> - 2014-02-15 05:01:52
|
Revision: 6578
http://sourceforge.net/p/web-erp/reponame/6578
Author: daintree
Date: 2014-02-15 05:01:48 +0000 (Sat, 15 Feb 2014)
Log Message:
-----------
15/2/14 Phil: Stock check comparison report now shows the bin location after the item code
15/2/14 Phil: Customer statement now shows bank account number for payments based on the defined default bank account
Modified Paths:
--------------
trunk/PDFStockCheckComparison.php
trunk/PrintCustStatements.php
trunk/doc/Change.log
trunk/includes/PDFStockCheckPageHeader.inc
Modified: trunk/PDFStockCheckComparison.php
===================================================================
--- trunk/PDFStockCheckComparison.php 2014-02-15 02:13:34 UTC (rev 6577)
+++ trunk/PDFStockCheckComparison.php 2014-02-15 05:01:48 UTC (rev 6578)
@@ -188,13 +188,17 @@
stockcheckfreeze.loccode,
locations.locationname,
stockcheckfreeze.qoh,
- stockmaster.decimalplaces
+ stockmaster.decimalplaces,
+ bin
FROM stockcheckfreeze INNER JOIN stockmaster
ON stockcheckfreeze.stockid=stockmaster.stockid
+ INNER JOIN stockcategory
+ ON stockmaster.categoryid=stockcategory.categoryid
INNER JOIN locations
ON stockcheckfreeze.loccode=locations.loccode
- INNER JOIN stockcategory
- ON stockmaster.categoryid=stockcategory.categoryid
+ INNER JOIN locstock
+ ON stockcheckfreeze.loccode=locstock.loccode
+ AND stockcheckfreeze.stockid=locstock.stockid
ORDER BY stockcheckfreeze.loccode,
stockmaster.categoryid,
stockcheckfreeze.stockid";
@@ -272,7 +276,11 @@
if ($CheckItemRow['qoh']!=0 OR DB_num_rows($Counts)>0) {
$YPos -=$line_height;
$FontSize=8;
- $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,120,$FontSize,$CheckItemRow['stockid'], 'left');
+ if (mb_strlen($CheckItemRow['bin'])>0){
+ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,120,$FontSize,$CheckItemRow['stockid'] . ' - ' . _('Bin:') . $CheckItemRow['bin'], 'left');
+ } else {
+ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,120,$FontSize,$CheckItemRow['stockid'], 'left');
+ }
$LeftOvers = $pdf->addTextWrap(135,$YPos,180,$FontSize,$CheckItemRow['description'], 'left');
$LeftOvers = $pdf->addTextWrap(315,$YPos,60,$FontSize,locale_number_format($CheckItemRow['qoh'],$CheckItemRow['decimalplaces']), 'right');
}
Modified: trunk/PrintCustStatements.php
===================================================================
--- trunk/PrintCustStatements.php 2014-02-15 02:13:34 UTC (rev 6577)
+++ trunk/PrintCustStatements.php 2014-02-15 05:01:48 UTC (rev 6578)
@@ -49,6 +49,25 @@
$FirstStatement = True;
+
+ // check if the user has set a default bank account for invoices, if not leave it blank
+ $sql = "SELECT bankaccounts.invoice,
+ bankaccounts.bankaccountnumber,
+ bankaccounts.bankaccountcode
+ FROM bankaccounts
+ WHERE bankaccounts.invoice = '1'";
+ $result=DB_query($sql,$db,'','',false,false);
+ if (DB_error_no($db)!=1) {
+ if (DB_num_rows($result)==1){
+ $myrow = DB_fetch_array($result);
+ $DefaultBankAccountNumber = $myrow['bankaccountnumber'];
+ } else {
+ $DefaultBankAccountNumber = '';
+ }
+ } else {
+ $DefaultBankAccountNumber = '';
+ }
+
/* Do a quick tidy up to settle any transactions that should have been settled at the time of allocation but for whatever reason weren't */
$ErrMsg = _('There was a problem settling the old transactions.');
$DbgMsg = _('The SQL used to settle outstanding transactions was');
@@ -397,6 +416,11 @@
' ' . _('Amount received was').' ' . locale_number_format($StmtHeader['lastpaid'],$StmtHeader['currdecimalplaces']));
}
+
+ /* Show the bank account details */
+ $pdf->addText($Perforation-250, $Bottom_Margin+32, $FontSize, _('Please make payments to our account:') . ' ' . $DefaultBankAccountNumber);
+ $pdf->addText($Perforation-250, $Bottom_Margin+32-$line_height, $FontSize, _('Quoting your account reference') . ' ' . $StmtHeader['debtorno'] );
+
/*also show the total due in the remittance section */
if ($AgedAnalysis['balance']>0){ /*No point showing a negative balance for payment! */
$FontSize=8;
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2014-02-15 02:13:34 UTC (rev 6577)
+++ trunk/doc/Change.log 2014-02-15 05:01:48 UTC (rev 6578)
@@ -1,5 +1,8 @@
webERP Change Log
+
15/2/14 Exson: Make perishable control available in WorkOrderReceive.php.
+15/2/14 Phil: Stock check comparison report now shows the bin location after the item code
+15/2/14 Phil: Customer statement now shows bank account number for payments based on the defined default bank account
15/2/14 Andrew Galuski: Reverse HTML5 input type="date" as this will not use the webERP javascript date picker used everywhere else - better be consistent as html5 date picker functionality varies between browsers - AddCustomerNotes.php and AddCustomerTypeNotes.php
15/2/14 Vitaly: Fix PO_SelectOSPurchOrder.php date selection functionality
15/2/14 Phil: Fixed POSDataCreation script to send all current prices in the POS currency including debtorno info so the POS can now deal with customer specific prices correctly.
Modified: trunk/includes/PDFStockCheckPageHeader.inc
===================================================================
--- trunk/includes/PDFStockCheckPageHeader.inc 2014-02-15 02:13:34 UTC (rev 6577)
+++ trunk/includes/PDFStockCheckPageHeader.inc 2014-02-15 05:01:48 UTC (rev 6578)
@@ -27,23 +27,15 @@
/*set up the headings */
$Xpos = $Left_Margin+1;
-/*draw vertical lines */
-$pdf->line(370, $YPos+$BoxHeight,370, $Bottom_Margin+24);
-
$LeftOvers = $pdf->addTextWrap($Xpos,$YPos,300-$Left_Margin,$FontSize,_('Item'), 'centre');
if (isset($_POST['ShowInfo']) and $_POST['ShowInfo']==true){
- /*draw vertical lines */
- $pdf->line(415, $YPos-$line_height,415, $Bottom_Margin+24);
- $pdf->line(475, $YPos-$line_height,475, $Bottom_Margin+24);
$LeftOvers = $pdf->addTextWrap(341,$YPos,60,$FontSize,_('QOH'), 'centre');
$LeftOvers = $pdf->addTextWrap(341+61,$YPos,80,$FontSize,_('Cust Ords'), 'centre');
$LeftOvers = $pdf->addTextWrap(341+61+61,$YPos,80,$FontSize,_('Available'), 'centre');
} else {
- /*draw vertical lines */
- $pdf->line(435, $YPos+$BoxHeight,435, $Bottom_Margin+24);
$LeftOvers = $pdf->addTextWrap(371,$YPos,60,$FontSize,_('Quantity'), 'centre');
$LeftOvers = $pdf->addTextWrap(341+61+61,$YPos,80,$FontSize,_('Remarks'), 'centre');
}
$FontSize=10;
$YPos -=($line_height);
-?>
\ No newline at end of file
+?>
|