company_path() helper used.
[fa-stable.git] / reporting / includes / doctext2.inc
1 <?php
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))
13 {
14         $doc_Cust_no = "Cust no";
15         $doc_Date = "Date";
16         if ($doctype == ST_PURCHORDER || $doctype == ST_SUPPAYMENT) // Purchase Order
17         {
18                 $doc_Charge_To = "Order To";
19                 $doc_Delivered_To = "Charge To";
20         }
21         else
22         {
23                 if ($doctype == ST_CUSTPAYMENT)
24                         $doc_Charge_To = "With thanks from";
25                 else    
26                         $doc_Charge_To = "Charge To";
27                 $doc_Delivered_To = "Delivered To";
28         }       
29         $doc_Shipping_Company = "Shipping Company";
30         if ($doctype == ST_SALESQUOTE)
31                 $doc_Due_Date = "Valid until";
32         elseif ($doctype == ST_SALESORDER)
33                 $doc_Due_Date = "Delivery Date";
34         else
35                 $doc_Due_Date = "Due Date";
36         $doc_Your_Ref = "Your Ref";
37         if ($doctype == ST_WORKORDER)
38         {
39                 $doc_Our_Ref = "Type";
40                 $doc_Your_VAT_no = "Manufactured Item";
41                 $doc_Payment_Terms = "Required By";
42                 $doc_Customers_Ref = "Reference";
43                 $doc_Our_Order_No = "Into Location";
44                 $doc_Due_Date = "Quantity";
45         }       
46         else
47         {
48                 if ($doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT)
49                         $doc_Our_Ref = "Type";
50                 else    
51                         $doc_Our_Ref = "Sales Person";
52                 $doc_Your_VAT_no = "Your VAT no.";
53                 $doc_Payment_Terms = "Payment Terms";
54                 $doc_Customers_Ref = "Customers Reference";
55                 $doc_Our_Order_No = "Our Order No";
56         }
57         $doc_Extra = "";
58         $doc_Our_VAT_no = "Our VAT No.";
59         $doc_Domicile = "Domicile";
60         if($doctype == ST_CUSTDELIVERY || $doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER ||
61                 $doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT) {
62                 if ($doctype == ST_CUSTPAYMENT)
63                         $doc_Extra = "* Subject to Realisation of the Cheque.";
64                 $doc_Bank_Account = '';
65                 $doc_Please_Quote = "All amounts stated in";
66   } else {
67          $doc_Please_Quote = "Please quote ".($doctype==ST_SALESINVOICE ? "Invoice" : "Credit")
68                 ." no. when paying. All amounts stated in";
69          $doc_Bank_Account = "Bank Account";
70         }
71         $doc_Address = "Address";
72         $doc_Phone_Fax_Email = "Phone/Fax/Email";
73         $doc_Bank = "Bank";
74         $doc_Payment_Link = "You can pay through";
75         if ($doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER || $doctype == ST_SALESINVOICE || 
76                 $doctype == ST_CUSTCREDIT || $doctype == ST_CUSTDELIVERY || $doctype == ST_WORKORDER || $doctype == ST_SUPPAYMENT || 
77                 $doctype == ST_CUSTPAYMENT)
78         {
79                 if ($doctype == ST_SALESQUOTE)
80                         $this->title = "SALES QUOTATION";
81                 elseif ($doctype == ST_PURCHORDER)
82                         $this->title = "PURCHASE ORDER";
83                 elseif ($doctype == ST_SALESORDER)
84                         $this->title = ($print_as_quote==1 ? "QUOTE" : "SALES ORDER");
85                 elseif ($doctype == ST_SALESINVOICE)
86                         $this->title = "INVOICE";
87                 elseif ($doctype == ST_CUSTDELIVERY)
88                         $this->title = ($packing_slip==1 ? "PACKING SLIP" : "DELIVERY NOTE");
89                 elseif ($doctype == ST_WORKORDER)
90                         $this->title = "WORK ORDER";
91                 elseif ($doctype == ST_SUPPAYMENT)
92                         $this->title = "REMITTANCE";
93                 elseif ($doctype == ST_CUSTPAYMENT)
94                         $this->title = "RECEIPT";
95                 else
96                         $this->title = "CREDIT NOTE";
97                 if ($doctype == ST_PURCHORDER)
98                         $this->headers = array('Item Code', 'Item Description', 'Delivery Date',
99                                 'Quantity', 'Unit',     'Price', 'Total');
100                 elseif ($doctype == ST_WORKORDER)
101                         $this->headers = array("Item Code", "Item Description",
102                                 "From Location", "Work Centre",         "Unit Quantity", "Total Quantity", "Units Issued");
103                 elseif ($doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT)
104                         $this->headers = array('Trans Type', '#', 'Date', 'Due Date', 'Total Amount', 'Left to Allocate', 'This Allocation');
105                 else
106                         $this->headers = array('Item Code', 'Item Description', 'Quantity', 'Unit',
107                                 'Price', 'Discount %', 'Total');
108         }
109         elseif ($doctype == ST_STATEMENT)
110         {
111                 $this->title = "STATEMENT";
112                 $this->headers = array('Trans Type', '#', 'Date', 'Due Date', 'Charges',
113                         'Credits', 'Allocated', 'Outstanding');
114         }
115 }
116 if (isset($emailtype))
117 {
118         $doc_Dear_Sirs = "Dear";
119         $doc_AttachedFile = "Attached you will find ";
120         $doc_Kindest_regards = "Kindest regards";
121         $doc_Payment_Link = "You can pay through";
122 }
123 if (isset($header2type) || isset($linetype))
124 {
125         $doc_Invoice_no = ($doctype==ST_CUSTDELIVERY ? "Delivery Note No." :
126                 ($doctype == ST_CUSTPAYMENT ? "Receipt No." :
127                 ($doctype == ST_SUPPAYMENT ? "Remittance No." :
128                 (($doctype == ST_SALESQUOTE || $doctype==ST_PURCHORDER || $doctype==ST_SALESORDER) ? "Order no." : 
129                 ($doctype==ST_SALESINVOICE ? "Invoice No." : ($doctype == ST_WORKORDER ? "Work Order No." : "Credit No."))))));
130         $doc_Delivery_no = "Delivery Note No.";
131         $doc_Order_no = "Order No.";
132 }
133 if (isset($linetype))
134 {
135         if ($doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER || $doctype == ST_SALESINVOICE || 
136                 $doctype == ST_CUSTCREDIT || $doctype == ST_CUSTDELIVERY)
137         {
138                 $doc_Sub_total = "Sub-total";
139                 $doc_Shipping = "Shipping";
140                 $doc_Included = "Included";
141                 $doc_Amount = "amount";
142                 $doc_TOTAL_INVOICE = $doctype==ST_SALESINVOICE ? "TOTAL INVOICE" : "TOTAL CREDIT";
143                 $doc_TOTAL_ORDER = "TOTAL ORDER EX VAT";
144                 $doc_TOTAL_ORDER2 = "TOTAL ORDER VAT INCL.";
145                 $doc_TOTAL_PO = "TOTAL PO EX VAT";
146                 $doc_TOTAL_DELIVERY = "TOTAL DELIVERY INCL. VAT";
147         }
148         elseif ($doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT)
149         {
150                 $doc_Towards = "As advance / full / part / payment towards:";
151                 $doc_by_Cheque = "By Cash / Cheque* / Draft No.";
152                 $doc_Dated = "Dated";
153                 $doc_Drawn = "Drawn on Bank";
154                 $doc_Drawn_Branch = "Branch";
155                 $doc_Received = "Received / Sign";
156                 $doc_Total_Allocated = "Total Allocated";
157                 $doc_Left_To_Allocate = "Left to Allocate";
158                 if ($doctype == ST_CUSTPAYMENT)
159                         $doc_Total_Payment = "TOTAL RECEIPT";
160                 else    
161                         $doc_Total_Payment = "TOTAL REMITTANCE";
162         }
163         elseif ($doctype == ST_STATEMENT)
164         {
165                 $doc_Outstanding = "Outstanding Transactions";
166                 $doc_Current = "Current";
167                 $doc_Total_Balance = "Total Balance";
168                 $doc_Statement = "Statement";
169                 $doc_as_of = "as of";
170                 $doc_Days = "Days";
171                 $doc_Over = "Over";
172         }
173 }
174 ?>