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 $doc_Delivered_To = "Charge To";
23 $doc_Charge_To = "Charge To";
24 $doc_Delivered_To = "Delivered To";
26 $doc_Shipping_Company = "Shipping Company";
27 if ($doctype == ST_SALESQUOTE)
28 $doc_Due_Date = "Valid until";
29 elseif ($doctype == ST_SALESORDER)
30 $doc_Due_Date = "Delivery Date";
32 $doc_Due_Date = "Due Date";
33 $doc_Your_Ref = "Your Ref";
34 if ($doctype == ST_WORKORDER)
36 $doc_Our_Ref = "Type";
37 $doc_Your_VAT_no = "Manufactured Item";
38 $doc_Payment_Terms = "Required By";
39 $doc_Customers_Ref = "Reference";
40 $doc_Our_Order_No = "Into Location";
41 $doc_Due_Date = "Quantity";
45 if ($doctype == ST_SUPPAYMENT)
46 $doc_Our_Ref = "Type";
48 $doc_Our_Ref = "Sales Person";
49 $doc_Your_VAT_no = "Your VAT no.";
50 $doc_Payment_Terms = "Payment Terms";
51 $doc_Customers_Ref = "Customers Reference";
52 $doc_Our_Order_No = "Our Order No";
54 $doc_Our_VAT_no = "Our VAT No.";
55 $doc_Domicile = "Domicile";
56 if($doctype == ST_CUSTDELIVERY || $doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER ||
57 $doctype == ST_SUPPAYMENT) {
58 $doc_Bank_Account = '';
59 $doc_Please_Quote = "All amounts stated in";
61 $doc_Please_Quote = "Please quote ".($doctype==ST_SALESINVOICE ? "Invoice" : "Credit")
62 ." no. when paying. All amounts stated in";
63 $doc_Bank_Account = "Bank Account";
65 $doc_Address = "Address";
66 $doc_Phone_Fax_Email = "Phone/Fax/Email";
68 $doc_Payment_Link = "You can pay through";
69 if ($doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER || $doctype == ST_SALESINVOICE ||
70 $doctype == ST_CUSTCREDIT || $doctype == ST_CUSTDELIVERY || $doctype == ST_WORKORDER || $doctype == ST_SUPPAYMENT)
72 if ($doctype == ST_SALESQUOTE)
73 $this->title = "SALES QUOTATION";
74 elseif ($doctype == ST_PURCHORDER)
75 $this->title = "PURCHASE ORDER";
76 elseif ($doctype == ST_SALESORDER)
77 $this->title = ($print_as_quote==1 ? "QUOTE" : "SALES ORDER");
78 elseif ($doctype == ST_SALESINVOICE)
79 $this->title = "INVOICE";
80 elseif ($doctype == ST_CUSTDELIVERY)
81 $this->title = ($packing_slip==1 ? "PACKING SLIP" : "DELIVERY NOTE");
82 elseif ($doctype == ST_WORKORDER)
83 $this->title = "WORK ORDER";
84 elseif ($doctype == ST_SUPPAYMENT)
85 $this->title = "REMITTANCE";
87 $this->title = "CREDIT NOTE";
88 if ($doctype == ST_PURCHORDER)
89 $this->headers = array('Item Code', 'Item Description', 'Delivery Date',
90 'Quantity', 'Unit', 'Price', 'Total');
91 elseif ($doctype == ST_WORKORDER)
92 $this->headers = array("Item Code", "Item Description",
93 "From Location", "Work Centre", "Unit Quantity", "Total Quantity", "Units Issued");
94 elseif ($doctype == ST_SUPPAYMENT)
95 $this->headers = array('Trans Type', '#', 'Date', 'Due Date', 'Total Amount', 'Left to Allocate', 'This Allocation');
97 $this->headers = array('Item Code', 'Item Description', 'Quantity', 'Unit',
98 'Price', 'Discount %', 'Total');
100 elseif ($doctype == ST_CUSTPAYMENT)
102 $this->title = "STATEMENT";
103 $this->headers = array('Trans Type', '#', 'Date', 'Due Date', 'Charges',
104 'Credits', 'Allocated', 'Outstanding');
107 if (isset($emailtype))
109 $doc_Dear_Sirs = "Dear";
110 $doc_AttachedFile = "Attached you will find ";
111 $doc_Kindest_regards = "Kindest regards";
112 $doc_Payment_Link = "You can pay through";
114 if (isset($header2type) || isset($linetype))
116 $doc_Invoice_no = ($doctype==ST_CUSTDELIVERY ? "Delivery Note No." :
117 ($doctype == ST_SUPPAYMENT ? "Remittance No." :
118 (($doctype == ST_SALESQUOTE || $doctype==ST_PURCHORDER || $doctype==ST_SALESORDER) ? "Order no." :
119 ($doctype==ST_SALESINVOICE ? "Invoice No." : ($doctype == ST_WORKORDER ? "Work Order No" : "Credit No.")))));
120 $doc_Delivery_no = "Delivery Note No.";
121 $doc_Order_no = "Order no.";
123 if (isset($linetype))
125 if ($doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER || $doctype == ST_SALESINVOICE ||
126 $doctype == ST_CUSTCREDIT || $doctype == ST_CUSTDELIVERY)
128 $doc_Sub_total = "Sub-total";
129 $doc_Shipping = "Shipping";
130 $doc_Included = "Included";
131 $doc_Amount = "amount";
132 $doc_TOTAL_INVOICE = $doctype==ST_SALESINVOICE ? "TOTAL INVOICE" : "TOTAL CREDIT";
133 $doc_TOTAL_ORDER = "TOTAL ORDER EX VAT";
134 $doc_TOTAL_ORDER2 = "TOTAL ORDER VAT INCL.";
135 $doc_TOTAL_PO = "TOTAL PO EX VAT";
136 $doc_TOTAL_DELIVERY = "TOTAL DELIVERY INCL. VAT";
138 elseif ($doctype == ST_SUPPAYMENT)
140 $doc_Total_Allocated = "Total Allocated";
141 $doc_Left_To_Allocate = "Left to Allocate";
142 $doc_Total_Payment = "TOTAL REMITTANCE";
144 elseif ($doctype == ST_CUSTPAYMENT)
146 $doc_Outstanding = "Outstanding Transactions";
147 $doc_Current = "Current";
148 $doc_Total_Balance = "Total Balance";
149 $doc_Statement = "Statement";
150 $doc_as_of = "as of";