Rerun. Reports checked for warnings.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 25 Jan 2010 13:31:59 +0000 (13:31 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 25 Jan 2010 13:31:59 +0000 (13:31 +0000)
CHANGELOG.txt
reporting/includes/doctext.inc
reporting/includes/doctext2.inc
reporting/includes/header2.inc
reporting/rep109.php
reporting/rep111.php
reporting/rep112.php
reporting/rep209.php

index 97e87261f8e0d1902dd2750db618cc0c6dd2d8a4..6a6dbddbd95230693d127f2cbb02678ed8691a83 100644 (file)
@@ -22,7 +22,6 @@ $ -> Affected files
 25-Jan-2010 Joe Hunt
 # Bug in the sequence in sales price pickup
 $ /sales/includes/sales_db.inc
-
 + Added document Receipt and small rearrangements and bugfixes
 $ /includes/types.inc
   /includes/ui/ui_view.inc
index e15a5df9305bb728eb02f1d56c05369184bb23ba..c76cfed9a7f92f80bc79de5aa8ca6b47fc9ac191 100644 (file)
@@ -56,12 +56,11 @@ if (isset($header2type))
        }
        $doc_Our_VAT_no = _("Our VAT No.");
        $doc_Domicile = _("Domicile");
+       $doc_Extra = "";
        if($doctype == ST_CUSTDELIVERY || $doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER ||
                $doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT) {
                if ($doctype == ST_CUSTPAYMENT)
                        $doc_Extra = _("* Subject to Realisation of the Cheque.");
-               else    
-                       $doc_Extra = "";
                $doc_Bank_Account = '';
                $doc_Please_Quote = _("All amounts stated in");
   } else {
index 2550dbb7247eca23da79deb3e35442e15e73901f..761f60f75a88f30cd019bd541b249b940905a9c6 100644 (file)
@@ -54,14 +54,13 @@ if (isset($header2type))
                $doc_Customers_Ref = "Customers Reference";
                $doc_Our_Order_No = "Our Order No";
        }
+       $doc_Extra = "";
        $doc_Our_VAT_no = "Our VAT No.";
        $doc_Domicile = "Domicile";
        if($doctype == ST_CUSTDELIVERY || $doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER ||
                $doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT) {
                if ($doctype == ST_CUSTPAYMENT)
                        $doc_Extra = "* Subject to Realisation of the Cheque.";
-               else    
-                       $doc_Extra = "";
                $doc_Bank_Account = '';
                $doc_Please_Quote = "All amounts stated in";
   } else {
index ab21d9f22334df2fca8247787e3fc805b40b4c1b..6a8c3b8efd73a9e80cc9f2c91c41e66a30f0a3da 100644 (file)
                        $this->row = $temp;
                        if ($doctype == ST_PURCHORDER)
                                $this->Text($mcol, $this->company['coy_name']);
-                       elseif ($doctype != ST_SUPPAYMENT)
+                       elseif ($doctype != ST_SUPPAYMENT && isset($sales_order['deliver_to']))
                                $this->Text($mcol, $sales_order['deliver_to']);
                        $this->NewLine();
-                       if ($doctype != ST_SUPPAYMENT)
+                       if ($doctype != ST_SUPPAYMENT && isset($sales_order['deliver_to']))
                                $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $sales_order['delivery_address']);
                }
                $this->row = $iline2 - $this->lineHeight - 1;
                        $this->TextWrap($col, $this->row, $width, $myrow['wo_ref'], 'C');
                elseif (isset($sales_order["customer_ref"]))
                        $this->TextWrap($col, $this->row, $width, $sales_order["customer_ref"], 'C');
-               else
+               elseif (isset($myrow["debtor_ref"]))
                        $this->TextWrap($col, $this->row, $width, $myrow["debtor_ref"], 'C');
                $col += $width; 
                if ($branch != null)
index a6a4a434e9b08f12952221aceea5dee802532017..2c3bb116e54e4c3ad0c8fc9c1d0b694e17dc1608 100644 (file)
@@ -158,7 +158,7 @@ function print_sales_orders()
                else    
                        $rep->TextCol(3, 6, $doc_TOTAL_ORDER2, - 2);
                $rep->TextCol(6, 7,     $DisplayTotal, -2);
-               $words = price_in_words($myrow['Total'], ST_SALESORDER);
+               $words = price_in_words($myrow["freight_cost"] + $SubTotal, ST_SALESORDER);
                if ($words != "")
                {
                        $rep->NewLine(1);
index a8440dfd9b7e1c6c9a4be834a3d06180164481dc..5db2f9d06dd40f8ce9281e46d4c1eea7228f35fa 100644 (file)
@@ -142,7 +142,7 @@ function print_sales_quotations()
                else    
                        $rep->TextCol(3, 6, $doc_TOTAL_ORDER2, - 2);
                $rep->TextCol(6, 7,     $DisplayTotal, -2);
-               $words = price_in_words($myrow['Total'], ST_SALESQUOTE);
+               $words = price_in_words($myrow["freight_cost"] + $SubTotal, ST_SALESQUOTE);
                if ($words != "")
                {
                        $rep->NewLine(1);
index 07e312cd9a514a24ed13859e25b0e71981926434..87d87ce5881e3b3f6486c3364399a07a438b4c29 100644 (file)
@@ -88,13 +88,10 @@ function print_receipts()
 
        $cur = get_company_Pref('curr_default');
 
-       if ($email == 0)
-       {
-               $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize());
-               $rep->currency = $cur;
-               $rep->Font();
-               $rep->Info($params, $cols, null, $aligns);
-       }
+       $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize());
+       $rep->currency = $cur;
+       $rep->Font();
+       $rep->Info($params, $cols, null, $aligns);
 
        for ($i = $fno[0]; $i <= $tno[0]; $i++)
        {
@@ -178,8 +175,7 @@ function print_receipts()
                        $rep->TextCol(6, 7, "__________________");
                }       
        }
-       if ($email == 0)
-               $rep->End();
+       $rep->End();
 }
 
 ?>
\ No newline at end of file
index cbdf485f2a9ddec60fd6e493e358f425a4057a1d..87b9f559a623ce49e356e5873f2dad1239f96c9b 100644 (file)
@@ -167,7 +167,7 @@ function print_po()
                $rep->Font('bold');
                $rep->TextCol(3, 6, $doc_TOTAL_PO, - 2);
                $rep->TextCol(6, 7,     $DisplayTotal, -2);
-               $words = price_in_words($myrow['Total'], ST_PURCHORDER);
+               $words = price_in_words($SubTotal, ST_PURCHORDER);
                if ($words != "")
                {
                        $rep->NewLine(1);