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