Fwd: [Web-erp-svn] SF.net SVN: web-erp:[7578] trunk

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: [Web-erp-svn] SF.net SVN: web-erp:[7578] trunk

Rafael Chacón
Hi Exson,

Which it is the purpose of the line "case 'Z2': {$pf = array(  560.80,320.76); break;}" in trunk/includes/tcpdf/include/tcpdf_static.php ?

TCPDF is an "Open Source PHP class for generating PDF documents" (library under development by externals to webERP). So I prefer to do modifications outside this code, or suggest to TCPDF programmers to include this change in their trunk. Before doing a proposal, I want to understand very well this change.

Best regards, Rafael.

---------- Forwarded message ----------
From: <[hidden email]>
Date: 2016-08-02 4:02 GMT-06:00
Subject: [Web-erp-svn] SF.net SVN: web-erp:[7578] trunk
To: [hidden email]


Revision: 7578
          http://sourceforge.net/p/web-erp/reponame/7578
Author:   exsonqu
Date:     2016-08-02 10:02:32 +0000 (Tue, 02 Aug 2016)
Log Message:
-----------
02/08/16 Exson: Make GLJournalInquiry.php workable for all transaction types and printable. Merge Chinese format GL Journal from cncerp.

Modified Paths:
--------------
    trunk/GLJournalInquiry.php
    trunk/PDFGLJournal.php
    trunk/includes/PDFStarter.php
    trunk/includes/tcpdf/include/tcpdf_static.php
    trunk/sql/mysql/upgrade4.13-4.13.1.sql

Added Paths:
-----------
    trunk/PDFGLJournalCN.php
    trunk/includes/PDFGLJournalHeaderCN.inc

Modified: trunk/GLJournalInquiry.php
===================================================================
--- trunk/GLJournalInquiry.php  2016-08-02 06:29:19 UTC (rev 7577)
+++ trunk/GLJournalInquiry.php  2016-08-02 10:02:32 UTC (rev 7578)
@@ -17,11 +17,28 @@
        echo '<table class="selection">';
        echo '<tr><th colspan="3">' . _('Selection Criteria') . '</th></tr>';

-       $sql = "SELECT typeno FROM systypes WHERE typeid=0";
+       $sql = "SELECT typeid,systypes.typeno,typename FROM
+               systypes INNER JOIN gltrans ON systypes.typeid=gltrans.type
+               GROUP BY typeid";
        $result = DB_query($sql);
-       $myrow = DB_fetch_array($result);
-       $MaxJournalNumberUsed = $myrow['typeno'];
+       if (DB_num_rows($result)>0) {
+               echo '<tr>

+                       <td>' . _('Transaction Type') . ' </td>
+                       <td> <select name="TransType">';
+               while ($myrow = DB_fetch_array($result)) {
+                       if (!isset($MaxJournalNumberUsed)) {
+                                       $MaxJournalNumberUsed = $myrow['typeno'];
+                       } else {
+                                       $MaxJournalNumberUsed = ($myrow['typeno']>$MaxJournalNumberUsed)?$myrow['typeno']:$MaxJournalNumberUsed;
+                       }
+                       echo '<option value="' . $myrow['typeid'] . '">' . _($myrow['typename']) . '</option>';
+               }
+               echo '</select></td>
+                       </tr>';
+
+       }
+
        echo '<tr>
                        <td>' . _('Journal Number Range') . ' (' . _('Between') . ' 1 ' . _('and') . ' ' . $MaxJournalNumberUsed . ')</td>
                        <td>' . _('From') . ':'. '<input type="text" class="number" name="NumberFrom" size="10" maxlength="11" value="1" />' . '</td>
@@ -64,7 +81,7 @@
                                ON gltrans.account=chartmaster.accountcode
                        LEFT JOIN tags
                                ON gltrans.tag=tags.tagref
-                       WHERE gltrans.type='0'
+                       WHERE gltrans.type='" . $_POST['TransType'] . "'
                                AND gltrans.trandate>='" . FormatDateForSQL($_POST['FromTransDate']) . "'
                                AND gltrans.trandate<='" . FormatDateForSQL($_POST['ToTransDate']) . "'
                                AND gltrans.typeno>='" . $_POST['NumberFrom'] . "'
@@ -87,7 +104,7 @@
                        </tr>';

                $LastJournal = 0;
-
+               $i = 0;
                while ($myrow = DB_fetch_array($result)){

                        if ($myrow['tag']==0) {
@@ -95,12 +112,21 @@
                        }

                        if ($myrow['typeno']!=$LastJournal) {
-                               echo '<tr><td colspan="8"</td></tr><tr>
+                               if ($i == 0) {
+                                       $RowClass = 'class="OddTableRows"';
+                                       $i = 1;
+                               } else {
+                                       $RowClass = 'class="EvenTableRows"';
+                                       $i = 0;
+                               }
+
+                               echo '<tr ' . $RowClass . '><td colspan="8"></td></tr><tr>
+                                       <tr ' . $RowClass . '>
                                        <td>' .  ConvertSQLDate($myrow['trandate']) . '</td>
                                        <td class="number">' . $myrow['typeno'] . '</td>';

                        } else {
-                               echo '<tr><td colspan="2"></td>';
+                               echo '<tr ' . $RowClass . '><td colspan="2"></td>';
                        }

                        // if user is allowed to see the account we show it, other wise we show "OTHERS ACCOUNTS"
@@ -125,9 +151,15 @@
                                        <td class="number">' . locale_number_format($myrow['amount'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td>
                                        <td class="number">' . $myrow['tag'] . ' - ' . $myrow['tagdescription'] . '</td>';

-                       if ($myrow['typeno']!=$LastJournal) {
-                               echo '<td class="number"><a href="PDFGLJournal.php?JournalNo='.$myrow['typeno'].'">' . _('Print')  . '</a></td></tr>';
-
+                       if ($myrow['typeno']!=$LastJournal AND $CheckRow[0]>0) {
+                               if ($_SESSION['Language'] == 'zh_CN.utf8' OR $_SESSION['Language'] =='zh_hk.utf8') {
+                                       echo '<td class="number"><a href="PDFGLJournalCN.php?JournalNo='.$myrow['typeno'].'&Type=' . $_POST['TransType'] . '">' . _('Print') . '</a></td></tr>';
+                               } else {
+                                       echo '<td class="number"><a href="PDFGLJournal.php?JournalNo='.$myrow['typeno'].'">' . _('Print')  . '</a></td></tr>';
+                               }
+
+
+
                                $LastJournal = $myrow['typeno'];
                        } else {
                                echo '<td colspan="1"></td></tr>';
@@ -144,4 +176,4 @@
 }
 include('includes/footer.inc');

-?>
\ No newline at end of file
+?>

Modified: trunk/PDFGLJournal.php
===================================================================
--- trunk/PDFGLJournal.php      2016-08-02 06:29:19 UTC (rev 7577)
+++ trunk/PDFGLJournal.php      2016-08-02 10:02:32 UTC (rev 7578)
@@ -8,11 +8,18 @@

 if (isset($_POST['JournalNo'])) {
        $JournalNo=$_POST['JournalNo'];
+       $Type = $_POST['Type'];
 } else if (isset($_GET['JournalNo'])) {
        $JournalNo=$_GET['JournalNo'];
+       $Type = $_GET['Type'];
 } else {
        $JournalNo='';
 }
+if (empty($JournalNo) OR empty($Type)) {
+       prnMsg(_('This page should be called with Journal No and Type'),'error');
+       include('includes/footer.inc');
+       exit;
+}

 if ($JournalNo=='Preview') {
        $FormDesign = simplexml_load_file(sys_get_temp_dir().'/Journal.xml');
@@ -44,8 +51,9 @@
                                ON gltrans.account=chartmaster.accountcode
                        LEFT JOIN tags
                                ON gltrans.tag=tags.tagref
-                       WHERE gltrans.type='0'
+                       WHERE gltrans.type='" . $Type . "'
                                AND gltrans.typeno='" . $JournalNo . "'";
+
        $result=DB_query($sql);
        $LineCount = DB_num_rows($result); // UldisN
        $myrow=DB_fetch_array($result);
@@ -104,4 +112,4 @@
     $pdf->OutputD($_SESSION['DatabaseName'] . '_Journal_' . date('Y-m-d').'.pdf');//UldisN
     $pdf->__destruct(); //UldisN
 }
-?>
\ No newline at end of file
+?>

Added: trunk/PDFGLJournalCN.php
===================================================================
--- trunk/PDFGLJournalCN.php                            (rev 0)
+++ trunk/PDFGLJournalCN.php    2016-08-02 10:02:32 UTC (rev 7578)
@@ -0,0 +1,156 @@
+<?php /* $Id$*/
+
+/* $Revision: 1.5 $2012.2CQZ二次修改 */
+
+include('includes/session.inc');
+if (isset($_POST['JournalNo'])) {
+       $JournalNo=$_POST['JournalNo'];
+       $TypeID=$_POST['Type'];
+} else if (isset($_GET['JournalNo'])) {
+       $JournalNo=$_GET['JournalNo'];
+       $TypeID=$_GET['Type'];
+} else {
+       $JournalNo='';
+       $TypeID='';
+}
+if ($JournalNo=='Preview') {
+       $FormDesign = simplexml_load_file(sys_get_temp_dir().'/Journalc.xml');
+} else {
+       $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/Journalc.xml');
+}
+
+// Set the paper size/orintation
+$PaperSize = $FormDesign->PaperSize;
+$PageNumber=1;
+$line_height=$FormDesign->LineHeight;
+include('includes/PDFStarter.php');
+$pdf->addInfo('Title', _('中国(甲式10)会计凭证') );
+$pdf->addInfo('Author','webERP ' . 'CQZ二次修改');
+$pdf->addInfo('Subject',_('会计凭证——中国式会计凭证--登录ERP打印或下载此凭证的用户:').$_SESSION['UsersRealName']);
+$pdf->SetProtection(array('modify','copy','annot-forms'), '');
+
+if ($JournalNo=='Preview') {
+       $LineCount = 2; // UldisN
+} else {
+       $sql="SELECT gltrans.type,
+                   gltrans.typeno,
+                               gltrans.trandate,
+                               gltrans.account,
+                               systypes.typename,
+                               chartmaster.accountname,
+                               gltrans.narrative,
+                               gltrans.amount,
+                               gltrans.tag,
+                               tags.tagdescription,
+                               gltrans.jobref
+                       FROM gltrans
+                       INNER JOIN chartmaster
+                               ON gltrans.account=chartmaster.accountcode
+                       INNER JOIN systypes
+                               ON gltrans.type=systypes.typeid
+                       LEFT JOIN tags
+                               ON gltrans.tag=tags.tagref
+                       WHERE gltrans.type='".$TypeID."'
+                               AND gltrans.typeno='" . $JournalNo . "'";
+       $result=DB_query($sql);
+       $LineCount = DB_num_rows($result); // UldisN
+       $myrow=DB_fetch_array($result);
+       $JournalDate=$myrow['trandate'];
+       DB_data_seek($result, 0);
+       $Typemame=$myrow['typename'];
+       include('includes/PDFGLJournalHeaderCN.inc');
+}
+$counter=1;
+$YPos=$FormDesign->Data->y;
+while ($counter<=$LineCount) {
+       if ($JournalNo=='Preview') {
+               $AccountCode=str_pad('',10,'x');
+               $Date='1/1/1900';
+               $Description=str_pad('',30,'x');
+               $Narrative=str_pad('',30,'x');
+               $Amount='XXXX.XX';
+               $Tag=str_pad('',25,'x');
+               $JobRef=str_pad('',25,'x');
+       } else {
+               $myrow=DB_fetch_array($result);
+               if ($myrow['tag']==0) {
+                       $myrow['tagdescription']='None';
+               }
+               $AccountCode = $myrow['account'];
+               $Description = $myrow['accountname'];
+               $Date = $myrow['trandate'];
+               $Narrative = $myrow['narrative'];
+               $Amount = $myrow['amount'];
+               $Tag = $myrow['tag'].' - '.$myrow['tagdescription'];
+               $JobRef = $myrow['jobref'];
+       }
+
+       if ( $myrow['amount'] > 0) {
+                       $DebitAmount = locale_number_format($myrow['amount'],$_SESSION['CompanyRecord']['decimalplaces']);
+                       $DebitTotal += $myrow['amount'];
+                       $CreditAmount = ' ';
+       } else {
+                       $CreditAmount = locale_number_format(-$myrow['amount'],$_SESSION['CompanyRecord']['decimalplaces']);
+                       $CreditTotal += $myrow['amount'];
+                       $DebitAmount = ' ';
+       }
+       $pdf->SetTextColor(0,0,0);
+       if((mb_strlen($Narrative,'GB2312')+ substr_count($Narrative," "))>40){
+       $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column1->x+3,$Page_Height-$YPos-5,$FormDesign->Data->Column1->Length,$FormDesign->Data->Column1->FontSize, $Narrative);
+       $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column2->x+3,$Page_Height-$YPos+3,$FormDesign->Data->Column2->Length,$FormDesign->Data->Column2->FontSize, $AccountCode);
+       $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x+3,$Page_Height-$YPos+3,$FormDesign->Data->Column3->Length,$FormDesign->Data->Column3->FontSize, $Description);
+       }else{
+       $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column1->x+3,$Page_Height-$YPos,$FormDesign->Data->Column1->Length,$FormDesign->Data->Column1->FontSize, $Narrative);
+       $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column2->x+3,$Page_Height-$YPos,$FormDesign->Data->Column2->Length,$FormDesign->Data->Column2->FontSize, $AccountCode);
+       $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x+3,$Page_Height-$YPos,$FormDesign->Data->Column3->Length,$FormDesign->Data->Column3->FontSize, $Description);
+       }
+       $pdf->SetFont('helvetica', '', 10);
+       $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x+3,$Page_Height-$YPos,$FormDesign->Data->Column4->Length,$FormDesign->Data->Column4->FontSize,$DebitAmount , 'right');
+
+       $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x+3,$Page_Height-$YPos,$FormDesign->Data->Column5->Length,$FormDesign->Data->Column5->FontSize, $CreditAmount, 'right');
+
+
+       $YPos += $line_height;
+       $counter++;
+
+       $DebitTotal1=locale_number_format($DebitTotal,$_SESSION['CompanyRecord']['decimalplaces'],  'right');
+       $CreditTotal1=locale_number_format(-$CreditTotal,$_SESSION['CompanyRecord']['decimalplaces'],  'right');
+
+       $pdf->SetFont('javiergb', '', 10);
+
+       if ($YPos >= $FormDesign->LineAboveFooter->starty){
+               /* We reached the end of the page so finsih off the page and start a newy */
+               $PageNumber++;
+               $YPos=$FormDesign->Data->y;
+               include ('includes/PDFGLJournalHeaderCN.inc');
+       }
+}
+$pdf->setlineStyle(array('width'=>0.8));
+$pdf->SetLineStyle(array('color'=>array(0,0,0)));
+$pdf->Line($XPos=540, $Page_Height-$YPos+15, $FormDesign->Column33->endx,$Page_Height - $FormDesign->Column33->endy);
+
+//end if need a new page headed up
+
+
+//$pdf->addJpegFromFile('hjje.jpg',$FormDesign->Headings->Column7->x+3+20,$Page_Height - 282,110,28);
+$pdf->SetTextColor(0,0,255);
+$pdf->addText($FormDesign->Headings->Column7->x+3,$Page_Height-$FormDesign->Headings->Column7->y,$FormDesign->Headings->Column7->FontSize, _('合 计 金 额'));//$FormDesign->Headings->Column7->name
+$pdf->SetTextColor(0,0,0);
+$pdf->SetFont('helvetica', '', 10);
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column8->x+3,$Page_Height - $FormDesign->Headings->Column8->y, $FormDesign->Headings->Column8->Length,$FormDesign->Headings->Column8->FontSize, $DebitTotal1, 'right');
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column9->x+3,$Page_Height - $FormDesign->Headings->Column9->y, $FormDesign->Headings->Column9->Length,$FormDesign->Headings->Column9->FontSize, $CreditTotal1, 'right');
+$pdf->SetFont('javiergb', '', 10);
+
+if ($LineCount == 0) {   //UldisN
+       $title = _('GRN Error');
+       include('includes/header.inc');
+       prnMsg(_('There were no GRN to print'),'warn');
+       echo '<br /><a href="'.$rootpath.'/index.php">'. _('Back to the menu').'</a>';
+       include('includes/footer.inc');
+       exit;
+} else {
+    $pdf->OutputD($_SESSION['DatabaseName'] . '_GRN_' . date('Y-m-d').'.pdf');//UldisN
+    $pdf->__destruct(); //UldisN
+}
+?>
+

Added: trunk/includes/PDFGLJournalHeaderCN.inc
===================================================================
--- trunk/includes/PDFGLJournalHeaderCN.inc                             (rev 0)
+++ trunk/includes/PDFGLJournalHeaderCN.inc     2016-08-02 10:02:32 UTC (rev 7578)
@@ -0,0 +1,124 @@
+<?php
+/* $Id$*/
+/*PDF page header for price list report */
+if ($PageNumber>1){
+       $pdf->newPage();
+}
+
+$pdf->addJpegFromFile($_SESSION['LogoFile'] ,$FormDesign->logo->x+3,$Page_Height-$FormDesign->logo->y,$FormDesign->logo->width,$FormDesign->logo->height);
+$pdf->SetTextColor(0,0,255);
+$LeftOvers = $pdf->addText($FormDesign->CompanyName->x+3,$Page_Height-$FormDesign->CompanyName->y,$FormDesign->CompanyName->FontSize,$_SESSION['CompanyRecord']['coyname']);
+$LeftOvers = $pdf->addText($FormDesign->GRNNumber2->x+3,$Page_Height-$FormDesign->GRNNumber2->y,$FormDesign->GRNNumber2->FontSize, '凭证类型:'.$Typemame,'right' );
+$JournalNo=str_pad($JournalNo, 9, '0', STR_PAD_LEFT);
+$LeftOvers = $pdf->addText($FormDesign->GRNNumber->x+3,$Page_Height-$FormDesign->GRNNumber->y,$FormDesign->GRNNumber->FontSize, '凭证编号:'.$JournalNo,'right' );
+$LeftOvers = $pdf->addText($FormDesign->OrderNumber->x+3,$Page_Height-$FormDesign->OrderNumber->y,$FormDesign->OrderNumber->FontSize, '记 账 凭 证 ');
+$LeftOvers = $pdf->addText($FormDesign->PrintDate->x+3,$Page_Height-$FormDesign->PrintDate->y,$FormDesign->PrintDate->FontSize, _('Printed').':' . Date($_SESSION['DefaultDateFormat']), 'right');
+$pdf->setlineStyle(array('width'=>1.2));
+$pdf->SetLineStyle(array('color'=>array(0,0,255)));
+/*Draw a rectangle to put the headings in     */
+$pdf->Rectangle($FormDesign->HeaderRectangle->x+3, $Page_Height - $FormDesign->HeaderRectangle->y, $FormDesign->HeaderRectangle->width,$FormDesign->HeaderRectangle->height);
+
+/*set up the headings */
+$LeftOvers = $pdf->addText($FormDesign->Headings->Column1->x+3,$Page_Height - $FormDesign->Headings->Column1->y, $FormDesign->Headings->Column1->FontSize,  '摘   要');
+$LeftOvers = $pdf->addText($FormDesign->Headings->Column2->x+3,$Page_Height - $FormDesign->Headings->Column2->y, $FormDesign->Headings->Column2->FontSize,  '科目代码');
+$LeftOvers = $pdf->addText($FormDesign->Headings->Column3->x+3,$Page_Height - $FormDesign->Headings->Column3->y, $FormDesign->Headings->Column3->FontSize,  '科目名称');
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column4->x+3,$Page_Height - $FormDesign->Headings->Column4->y, $FormDesign->Headings->Column4->Length,$FormDesign->Headings->Column4->FontSize, '借方金额            贷方金额', 'right');
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column5->x+3,$Page_Height - $FormDesign->Headings->Column5->y, $FormDesign->Headings->Column5->Length,$FormDesign->Headings->Column5->FontSize,  '千百十万千.百十元角分', 'right');
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column6->x+3,$Page_Height - $FormDesign->Headings->Column6->y, $FormDesign->Headings->Column6->Length,$FormDesign->Headings->Column6->FontSize,  '千百十万千.百十元角分', 'right');
+
+
+
+$LeftOvers = $pdf->addText($FormDesign->ReceiptDate->x+3,$Page_Height-$FormDesign->ReceiptDate->y,$FormDesign->ReceiptDate->FontSize, '记账日期: '.ConvertSQLDate($JournalDate));
+
+$tmpX=$FormDesign->SignedFor->x+3;
+$tmpY=$Page_Height-$FormDesign->SignedFor->y;
+$tmpFz=$FormDesign->SignedFor->FontSize;
+$LeftOvers = $pdf->addText($tmpX,$tmpY,$tmpFz, '会计主管:');
+$LeftOvers = $pdf->addText($tmpX+220,$tmpY,$tmpFz, '复核:');
+$LeftOvers = $pdf->addText($tmpX+405,$tmpY,$tmpFz, '制单:');
+
+if ($JournalNo=='Preview') {
+       $realname = 'cncerp';
+} else {
+       //list($userid,$realname,$stepdate)=getTransBy($TypeID,$JournalNo);//
+}
+$pdf->addText($tmpX+430,$tmpY,$tmpFz, $realname);
+
+$pdf->addText($tmpX+50,$tmpY,$tmpFz, '');
+$pdf->addText($tmpX+250,$tmpY,$tmpFz, '');
+$pdf->addText($tmpX+335,$tmpY,$tmpFz, '');
+$pdf->addText($tmpX+450,$tmpY,$tmpFz, '');
+
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column7->x+3,$Page_Height - $FormDesign->Headings->Column7->y, $FormDesign->Headings->Column7->Length,$FormDesign->Headings->Column7->FontSize, '过次页', 'right');
+/*Draw a rectangle to put the data in     */
+$pdf->setlineStyle(array('width'=>1.2));
+$pdf->Rectangle($FormDesign->DataRectangle->x+3, $Page_Height - $FormDesign->DataRectangle->y, $FormDesign->DataRectangle->width,$FormDesign->DataRectangle->height);
+$pdf->setlineStyle(array('width'=>0.2));
+$pdf->Line($FormDesign->LineAboveFooter->startx, $Page_Height - $FormDesign->LineAboveFooter->starty, $FormDesign->LineAboveFooter->endx,$Page_Height - $FormDesign->LineAboveFooter->endy);
+
+$pdf->setlineStyle(array('width'=>0.2));
+$pdf->Line($FormDesign->Column1->startx, $Page_Height - $FormDesign->Column1->starty, $FormDesign->Column1->endx,$Page_Height - $FormDesign->Column1->endy);
+$pdf->Line($FormDesign->Column2->startx, $Page_Height - $FormDesign->Column2->starty, $FormDesign->Column2->endx,$Page_Height - $FormDesign->Column2->endy);
+$pdf->Line($FormDesign->Column3->startx, $Page_Height - $FormDesign->Column3->starty, $FormDesign->Column3->endx,$Page_Height - $FormDesign->Column3->endy);
+$pdf->Line($FormDesign->Column4->startx, $Page_Height - $FormDesign->Column4->starty, $FormDesign->Column4->endx,$Page_Height - $FormDesign->Column4->endy);
+$pdf->Line($FormDesign->Column5->startx, $Page_Height - $FormDesign->Column5->starty, $FormDesign->Column5->endx,$Page_Height - $FormDesign->Column5->endy);
+$pdf->setlineStyle(array('width'=>1.2));
+
+$pdf->Line($FormDesign->Column6->startx, $Page_Height - $FormDesign->Column6->starty, $FormDesign->Column6->endx,$Page_Height - $FormDesign->Column6->endy);
+$pdf->setlineStyle(array('width'=>0.2));
+
+$pdf->Line($FormDesign->Column7->startx, $Page_Height - $FormDesign->Column7->starty, $FormDesign->Column7->endx,$Page_Height - $FormDesign->Column7->endy);
+$pdf->Line($FormDesign->Column8->startx, $Page_Height - $FormDesign->Column8->starty, $FormDesign->Column8->endx,$Page_Height - $FormDesign->Column8->endy);
+$pdf->setlineStyle(array('width'=>1.2));
+
+$pdf->Line($FormDesign->Column9->startx, $Page_Height - $FormDesign->Column9->starty, $FormDesign->Column9->endx,$Page_Height - $FormDesign->Column9->endy);
+$pdf->setlineStyle(array('width'=>0.2));
+
+$pdf->Line($FormDesign->Column10->startx, $Page_Height - $FormDesign->Column10->starty, $FormDesign->Column10->endx,$Page_Height - $FormDesign->Column10->endy);
+$pdf->Line($FormDesign->Column11->startx, $Page_Height - $FormDesign->Column11->starty, $FormDesign->Column11->endx,$Page_Height - $FormDesign->Column11->endy);
+$pdf->setlineStyle(array('width'=>1.2));
+$pdf->SetLineStyle(array('color'=>array(255,50,0)));
+$pdf->Line($FormDesign->Column12->startx, $Page_Height - $FormDesign->Column12->starty, $FormDesign->Column12->endx,$Page_Height - $FormDesign->Column12->endy);
+$pdf->setlineStyle(array('width'=>0.2));
+$pdf->SetLineStyle(array('color'=>array(0,0,255)));
+$pdf->Line($FormDesign->Column13->startx, $Page_Height - $FormDesign->Column13->starty, $FormDesign->Column13->endx,$Page_Height - $FormDesign->Column13->endy);
+$pdf->Line($FormDesign->Column14->startx, $Page_Height - $FormDesign->Column14->starty, $FormDesign->Column14->endx,$Page_Height - $FormDesign->Column14->endy);
+$pdf->Line($FormDesign->Column15->startx, $Page_Height - $FormDesign->Column15->starty, $FormDesign->Column15->endx,$Page_Height - $FormDesign->Column15->endy);
+$pdf->Line($FormDesign->Column16->startx, $Page_Height - $FormDesign->Column16->starty, $FormDesign->Column16->endx,$Page_Height - $FormDesign->Column16->endy);
+$pdf->setlineStyle(array('width'=>1.2));
+
+$pdf->Line($FormDesign->Column17->startx, $Page_Height - $FormDesign->Column17->starty, $FormDesign->Column17->endx,$Page_Height - $FormDesign->Column17->endy);
+$pdf->setlineStyle(array('width'=>0.2));
+
+$pdf->Line($FormDesign->Column18->startx, $Page_Height - $FormDesign->Column18->starty, $FormDesign->Column18->endx,$Page_Height - $FormDesign->Column18->endy);
+$pdf->Line($FormDesign->Column19->startx, $Page_Height - $FormDesign->Column19->starty, $FormDesign->Column19->endx,$Page_Height - $FormDesign->Column19->endy);
+$pdf->setlineStyle(array('width'=>1.2));
+
+$pdf->Line($FormDesign->Column20->startx, $Page_Height - $FormDesign->Column20->starty, $FormDesign->Column20->endx,$Page_Height - $FormDesign->Column20->endy);
+$pdf->setlineStyle(array('width'=>0.2));
+
+$pdf->Line($FormDesign->Column21->startx, $Page_Height - $FormDesign->Column21->starty, $FormDesign->Column21->endx,$Page_Height - $FormDesign->Column21->endy);
+$pdf->Line($FormDesign->Column22->startx, $Page_Height - $FormDesign->Column22->starty, $FormDesign->Column22->endx,$Page_Height - $FormDesign->Column22->endy);
+$pdf->setlineStyle(array('width'=>1.2));
+$pdf->SetLineStyle(array('color'=>array(255,50,0)));
+$pdf->Line($FormDesign->Column23->startx, $Page_Height - $FormDesign->Column23->starty, $FormDesign->Column23->endx,$Page_Height - $FormDesign->Column23->endy);
+$pdf->setlineStyle(array('width'=>0.2));
+$pdf->SetLineStyle(array('color'=>array(0,0,255)));
+$pdf->Line($FormDesign->Column24->startx, $Page_Height - $FormDesign->Column24->starty, $FormDesign->Column24->endx,$Page_Height - $FormDesign->Column24->endy);
+
+$pdf->Line($FormDesign->Column25->startx, $Page_Height - $FormDesign->Column25->starty, $FormDesign->Column25->endx,$Page_Height - $FormDesign->Column25->endy);
+$pdf->Line($FormDesign->Column26->startx, $Page_Height - $FormDesign->Column26->starty, $FormDesign->Column26->endx,$Page_Height - $FormDesign->Column26->endy);
+$pdf->Line($FormDesign->Column27->startx, $Page_Height - $FormDesign->Column27->starty, $FormDesign->Column27->endx,$Page_Height - $FormDesign->Column27->endy);
+$pdf->Line($FormDesign->Column28->startx, $Page_Height - $FormDesign->Column28->starty, $FormDesign->Column28->endx,$Page_Height - $FormDesign->Column28->endy);
+$pdf->Line($FormDesign->Column29->startx, $Page_Height - $FormDesign->Column29->starty, $FormDesign->Column29->endx,$Page_Height - $FormDesign->Column29->endy);
+$pdf->Line($FormDesign->Column30->startx, $Page_Height - $FormDesign->Column30->starty, $FormDesign->Column30->endx,$Page_Height - $FormDesign->Column30->endy);
+$pdf->Line($FormDesign->Column31->startx, $Page_Height - $FormDesign->Column31->starty, $FormDesign->Column31->endx,$Page_Height - $FormDesign->Column31->endy);
+$pdf->Line($FormDesign->Column32->startx, $Page_Height - $FormDesign->Column32->starty, $FormDesign->Column32->endx,$Page_Height - $FormDesign->Column32->endy);
+$pdf->Line($FormDesign->Column34->startx, $Page_Height - $FormDesign->Column34->starty, $FormDesign->Column34->endx,$Page_Height - $FormDesign->Column34->endy);
+$pdf->Line($FormDesign->Column35->startx, $Page_Height - $FormDesign->Column35->starty, $FormDesign->Column35->endx,$Page_Height - $FormDesign->Column35->endy);
+
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column10->x+3,$Page_Height - $FormDesign->Headings->Column10->y, $FormDesign->Headings->Column10->Length,$FormDesign->Headings->Column10->FontSize,  '附', 'right');
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column11->x+3,$Page_Height - $FormDesign->Headings->Column11->y, $FormDesign->Headings->Column11->Length,$FormDesign->Headings->Column11->FontSize,  '件', 'right');
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column12->x+3,$Page_Height - $FormDesign->Headings->Column12->y, $FormDesign->Headings->Column12->Length,$FormDesign->Headings->Column12->FontSize,  '张', 'right');
+$PageNumber++;
+?>

Modified: trunk/includes/PDFStarter.php
===================================================================
--- trunk/includes/PDFStarter.php       2016-08-02 06:29:19 UTC (rev 7577)
+++ trunk/includes/PDFStarter.php       2016-08-02 10:02:32 UTC (rev 7578)
@@ -108,7 +108,20 @@
                $Left_Margin=50;
                $Right_Margin=40;
                break;
+
+   case 'P/3/A4_pingzheng':

+               $DocumentPaper = 'Z2';
+               $DocumentOrientation ='L';
+
+               $Page_Width=595;
+               $Page_Height=320;
+               $Top_Margin=10;
+               $Bottom_Margin=10;
+               $Left_Margin=20;
+               $Right_Margin=10;
+               break;
+
    case 'Letter': // 216mm x 279mm

                $DocumentPaper = 'LETTER';

Modified: trunk/includes/tcpdf/include/tcpdf_static.php
===================================================================
--- trunk/includes/tcpdf/include/tcpdf_static.php       2016-08-02 06:29:19 UTC (rev 7577)
+++ trunk/includes/tcpdf/include/tcpdf_static.php       2016-08-02 10:02:32 UTC (rev 7578)
@@ -823,6 +823,7 @@
                        case 'FR_COURONNE'         : {$pf = array( 1020.472, 1303.937); break;}
                        case 'FR_TELLIERE'         : {$pf = array(  963.780, 1247.244); break;}
                        case 'FR_POT'              : {$pf = array(  878.740, 1133.858); break;}
+                       case 'Z2'                  : {$pf = array(  560.80,320.76);     break;}
                        // DEFAULT ISO A4
                        default: {$pf = array(  595.276,  841.890); break;}
                }
@@ -2840,4 +2841,4 @@
 //============================================================+
 // END OF FILE
 //============================================================+
-?>
\ No newline at end of file
+?>

Modified: trunk/sql/mysql/upgrade4.13-4.13.1.sql
===================================================================
--- trunk/sql/mysql/upgrade4.13-4.13.1.sql      2016-08-02 06:29:19 UTC (rev 7577)
+++ trunk/sql/mysql/upgrade4.13-4.13.1.sql      2016-08-02 10:02:32 UTC (rev 7578)
@@ -1,5 +1,6 @@
 INSERT INTO scripts VALUES ('InternalStockRequestInquiry.php',1,'Internal Stock Request inquiry');
 ALTER table stockrequest ADD initiator varchar(20) NOT NULL DEFAULT '';
 INSERT INTO securitytokens VALUES (19,'Internal stock request fully access authority');
+INSERT INTO scripts VALUES ('PDFGLJournalCN.php',1,'Print GL Journal Chinese version');




------------------------------------------------------------------------------
_______________________________________________
Web-erp-svn mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-svn


------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: [Web-erp-svn] SF.net SVN: web-erp:[7578] trunk

ExsonQu
Administrator
Hi, Rafael,

              Thank you for review the code and sorry for the delay.
              It maybe a ugly solution for a customized paper size.  The revision's purpose is to ensure different types of printers to set the paper size correctly.
              If you have better solution, just let me know.
              Thanks and best regards!
              Exson
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: [Web-erp-svn] SF.net SVN: web-erp:[7578] trunk

Rafael Chacón
HI Exson,

Thank you for your work, and do not worry for the delay.

All right, I will work on a proposal. This customised paper size Z2 is a local standard? I explain my self: Here, in my country, some people use a "half-letter" paper size; it is like a "standard" for that people (banking, finance, etc.).
If so, is there a paper size "Z1"?

Best regards, Rafael.

2016-08-10 20:09 GMT-06:00 ExsonQu <[hidden email]>:
*Hi, Rafael,*

              Thank you for review the code and sorry for the delay.
              It maybe a ugly solution for a customized paper size.  The
revision's purpose is to ensure different types of printers to set the paper
size correctly.
              If you have better solution, just let me know.
              Thanks and best regards!
              Exson



--
View this message in context: http://weberp-accounting.1478800.n4.nabble.com/Fwd-Web-erp-svn-SF-net-SVN-web-erp-7578-trunk-tp4658651p4658656.html
Sent from the web-ERP-developers mailing list archive at Nabble.com.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Loading...