From: <tim...@us...> - 2012-01-19 13:30:31
|
Revision: 4817 http://web-erp.svn.sourceforge.net/web-erp/?rev=4817&view=rev Author: tim_schofield Date: 2012-01-19 13:30:22 +0000 (Thu, 19 Jan 2012) Log Message: ----------- Merge Tims branch into trunk: Fix xhtml errors Modified Paths: -------------- trunk/CustomerInquiry.php Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2012-01-19 13:16:07 UTC (rev 4816) +++ trunk/CustomerInquiry.php 2012-01-19 13:30:22 UTC (rev 4817) @@ -91,21 +91,21 @@ $NIL_BALANCE = True; - $SQL = "SELECT debtorsmaster.name, + $SQL = "SELECT debtorsmaster.name, currencies.currency, currencies.decimalplaces, paymentterms.terms, - debtorsmaster.creditlimit, - holdreasons.dissallowinvoices, + debtorsmaster.creditlimit, + holdreasons.dissallowinvoices, holdreasons.reasondescription FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms = paymentterms.termsindicator INNER JOIN holdreasons - ON debtorsmaster.holdreason = holdreasons.reasoncode - INNER JOIN currencies + ON debtorsmaster.holdreason = holdreasons.reasoncode + INNER JOIN currencies ON debtorsmaster.currcode = currencies.currabrev WHERE debtorsmaster.debtorno = '" . $CustomerID . "'"; - + $ErrMsg =_('The customer details could not be retrieved by the SQL because'); $CustomerResult = DB_query($SQL,$db,$ErrMsg); @@ -122,13 +122,13 @@ $CustomerRecord['overdue2']=0; } - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . - _('Customer') . '" alt="" />' . ' ' . _('Customer') . ' : ' . $CustomerRecord['name'] . ' - (' . _('All amounts stated in') . + echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer') . ' : ' . $CustomerRecord['name'] . ' - (' . _('All amounts stated in') . ' ' . $CustomerRecord['currency'] . ')<br /><br />' . _('Terms') . ' : ' . $CustomerRecord['terms'] . '<br />' . _('Credit Limit') . ': ' . locale_number_format($CustomerRecord['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $CustomerRecord['reasondescription'] . '</p>'; if ($CustomerRecord['dissallowinvoices']!=0){ - echo '<br /><font color=RED size=4><b>' . _('ACCOUNT ON HOLD') . '</font></b><br />'; + echo '<br /><font color="red" size="4"><b>' . _('ACCOUNT ON HOLD') . '</font></b><br />'; } echo '<table class="selection" width="70%"> @@ -152,7 +152,7 @@ <div class="centre"> <form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method=post> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />' - . _('Show all transactions after') . ': <input tabindex=1 type="text" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" id="datepicker" name="TransAfterDate" value="' . $_POST['TransAfterDate'] . '" maxlength="10" size="12" /> + . _('Show all transactions after') . ': <input tabindex="1" type="text" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" id="datepicker" name="TransAfterDate" value="' . $_POST['TransAfterDate'] . '" maxlength="10" size="12" /> <input tabindex="2" type="submit" name="Refresh Inquiry" value="' . _('Refresh Inquiry') . '" /> </div> </form> @@ -223,13 +223,13 @@ } $FormatedTranDate = ConvertSQLDate($myrow['trandate']); - + if ($_SESSION['InvoicePortraitFormat']==1){ //Invoice/credits in portrait $PrintCustomerTransactionScript = 'PrintCustTransPortrait.php'; } else { //produce pdfs in landscape $PrintCustomerTransactionScript = 'PrintCustTrans.php'; } - + $BaseFormatString = '<td>%s</td> <td>%s</td> <td>%s</td> @@ -240,29 +240,30 @@ <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td>'; - - $CreditInvoiceFormatString = '<td><a href="%s/Credit_Invoice.php?InvoiceNumber=%s">' . _('Credit ') .'<img src="%s/credit.gif" title="' . _('Click to credit the invoice') . '"></a></td>'; - - $PreviewInvoiceFormatString = '<td><a href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice">' . _('HTML ') . '<img src="%s/preview.gif" title="' . _('Click to preview the invoice') . '"></a></td> - <td><a href="%s/%s?FromTransNo=%s&InvOrCredit=Invoice&PrintPDF=True">' . _('PDF ') . '<img src="%s/css/' . $theme . '/images/pdf.png" title="' . _('Click for PDF') . '"></a></td> - <td><a href="%s/EmailCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice">' . _('Email ') . '<img src="%s/email.gif" title="' . _('Click to email the invoice') . '"></a></td>'; - - $PreviewCreditFormatString = '<td><a href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Credit">' . _('HTML ') . ' <IMG SRC="%s/preview.gif" title="' . _('Click to preview the credit note') . '"></a></td> - <td><a href="%s/%s?FromTransNo=%s&InvOrCredit=Credit&PrintPDF=True">' . _('PDF ') . '<img src="%s/css/' . $theme . '/images/pdf.png" title="' . _('Click for PDF') . '"></a></td> - <td><a href="%s/EmailCustTrans.php?FromTransNo=%s&InvOrCredit=Credit">' . _('Email') . ' <img src="%s/email.gif" title="' . _('Click to email the credit note') . '"></a></td>'; + $CreditInvoiceFormatString = '<td><a href="%s/Credit_Invoice.php?InvoiceNumber=%s">' . _('Credit ') .'<img src="%s/credit.gif" title="' . _('Click to credit the invoice') . '" /></a></td>'; + + $PreviewInvoiceFormatString = '<td><a href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice">' . _('HTML ') . '<img src="%s/preview.gif" title="' . _('Click to preview the invoice') . '" /></a></td> + <td><a href="%s/%s?FromTransNo=%s&InvOrCredit=Invoice&PrintPDF=True">' . _('PDF ') . '<img src="%s/css/' . $theme . '/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> + <td><a href="%s/EmailCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice">' . _('Email ') . '<img src="%s/email.gif" title="' . _('Click to email the invoice') . '" /></a></td>'; + + $PreviewCreditFormatString = '<td><a href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Credit">' . _('HTML ') . ' <IMG SRC="%s/preview.gif" title="' . _('Click to preview the credit note') . '" /></a></td> + <td><a href="%s/%s?FromTransNo=%s&InvOrCredit=Credit&PrintPDF=True">' . _('PDF ') . '<img src="%s/css/' . $theme . '/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> + <td><a href="%s/EmailCustTrans.php?FromTransNo=%s&InvOrCredit=Credit">' . _('Email') . ' <img src="%s/email.gif" title="' . _('Click to email the credit note') . '" /></a></td>'; + /* assumed allowed page security token 3 allows the user to create credits for invoices */ - if (in_array(3,$_SESSION['AllowedPageSecurityTokens']) && $myrow['type']==10){ + if (in_array(3,$_SESSION['AllowedPageSecurityTokens']) && $myrow['type']==10){ /*Show a link to allow an invoice to be credited */ /* assumed allowed page security token 8 allows the user to see GL transaction information */ if ($_SESSION['CompanyRecord']['gllink_debtors']== 1 AND in_array(8,$_SESSION['AllowedPageSecurityTokens'])){ - + /* format string with GL inquiry options and for invoice to be credited */ - + printf($BaseFormatString . $CreditInvoiceFormatString . $PreviewInvoiceFormatString . - '<td><a href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' <img src="' .$rootpath. '/css/'.$theme.'/images/gl.png" title="' . _('View the GL Entries') . '"></a></td> + '<td><a href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' + <img src="' .$rootpath. '/css/'.$theme.'/images/gl.png" title="' . _('View the GL Entries') . '" /></a></td> </tr>', //$BaseFormatString parameters $myrow['typename'], @@ -295,7 +296,7 @@ $myrow['type'], $myrow['transno']); } else { //user does not have privileges to see GL inquiry stuff - + printf($BaseFormatString . $CreditInvoiceFormatString . $PreviewInvoiceFormatString . '</tr>', //BaseFormatString parameters $myrow['typename'], @@ -357,8 +358,8 @@ if ($_SESSION['CompanyRecord']['gllink_debtors']== 1 AND in_array(8,$_SESSION['AllowedPageSecurityTokens'])){ printf($BaseFormatString . $PreviewCreditFormatString . - '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath .'/css/' . $theme .'/images/allocation.png" title="' . _('Click to allocate funds') . '"></a></td> - <td><a href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' <a><img src="' .$rootpath.'/css/'.$theme.'/images/gl.png" title="' . _('View the GL Entries') . '"></a></td></tr>', + '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath .'/css/' . $theme .'/images/allocation.png" title="' . _('Click to allocate funds') . '" /></a></td> + <td><a href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' <a><img src="' .$rootpath.'/css/'.$theme.'/images/gl.png" title="' . _('View the GL Entries') . '" /></a></td></tr>', //$BaseFormatString parameters $myrow['typename'], $myrow['transno'], @@ -390,7 +391,7 @@ } else { printf($BaseFormatString . $PreviewCreditFormatString . - '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="%s/allocation.png" title="' . _('Click to allocate funds') . '"></a></td> + '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="%s/allocation.png" title="' . _('Click to allocate funds') . '" /></a></td> </tr>', $myrow['typename'], $myrow['transno'], @@ -413,18 +414,18 @@ $rootpath, $myrow['transno'], $rootpath.'/css/'.$theme.'/images', - //Parameters for hand coded string to show allocations + //Parameters for hand coded string to show allocations $rootpath, $myrow['id'], $rootpath.'/css/'.$theme.'/images'); } } elseif ($myrow['type']==12 AND $myrow['totalamount']<0) { /*its a receipt which could have an allocation*/ - + //If security token 8 in the allowed page security tokens then assumed ok for GL trans inquiries if ($_SESSION['CompanyRecord']['gllink_debtors']== 1 AND in_array(8,$_SESSION['AllowedPageSecurityTokens'])){ printf($BaseFormatString . - '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath . '/css/' . $theme .'/images/allocation.png" title="' . _('Click to allocate funds') . '"></a></td> - <td><a href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' <img src="' .$rootpath . '/css/' . $theme .'/images/gl.png" title="' . _('View the GL Entries') . '"></a></td> + '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath . '/css/' . $theme .'/images/allocation.png" title="' . _('Click to allocate funds') . '" /></a></td> + <td><a href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' <img src="' .$rootpath . '/css/' . $theme .'/images/gl.png" title="' . _('View the GL Entries') . '" /></a></td> </tr>', $myrow['typename'], $myrow['transno'], @@ -443,7 +444,7 @@ $myrow['transno']); } else { //no permission for GLTrans Inquiries printf($BaseFormatString . - '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath . '/css/' . $theme .'/images/allocation.png" title="' . _('Click to allocate funds') . '"></a></td> + '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath . '/css/' . $theme .'/images/allocation.png" title="' . _('Click to allocate funds') . '" /></a></td> </tr>', $myrow['typename'], $myrow['transno'], @@ -459,7 +460,7 @@ $myrow['id']); } } elseif ($myrow['type']==12 AND $myrow['totalamount']>0) { /*its a negative receipt */ - + //If security token 8 in the allowed page security tokens then assumed ok for GL trans inquiries if ($_SESSION['CompanyRecord']['gllink_debtors']== 1 AND in_array(8,$_SESSION['AllowedPageSecurityTokens'])){ printf($BaseFormatString . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-01-19 13:30:33
|
Revision: 4817 http://web-erp.svn.sourceforge.net/web-erp/?rev=4817&view=rev Author: tim_schofield Date: 2012-01-19 13:30:22 +0000 (Thu, 19 Jan 2012) Log Message: ----------- Merge Tims branch into trunk: Fix xhtml errors Modified Paths: -------------- trunk/CustomerInquiry.php Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2012-01-19 13:16:07 UTC (rev 4816) +++ trunk/CustomerInquiry.php 2012-01-19 13:30:22 UTC (rev 4817) @@ -91,21 +91,21 @@ $NIL_BALANCE = True; - $SQL = "SELECT debtorsmaster.name, + $SQL = "SELECT debtorsmaster.name, currencies.currency, currencies.decimalplaces, paymentterms.terms, - debtorsmaster.creditlimit, - holdreasons.dissallowinvoices, + debtorsmaster.creditlimit, + holdreasons.dissallowinvoices, holdreasons.reasondescription FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms = paymentterms.termsindicator INNER JOIN holdreasons - ON debtorsmaster.holdreason = holdreasons.reasoncode - INNER JOIN currencies + ON debtorsmaster.holdreason = holdreasons.reasoncode + INNER JOIN currencies ON debtorsmaster.currcode = currencies.currabrev WHERE debtorsmaster.debtorno = '" . $CustomerID . "'"; - + $ErrMsg =_('The customer details could not be retrieved by the SQL because'); $CustomerResult = DB_query($SQL,$db,$ErrMsg); @@ -122,13 +122,13 @@ $CustomerRecord['overdue2']=0; } - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . - _('Customer') . '" alt="" />' . ' ' . _('Customer') . ' : ' . $CustomerRecord['name'] . ' - (' . _('All amounts stated in') . + echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer') . ' : ' . $CustomerRecord['name'] . ' - (' . _('All amounts stated in') . ' ' . $CustomerRecord['currency'] . ')<br /><br />' . _('Terms') . ' : ' . $CustomerRecord['terms'] . '<br />' . _('Credit Limit') . ': ' . locale_number_format($CustomerRecord['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $CustomerRecord['reasondescription'] . '</p>'; if ($CustomerRecord['dissallowinvoices']!=0){ - echo '<br /><font color=RED size=4><b>' . _('ACCOUNT ON HOLD') . '</font></b><br />'; + echo '<br /><font color="red" size="4"><b>' . _('ACCOUNT ON HOLD') . '</font></b><br />'; } echo '<table class="selection" width="70%"> @@ -152,7 +152,7 @@ <div class="centre"> <form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method=post> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />' - . _('Show all transactions after') . ': <input tabindex=1 type="text" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" id="datepicker" name="TransAfterDate" value="' . $_POST['TransAfterDate'] . '" maxlength="10" size="12" /> + . _('Show all transactions after') . ': <input tabindex="1" type="text" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" id="datepicker" name="TransAfterDate" value="' . $_POST['TransAfterDate'] . '" maxlength="10" size="12" /> <input tabindex="2" type="submit" name="Refresh Inquiry" value="' . _('Refresh Inquiry') . '" /> </div> </form> @@ -223,13 +223,13 @@ } $FormatedTranDate = ConvertSQLDate($myrow['trandate']); - + if ($_SESSION['InvoicePortraitFormat']==1){ //Invoice/credits in portrait $PrintCustomerTransactionScript = 'PrintCustTransPortrait.php'; } else { //produce pdfs in landscape $PrintCustomerTransactionScript = 'PrintCustTrans.php'; } - + $BaseFormatString = '<td>%s</td> <td>%s</td> <td>%s</td> @@ -240,29 +240,30 @@ <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td>'; - - $CreditInvoiceFormatString = '<td><a href="%s/Credit_Invoice.php?InvoiceNumber=%s">' . _('Credit ') .'<img src="%s/credit.gif" title="' . _('Click to credit the invoice') . '"></a></td>'; - - $PreviewInvoiceFormatString = '<td><a href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice">' . _('HTML ') . '<img src="%s/preview.gif" title="' . _('Click to preview the invoice') . '"></a></td> - <td><a href="%s/%s?FromTransNo=%s&InvOrCredit=Invoice&PrintPDF=True">' . _('PDF ') . '<img src="%s/css/' . $theme . '/images/pdf.png" title="' . _('Click for PDF') . '"></a></td> - <td><a href="%s/EmailCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice">' . _('Email ') . '<img src="%s/email.gif" title="' . _('Click to email the invoice') . '"></a></td>'; - - $PreviewCreditFormatString = '<td><a href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Credit">' . _('HTML ') . ' <IMG SRC="%s/preview.gif" title="' . _('Click to preview the credit note') . '"></a></td> - <td><a href="%s/%s?FromTransNo=%s&InvOrCredit=Credit&PrintPDF=True">' . _('PDF ') . '<img src="%s/css/' . $theme . '/images/pdf.png" title="' . _('Click for PDF') . '"></a></td> - <td><a href="%s/EmailCustTrans.php?FromTransNo=%s&InvOrCredit=Credit">' . _('Email') . ' <img src="%s/email.gif" title="' . _('Click to email the credit note') . '"></a></td>'; + $CreditInvoiceFormatString = '<td><a href="%s/Credit_Invoice.php?InvoiceNumber=%s">' . _('Credit ') .'<img src="%s/credit.gif" title="' . _('Click to credit the invoice') . '" /></a></td>'; + + $PreviewInvoiceFormatString = '<td><a href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice">' . _('HTML ') . '<img src="%s/preview.gif" title="' . _('Click to preview the invoice') . '" /></a></td> + <td><a href="%s/%s?FromTransNo=%s&InvOrCredit=Invoice&PrintPDF=True">' . _('PDF ') . '<img src="%s/css/' . $theme . '/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> + <td><a href="%s/EmailCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice">' . _('Email ') . '<img src="%s/email.gif" title="' . _('Click to email the invoice') . '" /></a></td>'; + + $PreviewCreditFormatString = '<td><a href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Credit">' . _('HTML ') . ' <IMG SRC="%s/preview.gif" title="' . _('Click to preview the credit note') . '" /></a></td> + <td><a href="%s/%s?FromTransNo=%s&InvOrCredit=Credit&PrintPDF=True">' . _('PDF ') . '<img src="%s/css/' . $theme . '/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> + <td><a href="%s/EmailCustTrans.php?FromTransNo=%s&InvOrCredit=Credit">' . _('Email') . ' <img src="%s/email.gif" title="' . _('Click to email the credit note') . '" /></a></td>'; + /* assumed allowed page security token 3 allows the user to create credits for invoices */ - if (in_array(3,$_SESSION['AllowedPageSecurityTokens']) && $myrow['type']==10){ + if (in_array(3,$_SESSION['AllowedPageSecurityTokens']) && $myrow['type']==10){ /*Show a link to allow an invoice to be credited */ /* assumed allowed page security token 8 allows the user to see GL transaction information */ if ($_SESSION['CompanyRecord']['gllink_debtors']== 1 AND in_array(8,$_SESSION['AllowedPageSecurityTokens'])){ - + /* format string with GL inquiry options and for invoice to be credited */ - + printf($BaseFormatString . $CreditInvoiceFormatString . $PreviewInvoiceFormatString . - '<td><a href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' <img src="' .$rootpath. '/css/'.$theme.'/images/gl.png" title="' . _('View the GL Entries') . '"></a></td> + '<td><a href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' + <img src="' .$rootpath. '/css/'.$theme.'/images/gl.png" title="' . _('View the GL Entries') . '" /></a></td> </tr>', //$BaseFormatString parameters $myrow['typename'], @@ -295,7 +296,7 @@ $myrow['type'], $myrow['transno']); } else { //user does not have privileges to see GL inquiry stuff - + printf($BaseFormatString . $CreditInvoiceFormatString . $PreviewInvoiceFormatString . '</tr>', //BaseFormatString parameters $myrow['typename'], @@ -357,8 +358,8 @@ if ($_SESSION['CompanyRecord']['gllink_debtors']== 1 AND in_array(8,$_SESSION['AllowedPageSecurityTokens'])){ printf($BaseFormatString . $PreviewCreditFormatString . - '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath .'/css/' . $theme .'/images/allocation.png" title="' . _('Click to allocate funds') . '"></a></td> - <td><a href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' <a><img src="' .$rootpath.'/css/'.$theme.'/images/gl.png" title="' . _('View the GL Entries') . '"></a></td></tr>', + '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath .'/css/' . $theme .'/images/allocation.png" title="' . _('Click to allocate funds') . '" /></a></td> + <td><a href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' <a><img src="' .$rootpath.'/css/'.$theme.'/images/gl.png" title="' . _('View the GL Entries') . '" /></a></td></tr>', //$BaseFormatString parameters $myrow['typename'], $myrow['transno'], @@ -390,7 +391,7 @@ } else { printf($BaseFormatString . $PreviewCreditFormatString . - '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="%s/allocation.png" title="' . _('Click to allocate funds') . '"></a></td> + '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="%s/allocation.png" title="' . _('Click to allocate funds') . '" /></a></td> </tr>', $myrow['typename'], $myrow['transno'], @@ -413,18 +414,18 @@ $rootpath, $myrow['transno'], $rootpath.'/css/'.$theme.'/images', - //Parameters for hand coded string to show allocations + //Parameters for hand coded string to show allocations $rootpath, $myrow['id'], $rootpath.'/css/'.$theme.'/images'); } } elseif ($myrow['type']==12 AND $myrow['totalamount']<0) { /*its a receipt which could have an allocation*/ - + //If security token 8 in the allowed page security tokens then assumed ok for GL trans inquiries if ($_SESSION['CompanyRecord']['gllink_debtors']== 1 AND in_array(8,$_SESSION['AllowedPageSecurityTokens'])){ printf($BaseFormatString . - '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath . '/css/' . $theme .'/images/allocation.png" title="' . _('Click to allocate funds') . '"></a></td> - <td><a href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' <img src="' .$rootpath . '/css/' . $theme .'/images/gl.png" title="' . _('View the GL Entries') . '"></a></td> + '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath . '/css/' . $theme .'/images/allocation.png" title="' . _('Click to allocate funds') . '" /></a></td> + <td><a href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Entries') . ' <img src="' .$rootpath . '/css/' . $theme .'/images/gl.png" title="' . _('View the GL Entries') . '" /></a></td> </tr>', $myrow['typename'], $myrow['transno'], @@ -443,7 +444,7 @@ $myrow['transno']); } else { //no permission for GLTrans Inquiries printf($BaseFormatString . - '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath . '/css/' . $theme .'/images/allocation.png" title="' . _('Click to allocate funds') . '"></a></td> + '<td><a href="%s/CustomerAllocations.php?AllocTrans=%s">' . _('Allocation') . '<img src="' .$rootpath . '/css/' . $theme .'/images/allocation.png" title="' . _('Click to allocate funds') . '" /></a></td> </tr>', $myrow['typename'], $myrow['transno'], @@ -459,7 +460,7 @@ $myrow['id']); } } elseif ($myrow['type']==12 AND $myrow['totalamount']>0) { /*its a negative receipt */ - + //If security token 8 in the allowed page security tokens then assumed ok for GL trans inquiries if ($_SESSION['CompanyRecord']['gllink_debtors']== 1 AND in_array(8,$_SESSION['AllowedPageSecurityTokens'])){ printf($BaseFormatString . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rc...@us...> - 2013-12-07 19:52:32
|
Revision: 6483 http://sourceforge.net/p/web-erp/reponame/6483 Author: rchacon Date: 2013-12-07 19:52:28 +0000 (Sat, 07 Dec 2013) Log Message: ----------- Shows customer code in the page title text. Modified Paths: -------------- trunk/CustomerInquiry.php Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2013-12-07 07:38:51 UTC (rev 6482) +++ trunk/CustomerInquiry.php 2013-12-07 19:52:28 UTC (rev 6483) @@ -95,7 +95,8 @@ $NIL_BALANCE = True; - $SQL = "SELECT debtorsmaster.name, + $SQL = "SELECT debtorsmaster.name, + debtorsmaster.currcode, currencies.currency, currencies.decimalplaces, paymentterms.terms, @@ -104,10 +105,10 @@ holdreasons.reasondescription FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms = paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev INNER JOIN holdreasons ON debtorsmaster.holdreason = holdreasons.reasoncode - INNER JOIN currencies - ON debtorsmaster.currcode = currencies.currabrev WHERE debtorsmaster.debtorno = '" . $CustomerID . "'"; $ErrMsg =_('The customer details could not be retrieved by the SQL because'); @@ -125,14 +126,20 @@ $CustomerRecord['overdue1']=0; $CustomerRecord['overdue2']=0; } +include('includes/CurrenciesArray.php'); // To get the currency name. +echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/customer.png" title="' . _('Customer') . '" alt="" /> ' . + _('Customer') . ': ' . + $CustomerID . ' - ' . $CustomerRecord['name'] . '<br />' . + _('All amounts stated in') . ': ' . + $CustomerRecord['currency'] . '<br />' . // To be replaced by: +/* $CustomerRecord['currcode'] . ' - ' . $CurrenciesArray[$CustomerRecord['currcode']]['Currency'] . '<br />' . // <-- Replacement */ + _('Terms') . ': ' . + $CustomerRecord['terms'] . '<br />' . + _('Credit Limit') . ': ' . + locale_number_format($CustomerRecord['creditlimit'],0) . '<br />' . + _('Credit Status') . ': ' . + $CustomerRecord['reasondescription'] . '</p>'; - echo '<p class="page_title_text"> - <img src="'.$RootPath.'/css/'.$Theme.'/images/customer.png" title="' . _('Customer') . '" alt="" /> ' . _('Customer') . ' : ' . $CustomerRecord['name'] . ' - (' . _('All amounts stated in') . ' ' . $CustomerRecord['currency'] . ') - <br /> - <br />' . _('Terms') . ' : ' . $CustomerRecord['terms'] . ' - <br />' . _('Credit Limit') . ': ' . locale_number_format($CustomerRecord['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $CustomerRecord['reasondescription'] . ' - </p>'; - if ($CustomerRecord['dissallowinvoices']!=0){ echo '<br /><font color="red" size="4"><b>' . _('ACCOUNT ON HOLD') . '</font></b><br />'; } @@ -537,4 +544,4 @@ echo '</table>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> |
From: <ex...@us...> - 2014-09-11 02:14:58
|
Revision: 6872 http://sourceforge.net/p/web-erp/reponame/6872 Author: exsonqu Date: 2014-09-11 02:14:48 +0000 (Thu, 11 Sep 2014) Log Message: ----------- 11/09/14 Exson: Code tidy up to make it meet coding guidance in CustomerInquiry.php. Modified Paths: -------------- trunk/CustomerInquiry.php Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2014-09-11 02:07:59 UTC (rev 6871) +++ trunk/CustomerInquiry.php 2014-09-11 02:14:48 UTC (rev 6872) @@ -14,13 +14,13 @@ // always figure out the SQL required from the inputs available -if(!isset($_GET['CustomerID']) AND !isset($_SESSION['CustomerID'])){ +if(!isset($_GET['CustomerID']) AND !isset($_SESSION['CustomerID'])) { prnMsg(_('To display the enquiry a customer must first be selected from the customer selection screen'),'info'); echo '<br /><div class="centre"><a href="'. $RootPath . '/SelectCustomer.php?' . SID . '">' . _('Select a Customer to Inquire On') . '</a><br /></div>'; include('includes/footer.inc'); exit; } else { - if (isset($_GET['CustomerID'])){ + if (isset($_GET['CustomerID'])) { $_SESSION['CustomerID'] = $_GET['CustomerID']; } $CustomerID = $_SESSION['CustomerID']; @@ -106,7 +106,7 @@ $ErrMsg = _('The customer details could not be retrieved by the SQL because'); $CustomerResult = DB_query($SQL,$db,$ErrMsg); -if (DB_num_rows($CustomerResult)==0){ +if (DB_num_rows($CustomerResult)==0) { /*Because there is no balance - so just retrieve the header information about the customer - the choice is do one query to get the balance and transactions for those customers who have a balance and two queries for those who don't have a balance OR always do two queries - I opted for the former */ @@ -137,7 +137,7 @@ $CustomerRecord = DB_fetch_array($CustomerResult); -if ($NIL_BALANCE==True){ +if ($NIL_BALANCE==True) { $CustomerRecord['balance']=0; $CustomerRecord['due']=0; $CustomerRecord['overdue1']=0; @@ -157,7 +157,7 @@ _('Credit Status') . ': ' . $CustomerRecord['reasondescription'] . '</p>'; -if ($CustomerRecord['dissallowinvoices']!=0){ +if ($CustomerRecord['dissallowinvoices']!=0) { echo '<br /><font color="red" size="4"><b>' . _('ACCOUNT ON HOLD') . '</font></b><br />'; } @@ -251,9 +251,9 @@ echo '<table class="selection">'; $tableheader = '<tr> - <th>' . _('Type') . '</th> - <th>' . _('Number') . '</th> - <th>' . _('Date') . '</th> + <th class="assending">' . _('Type') . '</th> + <th class="assending">' . _('Number') . '</th> + <th class="ascending">' . _('Date') . '</th> <th>' . _('Branch') . '</th> <th>' . _('Reference') . '</th> <th>' . _('Comments') . '</th> @@ -271,15 +271,15 @@ echo $tableheader; $j = 1; -$k=0; //row colour counter +$k = 0;//row colour counter while ($myrow=DB_fetch_array($TransResult)) { - if ($k==1){ + if ($k==1) { echo '<tr class="EvenTableRows">'; - $k=0; + $k = 0; } else { echo '<tr class="OddTableRows">'; - $k=1; + $k = 1; } $FormatedTranDate = ConvertSQLDate($myrow['trandate']); |
From: <ex...@us...> - 2014-10-15 08:27:41
|
Revision: 6918 http://sourceforge.net/p/web-erp/reponame/6918 Author: exsonqu Date: 2014-10-15 08:27:33 +0000 (Wed, 15 Oct 2014) Log Message: ----------- 15/10/14 Exson: Fixed no receipt data displayed retrieved bugs for sales login in CustomerInquiry.php. Modified Paths: -------------- trunk/CustomerInquiry.php Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2014-10-14 09:35:11 UTC (rev 6917) +++ trunk/CustomerInquiry.php 2014-10-15 08:27:33 UTC (rev 6918) @@ -21,7 +21,32 @@ } $CustomerID = $_SESSION['CustomerID']; } +//Check if the users have proper authority +if ($_SESSION['SalesmanLogin'] != '') { + $ViewAllowed = false; + $sql = "SELECT salesman FROM custbranch WHERE debtorno = '" . $CustomerID . "'"; + $ErrMsg = _('Failed to retrieve sales data'); + $result = DB_query($sql,$db,$ErrMsg); + if(DB_num_rows($result)>0) { + while($myrow = DB_fetch_array($result)) { + if ($_SESSION['SalesmanLogin'] == $myrow['salesman']){ + $ViewAllowed = true; + } + } + } else { + prnMsg(_('There is no salesman data set for this debtor'),'error'); + include('includes/footer.inc'); + exit; + } + if (!$ViewAllowed){ + prnMsg(_('You have no authority to review this data'),'error'); + include('includes/footer.inc'); + exit; + } +} + + if (isset($_GET['Status'])) { if (is_numeric($_GET['Status'])) { $_POST['Status'] = $_GET['Status']; @@ -79,13 +104,8 @@ AND debtorsmaster.currcode = currencies.currabrev AND debtorsmaster.holdreason = holdreasons.reasoncode AND debtorsmaster.debtorno = '" . $CustomerID . "' - AND debtorsmaster.debtorno = debtortrans.debtorno"; - -if ($_SESSION['SalesmanLogin'] != '') { - $SQL .= " AND debtortrans.salesperson='" . $_SESSION['SalesmanLogin'] . "'"; -} - -$SQL .= " GROUP BY debtorsmaster.name, + AND debtorsmaster.debtorno = debtortrans.debtorno + GROUP BY debtorsmaster.name, currencies.currency, paymentterms.terms, paymentterms.daysbeforedue, @@ -211,14 +231,9 @@ LEFT JOIN salesorders ON salesorders.orderno=debtortrans.order_ WHERE debtortrans.debtorno = '" . $CustomerID . "' - AND debtortrans.trandate >= '" . $DateAfterCriteria . "'"; + AND debtortrans.trandate >= '" . $DateAfterCriteria . "' + ORDER BY debtortrans.id"; -if ($_SESSION['SalesmanLogin'] != '') { - $SQL .= " AND debtortrans.salesperson='" . $_SESSION['SalesmanLogin'] . "'"; -} - -$SQL .= " ORDER BY debtortrans.id"; - $ErrMsg = _('No transactions were returned by the SQL because'); $TransResult = DB_query($SQL, $ErrMsg); @@ -633,4 +648,4 @@ echo '</table>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> |
From: <dai...@us...> - 2015-02-08 02:17:22
|
Revision: 7138 http://sourceforge.net/p/web-erp/reponame/7138 Author: daintree Date: 2015-02-08 02:17:15 +0000 (Sun, 08 Feb 2015) Log Message: ----------- Change references to email.gif to email.png now Rafael deleted email.gif Modified Paths: -------------- trunk/CustomerInquiry.php Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2015-02-08 02:15:28 UTC (rev 7137) +++ trunk/CustomerInquiry.php 2015-02-08 02:17:15 UTC (rev 7138) @@ -317,7 +317,7 @@ </td> <td> <a href="', $RootPath, '/EmailCustTrans.php?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Invoice">', _('Email '), ' - <img src="', $RootPath, '/css/', $Theme, '/images/email.gif" title="', _('Click to email the invoice'), '" alt="" /> + <img src="', $RootPath, '/css/', $Theme, '/images/email.png" title="', _('Click to email the invoice'), '" alt="" /> </a> </td> <td> @@ -359,7 +359,7 @@ </td> <td> <a href="', $RootPath, '/EmailCustTrans.php?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Invoice">', _('Email ') . ' - <img src="', $RootPath, '/css/', $Theme, '/images/email.gif" title="', _('Click to email the invoice'), '" alt="" /> + <img src="', $RootPath, '/css/', $Theme, '/images/email.png" title="', _('Click to email the invoice'), '" alt="" /> </a> </td> <td></td> @@ -396,7 +396,7 @@ </td> <td> <a href="', $RootPath, '/EmailCustTrans.php?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Invoice">', _('Email ') . ' - <img src="', $RootPath, '/css/', $Theme, '/images/email.gif" title="', _('Click to email the invoice'), '" alt="" /> + <img src="', $RootPath, '/css/', $Theme, '/images/email.png" title="', _('Click to email the invoice'), '" alt="" /> </a> </td> <td></td> @@ -430,7 +430,7 @@ </td> <td> <a href="', $RootPath, '/EmailCustTrans.php?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Credit">', _('Email'), ' - <img src="', $RootPath, '/css/', $Theme, '/images/email.gif" title="', _('Click to email the credit note'), '" alt="" /> + <img src="', $RootPath, '/css/', $Theme, '/images/email.png" title="', _('Click to email the credit note'), '" alt="" /> </a> </td> <td> @@ -472,7 +472,7 @@ </td> <td> <a href="', $RootPath, '/EmailCustTrans.php?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Credit">', _('Email'), ' - <img src="', $RootPath, '/css/', $Theme, '/images/email.gif" title="', _('Click to email the credit note'), '" alt="" /> + <img src="', $RootPath, '/css/', $Theme, '/images/email.png" title="', _('Click to email the credit note'), '" alt="" /> </a> </td> <td> |
From: <ex...@us...> - 2016-01-30 05:31:24
|
Revision: 7451 http://sourceforge.net/p/web-erp/reponame/7451 Author: exsonqu Date: 2016-01-30 05:31:22 +0000 (Sat, 30 Jan 2016) Log Message: ----------- 30/01/16 Exson: Fix the bug to print invoice instead of credit note when a credit note requested in CustomerInquiry.php reported by daveparrish. Modified Paths: -------------- trunk/CustomerInquiry.php Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2016-01-14 10:09:36 UTC (rev 7450) +++ trunk/CustomerInquiry.php 2016-01-30 05:31:22 UTC (rev 7451) @@ -429,13 +429,13 @@ <td class="number">', locale_number_format($MyRow['allocated'], $CustomerRecord['decimalplaces']), '</td> <td class="number">', locale_number_format($MyRow['totalamount'] - $MyRow['allocated'], $CustomerRecord['decimalplaces']), '</td> <td class="noprint"> - <a href="', $RootPath, '/PrintCustTrans.php?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Invoice" title="', _('Click to preview the invoice'), '"> + <a href="', $RootPath, '/PrintCustTrans.php?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Credit" title="', _('Click to preview the credit note'), '"> <img alt="" src="', $RootPath, '/css/', $Theme, '/images/preview.png" /> ', _('HTML'), ' </a> </td> <td class="noprint"> - <a href="', $RootPath, '/', $PrintCustomerTransactionScript, '?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Invoice&PrintPDF=True" title="', _('Click for PDF'), '"> + <a href="', $RootPath, '/', $PrintCustomerTransactionScript, '?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Credit&PrintPDF=True" title="', _('Click for PDF'), '"> <img alt="" src="', $RootPath, '/css/', $Theme, '/images/pdf.png" /> ', _('PDF'), ' </a> @@ -475,13 +475,13 @@ <td class="number">', locale_number_format($MyRow['allocated'], $CustomerRecord['decimalplaces']), '</td> <td class="number">', locale_number_format($MyRow['totalamount'] - $MyRow['allocated'], $CustomerRecord['decimalplaces']), '</td> <td class="noprint"> - <a href="', $RootPath, '/PrintCustTrans.php?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Invoice" title="', _('Click to preview the invoice'), '"> + <a href="', $RootPath, '/PrintCustTrans.php?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Credit" title="', _('Click to preview the credit note'), '"> <img alt="" src="', $RootPath, '/css/', $Theme, '/images/preview.png" /> ', _('HTML'), ' </a> </td> <td class="noprint"> - <a href="', $RootPath, '/', $PrintCustomerTransactionScript, '?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Invoice&PrintPDF=True" title="', _('Click for PDF'), '"> + <a href="', $RootPath, '/', $PrintCustomerTransactionScript, '?FromTransNo=', $MyRow['transno'], '&InvOrCredit=Credit&PrintPDF=True" title="', _('Click for PDF'), '"> <img alt="" src="', $RootPath, '/css/', $Theme, '/images/pdf.png" /> ', _('PDF'), ' </a> |
From: <te...@us...> - 2016-08-19 12:03:23
|
Revision: 7597 http://sourceforge.net/p/web-erp/reponame/7597 Author: tehonu Date: 2016-08-19 12:03:21 +0000 (Fri, 19 Aug 2016) Log Message: ----------- Change in ORDER BY to show transactions in cronological order Modified Paths: -------------- trunk/CustomerInquiry.php Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2016-08-18 08:51:16 UTC (rev 7596) +++ trunk/CustomerInquiry.php 2016-08-19 12:03:21 UTC (rev 7597) @@ -231,7 +231,8 @@ ON salesorders.orderno=debtortrans.order_ WHERE debtortrans.debtorno = '" . $CustomerID . "' AND debtortrans.trandate >= '" . $DateAfterCriteria . "' - ORDER BY debtortrans.id"; + ORDER BY debtortrans.trandate, + debtortrans.id"; $ErrMsg = _('No transactions were returned by the SQL because'); $TransResult = DB_query($SQL, $ErrMsg); |