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