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