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. |