2 /**********************************************************************
3 Copyright (C) FrontAccounting, LLC.
4 Released under the terms of the GNU General Public License, GPL,
5 as published by the Free Software Foundation, either version 3
6 of the License, or (at your option) any later version.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
12 if (isset($header2type))
14 $doc_Cust_no = "Cust no";
16 if ($doctype == ST_PURCHORDER || $doctype == ST_SUPPAYMENT) // Purchase Order
18 $doc_Charge_To = "Order To";
19 if ($doctype == ST_PURCHORDER)
20 $doc_Delivered_To = "Deliver To";
22 $doc_Delivered_To = "Charge To";
26 if ($doctype == ST_CUSTPAYMENT)
27 $doc_Charge_To = "With thanks from";
29 $doc_Charge_To = "Charge To";
30 $doc_Delivered_To = "Delivered To";
32 $doc_Shipping_Company = "Shipping Company";
33 if ($doctype == ST_SALESQUOTE)
34 $doc_Due_Date = "Valid until";
35 elseif ($doctype == ST_SALESORDER)
36 $doc_Due_Date = "Delivery Date";
38 $doc_Due_Date = "Due Date";
39 $doc_Your_Ref = "Your Ref";
40 if ($doctype == ST_WORKORDER)
42 $doc_Our_Ref = "Type";
43 $doc_Your_VAT_no = "Manufactured Item";
44 $doc_Payment_Terms = "Required By";
45 $doc_Customers_Ref = "Reference";
46 $doc_Our_Order_No = "Into Location";
47 $doc_Due_Date = "Quantity";
51 if ($doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT)
52 $doc_Our_Ref = "Type";
54 $doc_Our_Ref = "Sales Person";
55 $doc_Your_VAT_no = "Your VAT no.";
56 $doc_Payment_Terms = "Payment Terms";
57 $doc_Customers_Ref = "Customers Reference";
58 $doc_Our_Order_No = "Our Order No";
61 $doc_Our_VAT_no = "Our VAT No.";
62 $doc_Domicile = "Domicile";
63 if($doctype == ST_CUSTDELIVERY || $doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER ||
64 $doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT) {
65 if ($doctype == ST_CUSTPAYMENT)
66 $doc_Extra = "* Subject to Realisation of the Cheque.";
67 $doc_Bank_Account = '';
68 $doc_Please_Quote = "All amounts stated in";
70 $doc_Please_Quote = "Please quote ".($doctype==ST_SALESINVOICE ? "Invoice" : "Credit")
71 ." no. when paying. All amounts stated in";
72 $doc_Bank_Account = "Bank Account";
74 $doc_Address = "Address";
75 $doc_Phone_Fax_Email = "Phone/Fax/Email";
77 $doc_Payment_Link = "You can pay through";
78 if ($doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER || $doctype == ST_SALESINVOICE ||
79 $doctype == ST_CUSTCREDIT || $doctype == ST_CUSTDELIVERY || $doctype == ST_WORKORDER || $doctype == ST_SUPPAYMENT ||
80 $doctype == ST_CUSTPAYMENT)
82 if ($doctype == ST_SALESQUOTE)
83 $this->title = "SALES QUOTATION";
84 elseif ($doctype == ST_PURCHORDER)
85 $this->title = "PURCHASE ORDER";
86 elseif ($doctype == ST_SALESORDER)
87 $this->title = ($print_as_quote==1 ? "QUOTE" : "SALES ORDER");
88 elseif ($doctype == ST_SALESINVOICE)
89 $this->title = "INVOICE";
90 elseif ($doctype == ST_CUSTDELIVERY)
91 $this->title = ($packing_slip==1 ? "PACKING SLIP" : "DELIVERY NOTE");
92 elseif ($doctype == ST_WORKORDER)
93 $this->title = "WORK ORDER";
94 elseif ($doctype == ST_SUPPAYMENT)
95 $this->title = "REMITTANCE";
96 elseif ($doctype == ST_CUSTPAYMENT)
97 $this->title = "RECEIPT";
99 $this->title = "CREDIT NOTE";
100 if ($doctype == ST_PURCHORDER)
101 $this->headers = array('Item Code', 'Item Description', 'Delivery Date',
102 'Quantity', 'Unit', 'Price', 'Total');
103 elseif ($doctype == ST_WORKORDER)
104 $this->headers = array("Item Code", "Item Description",
105 "From Location", "Work Centre", "Unit Quantity", "Total Quantity", "Units Issued");
106 elseif ($doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT)
107 $this->headers = array('Trans Type', '#', 'Date', 'Due Date', 'Total Amount', 'Left to Allocate', 'This Allocation');
109 $this->headers = array('Item Code', 'Item Description', 'Quantity', 'Unit',
110 'Price', 'Discount %', 'Total');
112 elseif ($doctype == ST_STATEMENT)
114 $this->title = "STATEMENT";
115 $this->headers = array('Trans Type', '#', 'Date', 'Due Date', 'Charges',
116 'Credits', 'Allocated', 'Outstanding');
119 if (isset($emailtype))
121 $doc_Dear_Sirs = "Dear";
122 $doc_AttachedFile = "Attached you will find ";
123 $doc_Kindest_regards = "Kindest regards";
124 $doc_Payment_Link = "You can pay through";
126 if (isset($header2type) || isset($linetype))
128 $doc_Invoice_no = ($doctype==ST_CUSTDELIVERY ? "Delivery Note No." :
129 ($doctype == ST_CUSTPAYMENT ? "Receipt No." :
130 ($doctype == ST_SUPPAYMENT ? "Remittance No." :
131 (($doctype == ST_SALESQUOTE || $doctype==ST_PURCHORDER || $doctype==ST_SALESORDER) ? "Order no." :
132 ($doctype==ST_SALESINVOICE ? "Invoice No." : ($doctype == ST_WORKORDER ? "Work Order No." : "Credit No."))))));
133 $doc_Delivery_no = "Delivery Note No.";
134 $doc_Order_no = "Order No.";
136 if (isset($linetype))
138 if ($doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER || $doctype == ST_SALESINVOICE ||
139 $doctype == ST_CUSTCREDIT || $doctype == ST_CUSTDELIVERY)
141 $doc_Sub_total = "Sub-total";
142 $doc_Shipping = "Shipping";
143 $doc_Included = "Included";
144 $doc_Amount = "amount";
145 $doc_TOTAL_INVOICE = $doctype==ST_SALESINVOICE ? "TOTAL INVOICE" : "TOTAL CREDIT";
146 $doc_TOTAL_ORDER = "TOTAL ORDER EX VAT";
147 $doc_TOTAL_ORDER2 = "TOTAL ORDER VAT INCL.";
148 $doc_TOTAL_PO = "TOTAL PO EX VAT";
149 $doc_TOTAL_DELIVERY = "TOTAL DELIVERY INCL. VAT";
151 elseif ($doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT)
153 $doc_Towards = "As advance / full / part / payment towards:";
154 $doc_by_Cheque = "By Cash / Cheque* / Draft No.";
155 $doc_Dated = "Dated";
156 $doc_Drawn = "Drawn on Bank";
157 $doc_Drawn_Branch = "Branch";
158 $doc_Received = "Received / Sign";
159 $doc_Total_Allocated = "Total Allocated";
160 $doc_Left_To_Allocate = "Left to Allocate";
161 if ($doctype == ST_CUSTPAYMENT)
162 $doc_Total_Payment = "TOTAL RECEIPT";
164 $doc_Total_Payment = "TOTAL REMITTANCE";
166 elseif ($doctype == ST_STATEMENT)
168 $doc_Outstanding = "Outstanding Transactions";
169 $doc_Current = "Current";
170 $doc_Total_Balance = "Total Balance";
171 $doc_Statement = "Statement";
172 $doc_as_of = "as of";