Added document Receipt and small rearrangements and bugfixes
[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_Our_VAT_no = "Our VAT No.";
58         $doc_Domicile = "Domicile";
59         if($doctype == ST_CUSTDELIVERY || $doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER ||
60                 $doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT) {
61                 if ($doctype == ST_CUSTPAYMENT)
62                         $doc_Extra = "* Subject to Realisation of the Cheque.";
63                 else    
64                         $doc_Extra = "";
65                 $doc_Bank_Account = '';
66                 $doc_Please_Quote = "All amounts stated in";
67   } else {
68          $doc_Please_Quote = "Please quote ".($doctype==ST_SALESINVOICE ? "Invoice" : "Credit")
69                 ." no. when paying. All amounts stated in";
70          $doc_Bank_Account = "Bank Account";
71         }
72         $doc_Address = "Address";
73         $doc_Phone_Fax_Email = "Phone/Fax/Email";
74         $doc_Bank = "Bank";
75         $doc_Payment_Link = "You can pay through";
76         if ($doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER || $doctype == ST_SALESINVOICE || 
77                 $doctype == ST_CUSTCREDIT || $doctype == ST_CUSTDELIVERY || $doctype == ST_WORKORDER || $doctype == ST_SUPPAYMENT || 
78                 $doctype == ST_CUSTPAYMENT)
79         {
80                 if ($doctype == ST_SALESQUOTE)
81                         $this->title = "SALES QUOTATION";
82                 elseif ($doctype == ST_PURCHORDER)
83                         $this->title = "PURCHASE ORDER";
84                 elseif ($doctype == ST_SALESORDER)
85                         $this->title = ($print_as_quote==1 ? "QUOTE" : "SALES ORDER");
86                 elseif ($doctype == ST_SALESINVOICE)
87                         $this->title = "INVOICE";
88                 elseif ($doctype == ST_CUSTDELIVERY)
89                         $this->title = ($packing_slip==1 ? "PACKING SLIP" : "DELIVERY NOTE");
90                 elseif ($doctype == ST_WORKORDER)
91                         $this->title = "WORK ORDER";
92                 elseif ($doctype == ST_SUPPAYMENT)
93                         $this->title = "REMITTANCE";
94                 elseif ($doctype == ST_CUSTPAYMENT)
95                         $this->title = "RECEIPT";
96                 else
97                         $this->title = "CREDIT NOTE";
98                 if ($doctype == ST_PURCHORDER)
99                         $this->headers = array('Item Code', 'Item Description', 'Delivery Date',
100                                 'Quantity', 'Unit',     'Price', 'Total');
101                 elseif ($doctype == ST_WORKORDER)
102                         $this->headers = array("Item Code", "Item Description",
103                                 "From Location", "Work Centre",         "Unit Quantity", "Total Quantity", "Units Issued");
104                 elseif ($doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT)
105                         $this->headers = array('Trans Type', '#', 'Date', 'Due Date', 'Total Amount', 'Left to Allocate', 'This Allocation');
106                 else
107                         $this->headers = array('Item Code', 'Item Description', 'Quantity', 'Unit',
108                                 'Price', 'Discount %', 'Total');
109         }
110         elseif ($doctype == ST_STATEMENT)
111         {
112                 $this->title = "STATEMENT";
113                 $this->headers = array('Trans Type', '#', 'Date', 'Due Date', 'Charges',
114                         'Credits', 'Allocated', 'Outstanding');
115         }
116 }
117 if (isset($emailtype))
118 {
119         $doc_Dear_Sirs = "Dear";
120         $doc_AttachedFile = "Attached you will find ";
121         $doc_Kindest_regards = "Kindest regards";
122         $doc_Payment_Link = "You can pay through";
123 }
124 if (isset($header2type) || isset($linetype))
125 {
126         $doc_Invoice_no = ($doctype==ST_CUSTDELIVERY ? "Delivery Note No." :
127                 ($doctype == ST_CUSTPAYMENT ? "Receipt No." :
128                 ($doctype == ST_SUPPAYMENT ? "Remittance No." :
129                 (($doctype == ST_SALESQUOTE || $doctype==ST_PURCHORDER || $doctype==ST_SALESORDER) ? "Order no." : 
130                 ($doctype==ST_SALESINVOICE ? "Invoice No." : ($doctype == ST_WORKORDER ? "Work Order No" : "Credit No."))))));
131         $doc_Delivery_no = "Delivery Note No.";
132         $doc_Order_no = "Order no.";
133 }
134 if (isset($linetype))
135 {
136         if ($doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER || $doctype == ST_SALESINVOICE || 
137                 $doctype == ST_CUSTCREDIT || $doctype == ST_CUSTDELIVERY)
138         {
139                 $doc_Sub_total = "Sub-total";
140                 $doc_Shipping = "Shipping";
141                 $doc_Included = "Included";
142                 $doc_Amount = "amount";
143                 $doc_TOTAL_INVOICE = $doctype==ST_SALESINVOICE ? "TOTAL INVOICE" : "TOTAL CREDIT";
144                 $doc_TOTAL_ORDER = "TOTAL ORDER EX VAT";
145                 $doc_TOTAL_ORDER2 = "TOTAL ORDER VAT INCL.";
146                 $doc_TOTAL_PO = "TOTAL PO EX VAT";
147                 $doc_TOTAL_DELIVERY = "TOTAL DELIVERY INCL. VAT";
148         }
149         elseif ($doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT)
150         {
151                 $doc_Towards = "As advance / full / part / payment towards:";
152                 $doc_by_Cheque = "By Cash / Cheque* / Draft No.";
153                 $doc_Dated = "Dated";
154                 $doc_Drawn = "Drawn on Bank";
155                 $doc_Drawn_Branch = "Branch";
156                 $doc_Received = "Received / Sign";
157                 $doc_Total_Allocated = "Total Allocated";
158                 $doc_Left_To_Allocate = "Left to Allocate";
159                 if ($doctype == ST_CUSTPAYMENT)
160                         $doc_Total_Payment = "TOTAL RECEIPT";
161                 else    
162                         $doc_Total_Payment = "TOTAL REMITTANCE";
163         }
164         elseif ($doctype == ST_STATEMENT)
165         {
166                 $doc_Outstanding = "Outstanding Transactions";
167                 $doc_Current = "Current";
168                 $doc_Total_Balance = "Total Balance";
169                 $doc_Statement = "Statement";
170                 $doc_as_of = "as of";
171                 $doc_Days = "Days";
172                 $doc_Over = "Over";
173         }
174 }
175 ?>