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