|
From: <rc...@us...> - 2016-05-29 15:42:57
|
Revision: 7546
http://sourceforge.net/p/web-erp/reponame/7546
Author: rchacon
Date: 2016-05-29 15:42:54 +0000 (Sun, 29 May 2016)
Log Message:
-----------
Minor changes (formating code).
Modified Paths:
--------------
trunk/PrintCustTransPortrait.php
trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo
trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po
Modified: trunk/PrintCustTransPortrait.php
===================================================================
--- trunk/PrintCustTransPortrait.php 2016-05-28 18:19:17 UTC (rev 7545)
+++ trunk/PrintCustTransPortrait.php 2016-05-29 15:42:54 UTC (rev 7546)
@@ -1,6 +1,6 @@
<?php
-
/* $Id$ */
+/* */
include('includes/session.inc');
@@ -8,27 +8,27 @@
$BookMark = 'PrintInvoicesCredits';
-if (isset($_GET['FromTransNo'])) {
+if(isset($_GET['FromTransNo'])) {
$FromTransNo = filter_number_format($_GET['FromTransNo']);
-} elseif (isset($_POST['FromTransNo'])){
+} elseif(isset($_POST['FromTransNo'])) {
$FromTransNo = filter_number_format($_POST['FromTransNo']);
} else {
$FromTransNo = '';
}
-if (isset($_GET['InvOrCredit'])) {
+if(isset($_GET['InvOrCredit'])) {
$InvOrCredit = $_GET['InvOrCredit'];
-} elseif (isset($_POST['InvOrCredit'])) {
+} elseif(isset($_POST['InvOrCredit'])) {
$InvOrCredit = $_POST['InvOrCredit'];
}
-if (isset($_GET['PrintPDF'])) {
+if(isset($_GET['PrintPDF'])) {
$PrintPDF = $_GET['PrintPDF'];
-} elseif (isset($_POST['PrintPDF'])) {
+} elseif(isset($_POST['PrintPDF'])) {
$PrintPDF = $_POST['PrintPDF'];
}
-If (!isset($_POST['ToTransNo'])
+if(!isset($_POST['ToTransNo'])
OR trim($_POST['ToTransNo'])==''
OR filter_number_format($_POST['ToTransNo']) < $FromTransNo) {
@@ -37,11 +37,11 @@
$FirstTrans = $FromTransNo; /* Need to start a new page only on subsequent transactions */
-If (isset($PrintPDF)
+if(isset($PrintPDF)
and $PrintPDF!=''
and isset($FromTransNo)
and isset($InvOrCredit)
- and $FromTransNo!=''){
+ and $FromTransNo!='') {
include ('includes/class.pdf.php');
@@ -57,7 +57,7 @@
$pdf->addInfo('Author','webERP ' . $Version);
$pdf->addInfo('Creator','webERP http://www.weberp.org');
- if ($InvOrCredit=='Invoice'){
+ if($InvOrCredit=='Invoice') {
$pdf->addInfo('Title',_('Sales Invoice') . ' ' . $FromTransNo . ' to ' . $_POST['ToTransNo']);
$pdf->addInfo('Subject',_('Invoices from') . ' ' . $FromTransNo . ' ' . _('to') . ' ' . $_POST['ToTransNo']);
} else {
@@ -77,7 +77,7 @@
//Keep a record of the user's language
$UserLanguage = $_SESSION['Language'];
- while ($FromTransNo <= filter_number_format($_POST['ToTransNo'])){
+ while ($FromTransNo <= filter_number_format($_POST['ToTransNo'])) {
/*retrieve the invoice details from the database to print
notice that salesorder record must be present to print the invoice purging of sales orders will
@@ -90,8 +90,8 @@
FROM bankaccounts
WHERE bankaccounts.invoice = '1'";
$result=DB_query($sql,'','',false,false);
- if (DB_error_no()!=1) {
- if (DB_num_rows($result)==1){
+ if(DB_error_no()!=1) {
+ if(DB_num_rows($result)==1) {
$myrow = DB_fetch_array($result);
$DefaultBankAccountNumber = _('Account') .': ' .$myrow['bankaccountnumber'];
$DefaultBankAccountCode = _('Bank Code:') .' ' .$myrow['bankaccountcode'];
@@ -105,7 +105,7 @@
}
// gather the invoice data
- if ($InvOrCredit=='Invoice') {
+ if($InvOrCredit=='Invoice') {
$sql = "SELECT debtortrans.trandate,
debtortrans.ovamount,
debtortrans.ovdiscount,
@@ -178,7 +178,7 @@
WHERE debtortrans.type=10
AND debtortrans.transno='" . $FromTransNo . "'";
- if (isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No') {
+ if(isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No') {
$sql = $sql . " AND debtorsmaster.ediinvoices=0";
}
} else {
@@ -233,33 +233,33 @@
AND debtortrans.transno='" . $FromTransNo . "'";
- if (isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No'){
+ if(isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No') {
$sql = $sql . ' AND debtorsmaster.ediinvoices=0';
}
}
- $result=DB_query($sql,'','',false,false);
+ $result=DB_query($sql,'','',false,false);
- if (DB_error_no()!=0) {
+ if(DB_error_no()!=0) {
$Title = _('Transaction Print Error Report');
include ('includes/header.inc');
prnMsg( _('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $InvoiceToPrint . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available'),'error');
- if ($debug==1){
+ if($debug==1) {
prnMsg (_('The SQL used to get this information that failed was') . '<br />' . $sql,'error');
}
include ('includes/footer.inc');
exit;
}
- if (DB_num_rows($result)==1){
+ if(DB_num_rows($result)==1) {
$myrow = DB_fetch_array($result);
$ExchRate = $myrow['rate'];
//Change the language to the customer's language
$_SESSION['Language'] = $myrow['language_id'];
include('includes/LanguageSetup.php');
- if ($InvOrCredit == 'Invoice') {
+ if($InvOrCredit == 'Invoice') {
$sql = "SELECT stockmoves.stockid,
stockmaster.description,
-stockmoves.qty as quantity,
@@ -299,49 +299,48 @@
} // end else
$result=DB_query($sql);
- if (DB_error_no()!=0) {
+ if(DB_error_no()!=0) {
$Title = _('Transaction Print Error Report');
include ('includes/header.inc');
echo '<br />' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database');
- if ($debug==1){
+ if($debug==1) {
echo '<br />' . _('The SQL used to get this information that failed was') . '<br />' . $sql;
}
include('includes/footer.inc');
exit;
}
+ if(DB_num_rows($result)>0) {
- if (DB_num_rows($result)>0){
-
$FontSize = 10;
$PageNumber = 1;
include('includes/PDFTransPageHeaderPortrait.inc');
$FirstPage = False;
- while ($myrow2=DB_fetch_array($result)){
- if ($myrow2['discountpercent'] == 0) {
- $DisplayDiscount = '';
- } else {
- $DisplayDiscount = locale_number_format($myrow2['discountpercent'] * 100, 2) . '%';
- $DiscountPrice = $myrow2['fxprice'] * (1 - $myrow2['discountpercent']);
- }
+ while ($myrow2=DB_fetch_array($result)) {
+ if($myrow2['discountpercent'] == 0) {
+ $DisplayDiscount = '';
+ } else {
+ $DisplayDiscount = locale_number_format($myrow2['discountpercent'] * 100, 2) . '%';
+ $DiscountPrice = $myrow2['fxprice'] * (1 - $myrow2['discountpercent']);
+ }
$DisplayNet = locale_number_format($myrow2['fxnet'],$myrow['decimalplaces']);
$DisplayPrice = locale_number_format($myrow2['fxprice'],$myrow['decimalplaces']);
$DisplayQty = locale_number_format($myrow2['quantity'],$myrow2['decimalplaces']);
- $LeftOvers = $pdf->addTextWrap($Left_Margin+5,$YPos,71,$FontSize,$myrow2['stockid']);
+ $LeftOvers = $pdf->addTextWrap($Left_Margin+5,$YPos,71,$FontSize,$myrow2['stockid']);// Print item code.
//Get translation if it exists
$TranslationResult = DB_query("SELECT descriptiontranslation
FROM stockdescriptiontranslations
WHERE stockid='" . $myrow2['stockid'] . "'
AND language_id='" . $myrow['language_id'] ."'");
- if (DB_num_rows($TranslationResult)==1){ //there is a translation
+ if(DB_num_rows($TranslationResult)==1) { //there is a translation
$TranslationRow = DB_fetch_array($TranslationResult);
- $LeftOvers = $pdf->addTextWrap($Left_Margin+80,$YPos,186,$FontSize,$TranslationRow['descriptiontranslation']);
+ $LeftOvers = $pdf->addTextWrap($Left_Margin+80,$YPos,186,$FontSize,$TranslationRow['descriptiontranslation']);// Print translated item short description.
} else {
- $LeftOvers = $pdf->addTextWrap($Left_Margin+80,$YPos,186,$FontSize,$myrow2['description']);
+ $LeftOvers = $pdf->addTextWrap($Left_Margin+80,$YPos,186,$FontSize,$myrow2['description']);// Print item short description.
}
$lines=1;
while ($LeftOvers!='') {
@@ -355,18 +354,20 @@
$LeftOvers = $pdf->addTextWrap($Left_Margin+420,$YPos,26,$FontSize,$DisplayDiscount,'right');
$LeftOvers = $pdf->addTextWrap($Page_Width-$Left_Margin-72, $YPos, 72, $FontSize, $DisplayNet, 'right');
- if ($myrow2['controlled']==1){
+ if($myrow2['controlled']==1) {
- $GetControlMovts = DB_query("SELECT moveqty,
- serialno
- FROM stockserialmoves
- WHERE stockmoveno='" . $myrow2['stkmoveno'] . "'");
+ $GetControlMovts = DB_query("
+ SELECT
+ moveqty,
+ serialno
+ FROM stockserialmoves
+ WHERE stockmoveno='" . $myrow2['stkmoveno'] . "'");
- if ($myrow2['serialised']==1){
- while ($ControlledMovtRow = DB_fetch_array($GetControlMovts)){
+ if($myrow2['serialised']==1) {
+ while ($ControlledMovtRow = DB_fetch_array($GetControlMovts)) {
$YPos -= (10*$lines);
$LeftOvers = $pdf->addTextWrap($Left_Margin+82,$YPos,100,$FontSize,$ControlledMovtRow['serialno'],'left');
- if ($YPos-$line_height <= $Bottom_Margin){
+ if($YPos-$line_height <= $Bottom_Margin) {
/* head up a new invoice/credit note page */
/*draw the vertical column lines right to the bottom */
PrintLinesToBottom ();
@@ -374,10 +375,10 @@
} //end if need a new page headed up
}
} else {
- while ($ControlledMovtRow = DB_fetch_array($GetControlMovts)){
+ while ($ControlledMovtRow = DB_fetch_array($GetControlMovts)) {
$YPos -= (10*$lines);
- $LeftOvers = $pdf->addTextWrap($Left_Margin+82,$YPos,100,$FontSize,(-$ControlledMovtRow['moveqty']) . ' x ' . $ControlledMovtRow['serialno'],'left');
- if ($YPos-$line_height <= $Bottom_Margin){
+ $LeftOvers = $pdf->addTextWrap($Left_Margin+82,$YPos,100,$FontSize,(-$ControlledMovtRow['moveqty']) . ' x ' . $ControlledMovtRow['serialno'], 'left');
+ if($YPos-$line_height <= $Bottom_Margin) {
/* head up a new invoice/credit note page */
/*draw the vertical column lines right to the bottom */
PrintLinesToBottom ();
@@ -390,27 +391,28 @@
$lines=explode("\r\n",htmlspecialchars_decode($myrow2['narrative']));
for ($i=0;$i<sizeOf($lines);$i++) {
- while (mb_strlen($lines[$i])>1){
- if ($YPos-$line_height <= $Bottom_Margin){
- /* head up a new invoice/credit note page */
- /*draw the vertical column lines right to the bottom */
- PrintLinesToBottom ();
- include ('includes/PDFTransPageHeaderPortrait.inc');
- } //end if need a new page headed up
- /*increment a line down for the next line item */
- if (mb_strlen($lines[$i])>1){
- $lines[$i] = $pdf->addTextWrap($Left_Margin+85,$YPos,181,$FontSize,stripslashes($lines[$i]));
+ while (mb_strlen($lines[$i])>1) {
+ if($YPos-$line_height <= $Bottom_Margin) {
+ /* head up a new invoice/credit note page */
+ /*draw the vertical column lines right to the bottom */
+ PrintLinesToBottom ();
+ include ('includes/PDFTransPageHeaderPortrait.inc');
+ } //end if need a new page headed up
+ /*increment a line down for the next line item */
+ if(mb_strlen($lines[$i])>1) {
+ $lines[$i] = $pdf->addTextWrap($Left_Margin+85,$YPos,181,$FontSize,stripslashes($lines[$i]));
+ }
+ $YPos -= ($line_height);
}
- $YPos -= ($line_height);
}
- }
- if ($YPos <= $Bottom_Margin){
+ if($YPos <= $Bottom_Margin) {
/* head up a new invoice/credit note page */
/*draw the vertical column lines right to the bottom */
PrintLinesToBottom ();
include ('includes/PDFTransPageHeaderPortrait.inc');
} //end if need a new page headed up
+
} /*end while there are line items to print out*/
} /*end if there are stock movements to show on the invoice or credit note*/
@@ -418,7 +420,7 @@
$YPos -= $line_height;
/* check to see enough space left to print the 4 lines for the totals/footer */
- if (($YPos-$Bottom_Margin)<(2*$line_height)){
+ if(($YPos-$Bottom_Margin)<(2*$line_height)) {
PrintLinesToBottom ();
include ('includes/PDFTransPageHeaderPortrait.inc');
}
@@ -446,12 +448,11 @@
/*Now print out the footer and totals */
- if ($InvOrCredit=='Invoice') {
-
- $DisplaySubTot = locale_number_format($myrow['ovamount'],$myrow['decimalplaces']);
- $DisplayFreight = locale_number_format($myrow['ovfreight'],$myrow['decimalplaces']);
- $DisplayTax = locale_number_format($myrow['ovgst'],$myrow['decimalplaces']);
- $DisplayTotal = locale_number_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],$myrow['decimalplaces']);
+ if($InvOrCredit=='Invoice') {
+ $DisplaySubTot = locale_number_format($myrow['ovamount'],$myrow['decimalplaces']);
+ $DisplayFreight = locale_number_format($myrow['ovfreight'],$myrow['decimalplaces']);
+ $DisplayTax = locale_number_format($myrow['ovgst'],$myrow['decimalplaces']);
+ $DisplayTotal = locale_number_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],$myrow['decimalplaces']);
} else {
$DisplaySubTot = locale_number_format(-$myrow['ovamount'],$myrow['decimalplaces']);
$DisplayFreight = locale_number_format(-$myrow['ovfreight'],$myrow['decimalplaces']);
@@ -487,16 +488,16 @@
$pdf->line($Page_Width-$Right_Margin-222, $YPos+$line_height,$Page_Width-$Right_Margin-222,$Bottom_Margin);
$YPos+=10;
- if ($InvOrCredit=='Invoice'){
+ if($InvOrCredit=='Invoice') {
$LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-220, $Bottom_Margin+5, 144, $FontSize, _('TOTAL INVOICE'));
$FontSize=8;
$LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos-18,280,$FontSize,$_SESSION['RomalpaClause']);
- while (mb_strlen($LeftOvers)>0 AND $YPos > $Bottom_Margin){
+ while (mb_strlen($LeftOvers)>0 AND $YPos > $Bottom_Margin) {
$YPos -=10;
$LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos-18,280,$FontSize,$LeftOvers);
}
/* Add Images for Visa / Mastercard / Paypal */
- if (file_exists('companies/' . $_SESSION['DatabaseName'] . '/payment.jpg')) {
+ if(file_exists('companies/' . $_SESSION['DatabaseName'] . '/payment.jpg')) {
$pdf->addJpegFromFile('companies/' . $_SESSION['DatabaseName'] . '/payment.jpg',$Page_Width/2 -60,$YPos-15,0,20);
}
// Print Bank acount details if available and default for invoices is selected
@@ -514,7 +515,7 @@
/* Put the transaction number back as would have been incremented by one after last pass */
$FromTransNo--;
- if (isset($_GET['Email'])){ //email the invoice to address supplied
+ if(isset($_GET['Email'])) { //email the invoice to address supplied
include ('includes/htmlMimeMail.php');
$FromTransNo--; //reverse the increment to retain the correct transaction number
$FileName = $_SESSION['reports_dir'] . '/' . $_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $_GET['FromTransNo'] . '.pdf';
@@ -525,7 +526,7 @@
$mail->setText(_('Please find attached') . ' ' . $InvOrCredit . ' ' . $_GET['FromTransNo'] );
$mail->SetSubject($InvOrCredit . ' ' . $_GET['FromTransNo']);
$mail->addAttachment($Attachment, $FileName, 'application/pdf');
- if($_SESSION['SmtpSetting'] == 0){
+ if($_SESSION['SmtpSetting'] == 0) {
$mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>');
$result = $mail->send(array($_GET['Email']));
}else{
@@ -554,7 +555,7 @@
$Title=_('Select Invoices/Credit Notes To Print');
include('includes/header.inc');
- if (!isset($FromTransNo) OR $FromTransNo=='') {
+ if(!isset($FromTransNo) OR $FromTransNo=='') {
/*if FromTransNo is not set then show a form to allow input of either a single invoice number or a range of invoices to be printed. Also get the last invoice number created to show the user where the current range is up to */
@@ -569,7 +570,7 @@
<td>' . _('Print Invoices or Credit Notes') . '</td>
<td><select name="InvOrCredit">';
- if ($InvOrCredit=='Invoice' OR !isset($InvOrCredit)){
+ if($InvOrCredit=='Invoice' OR !isset($InvOrCredit)) {
echo '<option selected="selected" value="Invoice">' . _('Invoices') . '</option>';
echo '<option value="Credit">' . _('Credit Notes') . '</option>';
@@ -584,7 +585,7 @@
<td>' . _('Print EDI Transactions') . '</td>
<td><select name="PrintEDI">';
- if ($InvOrCredit=='Invoice' OR !isset($InvOrCredit)){
+ if($InvOrCredit=='Invoice' OR !isset($InvOrCredit)) {
echo '<option selected="selected" value="No">' . _('Do not Print PDF EDI Transactions') . '</option>';
echo '<option value="Yes">' . _('Print PDF EDI Transactions Too') . '</option>';
@@ -632,13 +633,13 @@
} else {
- while ($FromTransNo <= $_POST['ToTransNo']){
+ while ($FromTransNo <= $_POST['ToTransNo']) {
/*retrieve the invoice details from the database to print
notice that salesorder record must be present to print the invoice purging of sales orders will
nobble the invoice reprints */
- if ($InvOrCredit=='Invoice') {
+ if($InvOrCredit=='Invoice') {
$sql = "SELECT debtortrans.trandate,
debtortrans.ovamount,
@@ -742,19 +743,19 @@
}
$result=DB_query($sql);
- if (DB_num_rows($result)==0 OR DB_error_no()!=0) {
+ if(DB_num_rows($result)==0 OR DB_error_no()!=0) {
echo '<p>' . _('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $InvoiceToPrint . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available');
- if ($debug==1){
+ if($debug==1) {
prnMsg( _('The SQL used to get this information that failed was') . '<br />' . $sql,'warn');
}
break;
include('includes/footer.inc');
exit;
- } elseif (DB_num_rows($result)==1){
+ } elseif(DB_num_rows($result)==1) {
$myrow = DB_fetch_array($result);
/* Then there's an invoice (or credit note) to print. So print out the invoice header and GST Number from the company record */
- if (count($_SESSION['AllowedPageSecurityTokens'])==1 AND in_array(1, $_SESSION['AllowedPageSecurityTokens']) AND $myrow['debtorno'] != $_SESSION['CustomerID']){
+ if(count($_SESSION['AllowedPageSecurityTokens'])==1 AND in_array(1, $_SESSION['AllowedPageSecurityTokens']) AND $myrow['debtorno'] != $_SESSION['CustomerID']) {
echo '<p class="bad">' . _('This transaction is addressed to another customer and cannot be displayed for privacy reasons') . '. ' . _('Please select only transactions relevant to your company');
exit;
}
@@ -767,7 +768,7 @@
<td valign="top" style="width:10%"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td>
<td style="background-color:#bbbbbb">';
- if ($InvOrCredit=='Invoice') {
+ if($InvOrCredit=='Invoice') {
echo '<h2>' . _('TAX INVOICE') . ' ';
} else {
echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' ';
@@ -821,7 +822,7 @@
</table>';
/*end of the main table showing the company name and charge to details */
- if ($InvOrCredit=='Invoice') {
+ if($InvOrCredit=='Invoice') {
echo '<table class="table1">
<tr>
@@ -933,15 +934,15 @@
echo '<div class="centre"><h4>' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</h4></div>';
$result=DB_query($sql);
- if (DB_error_no()!=0) {
+ if(DB_error_no()!=0) {
echo '<br />' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database');
- if ($debug==1){
+ if($debug==1) {
echo '<br />' . _('The SQL used to get this information that failed was') . '<br />' . $sql;
}
exit;
}
- if (DB_num_rows($result)>0){
+ if(DB_num_rows($result)>0) {
echo '<table class="table1">
<tr>
<th>' . _('Item Code') . '</th>
@@ -956,9 +957,9 @@
$LineCounter =17;
$k=0; //row colour counter
- while ($myrow2=DB_fetch_array($result)){
+ while ($myrow2=DB_fetch_array($result)) {
- if ($k==1){
+ if($k==1) {
$RowStarter = '<tr class="EvenTableRows">';
$k=0;
} else {
@@ -972,7 +973,7 @@
$DisplayQty = locale_number_format($myrow2['quantity'],$myrow2['decimalplaces']);
$DisplayNet = locale_number_format($myrow2['fxnet'],$myrow['decimalplaces']);
- if ($myrow2['discountpercent']==0){
+ if($myrow2['discountpercent']==0) {
$DisplayDiscount ='';
} else {
$DisplayDiscount = locale_number_format($myrow2['discountpercent']*100,2) . '%';
@@ -994,7 +995,7 @@
$DisplayDiscount,
$DisplayNet);
- if (mb_strlen($myrow2['narrative'])>1){
+ if(mb_strlen($myrow2['narrative'])>1) {
echo $RowStarter .
'<td></td>
<td colspan="6">' . $myrow2['narrative'] . '</td>
@@ -1004,7 +1005,7 @@
$LineCounter++;
- if ($LineCounter == ($_SESSION['PageLength'] - 2)){
+ if($LineCounter == ($_SESSION['PageLength'] - 2)) {
/* head up a new invoice/credit note page */
@@ -1015,7 +1016,7 @@
<td valign="top"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td>
<td style="background-color:#bbbbbb">';
- if ($InvOrCredit=='Invoice') {
+ if($InvOrCredit=='Invoice') {
echo '<h2>' . _('TAX INVOICE') . ' ';
} else {
echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' ';
@@ -1061,7 +1062,7 @@
/* check to see enough space left to print the totals/footer */
$LinesRequiredForText = floor(mb_strlen($myrow['invtext'])/140);
- if ($LineCounter >= ($_SESSION['PageLength'] - 8 - $LinesRequiredForText)){
+ if($LineCounter >= ($_SESSION['PageLength'] - 8 - $LinesRequiredForText)) {
/* head up a new invoice/credit note page */
@@ -1070,7 +1071,7 @@
<tr>
<td valign="top"><img src="' . $_SESSION['LogoFile'] . '" alt="" /></td>
<td style="background-color:#bbbbbb">';
- if ($InvOrCredit=='Invoice') {
+ if($InvOrCredit=='Invoice') {
echo '<h2>' . _('TAX INVOICE') .' ';
} else {
echo '<h2 style="color:red">' . _('TAX CREDIT NOTE') . ' ';
@@ -1116,14 +1117,14 @@
echo '<br /><br />' . $myrow['invtext'];
$LineCounter=$LineCounter+2+$LinesRequiredForText;
- while ($LineCounter < ($_SESSION['PageLength'] -6)){
+ while ($LineCounter < ($_SESSION['PageLength'] -6)) {
echo '<br />';
$LineCounter++;
}
/*Now print out the footer and totals */
- if ($InvOrCredit=='Invoice') {
+ if($InvOrCredit=='Invoice') {
$DisplaySubTot = locale_number_format($myrow['ovamount'],$myrow['decimalplaces']);
$DisplayFreight = locale_number_format($myrow['ovfreight'],$myrow['decimalplaces']);
@@ -1143,7 +1144,7 @@
<td class="number" style="background-color:#EEEEEE">' . $DisplayFreight . '</td></tr>';
echo '<tr><td class="number">' . _('Tax') . '</td>
<td class="number" style="background-color:#EEEEEE">' . $DisplayTax . '</td></tr>';
- if ($InvOrCredit=='Invoice'){
+ if($InvOrCredit=='Invoice') {
echo '<tr><td class="number"><b>' . _('TOTAL INVOICE') . '</b></td>
<td class="number" style="background-color:#EEEEEE"><b>' . $DisplayTotal . '</b></td></tr>';
} else {
@@ -1160,35 +1161,24 @@
} /*end of else not PrintPDF */
-
function PrintLinesToBottom () {
+ global $Bottom_Margin;
+ global $Left_Margin;
+ global $line_height;
+ global $PageNumber;
global $pdf;
- global $PageNumber;
global $TopOfColHeadings;
- global $Left_Margin;
- global $Bottom_Margin;
- global $line_height;
-/*draw the vertical column lines right to the bottom */
+ // Prints column vertical lines:
$pdf->line($Left_Margin+78, $TopOfColHeadings+12,$Left_Margin+78,$Bottom_Margin);
-
- /*Print a column vertical line */
$pdf->line($Left_Margin+268, $TopOfColHeadings+12,$Left_Margin+268,$Bottom_Margin);
-
- /*Print a column vertical line */
$pdf->line($Left_Margin+348, $TopOfColHeadings+12,$Left_Margin+348,$Bottom_Margin);
-
- /*Print a column vertical line */
$pdf->line($Left_Margin+388, $TopOfColHeadings+12,$Left_Margin+388,$Bottom_Margin);
-
- /*Print a column vertical line */
$pdf->line($Left_Margin+418, $TopOfColHeadings+12,$Left_Margin+418,$Bottom_Margin);
-
$pdf->line($Left_Margin+448, $TopOfColHeadings+12,$Left_Margin+448,$Bottom_Margin);
$PageNumber++;
-
}
?>
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 2016-05-28 18:19:17 UTC (rev 7545)
+++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2016-05-29 15:42:54 UTC (rev 7546)
@@ -8,7 +8,7 @@
"Project-Id-Version: webERP 4.12.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-16 21:31+1200\n"
-"PO-Revision-Date: 2016-05-28 11:40-0600\n"
+"PO-Revision-Date: 2016-05-29 09:40-0600\n"
"Last-Translator: Rafael Chacon <raf...@gm...>\n"
"Language-Team: TecnoSoluciones.com <web...@te...>\n"
"Language: es_ES\n"
@@ -1624,11 +1624,11 @@
#: AnalysisHorizontalIncome.php:160 AnalysisHorizontalPosition.php:114
msgid "Current period"
-msgstr ""
+msgstr "Período actual"
#: AnalysisHorizontalIncome.php:161 AnalysisHorizontalPosition.php:115
msgid "Last period"
-msgstr ""
+msgstr "Período anterior"
#: AnalysisHorizontalIncome.php:162 AnalysisHorizontalPosition.php:116
msgid "Actual change"
@@ -1720,7 +1720,7 @@
#: AnalysisHorizontalPosition.php:27
msgid "Print Horizontal Analysis of Statement of Financial Position"
-msgstr ""
+msgstr "Imprimir análisis horizontal del estado de situación"
#: AnalysisHorizontalPosition.php:40 GLBalanceSheet.php:36
msgid "Select the balance date"
@@ -4029,7 +4029,7 @@
#: CollectiveWorkOrderCost.php:81
msgid "Select Other Work Orders"
-msgstr ""
+msgstr "Seleccionar otras órdenes de trabajo"
#: CollectiveWorkOrderCost.php:112 SelectWorkOrder.php:39
msgid "The work order number entered MUST be numeric"
@@ -18248,7 +18248,7 @@
#: MRPCreateDemands.php:211
msgid "Inventory Categories"
-msgstr ""
+msgstr "Categorías de inventario"
#: MRPCreateDemands.php:228 PDFDeliveryDifferences.php:62 PDFDIFOT.php:66
#: PDFOrdersInvoiced.php:64 PDFOrderStatus.php:61
@@ -18257,11 +18257,11 @@
#: MRPCreateDemands.php:249
msgid "From Sales Date"
-msgstr "Desde la Fecha de Venta"
+msgstr "Desde la fecha de venta"
#: MRPCreateDemands.php:250
msgid "To Sales Date"
-msgstr "Hasta la Fecha de Venta"
+msgstr "Hasta la fecha de venta"
#: MRPCreateDemands.php:253
msgid "Start Date For Distribution"
@@ -18289,7 +18289,7 @@
#: MRPCreateDemands.php:264
msgid "Number of Periods"
-msgstr "Número de Períodos"
+msgstr "Cantidad de períodos"
#: MRPCreateDemands.php:268
msgid "Exclude Total Quantity Less Than"
@@ -51543,7 +51543,7 @@
#: ../webSHOP/CreditCardPayFlowPro.php:240
#: ../webSHOP/CreditCardPayPalPro.php:307
msgid "Card Number"
-msgstr ""
+msgstr "Número de tarjeta"
#: ../webSHOP/CreditCardPayFlowPro.php:241
#: ../webSHOP/CreditCardPayPalPro.php:308
|