Merged changes from main trunk 2.2.1-2.2.2
[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 == 8) // 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 == 7)
28                 $doc_Due_Date = "Valid until";
29         if ($doctype == 9)
30                 $doc_Due_Date = "Delivery Date";
31         else
32                 $doc_Due_Date = "Due Date";
33         $doc_Your_Ref = "Your Ref";
34         if ($doctype == 26)
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                 $doc_Our_Ref = "Our Ref.";
46                 $doc_Your_VAT_no = "Your VAT no.";
47                 $doc_Payment_Terms = "Payment Terms";
48                 $doc_Customers_Ref = "Customers Reference";
49                 $doc_Our_Order_No = "Our Order No";
50         }
51         $doc_Our_VAT_no = "Our VAT No.";
52         $doc_Domicile = "Domicile";
53         if($doctype == 13 || $doctype == 7 || $doctype == 8 || $doctype == 9) {
54          $doc_Bank_Account = '';
55          $doc_Please_Quote = "All amounts stated in";
56   } else {
57          $doc_Please_Quote = "Please quote ".($doctype==10 ? "Invoice" : "Credit")
58                 ." no. when paying. All amounts stated in";
59          $doc_Bank_Account = "Bank Account";
60         }
61         $doc_Address = "Address";
62         $doc_Phone_Fax_Email = "Phone/Fax/Email";
63         $doc_Bank = "Bank";
64         $doc_Bank_Account = "Bank Account";
65         $doc_Payment_Link = "You can pay through";
66         if ($doctype == 7 || $doctype == 8 || $doctype == 9 || $doctype == 10 || $doctype == 11 || $doctype == 13 || $doctype == 26)
67         {
68                 if ($doctype == 7)
69                         $this->title = "SALES QUOTATION";
70                 elseif ($doctype == 8)
71                         $this->title = "PURCHASE ORDER";
72                 elseif ($doctype == 9)
73                         $this->title = ($print_as_quote==1 ? "QUOTE" : "SALES ORDER");
74                 elseif ($doctype == 10)
75                         $this->title = "INVOICE";
76                 elseif ($doctype == 13)
77                         $this->title = ($packing_slip==1 ? "PACKING SLIP" : "DELIVERY NOTE");
78                 elseif ($doctype == 26)
79                         $this->title = "WORK ORDER";
80                 else
81                         $this->title = "CREDIT NOTE";
82                 if ($doctype == 8)
83                         $this->headers = array('Item Code', 'Item Description', 'Delivery Date',
84                                 'Quantity', 'Unit',     'Price', 'Total');
85                 elseif ($doctype == 26)
86                         $this->headers = array("Item Code", "Item Description",
87                                 "From Location", "Work Centre",         "Unit Quantity", "Total Quantity", "Units Issued");
88                 else
89                         $this->headers = array('Item Code', 'Item Description', 'Quantity', 'Unit',
90                                 'Price', 'Discount %', 'Total');
91         }
92         else if ($doctype == 12)
93         {
94                 $this->title = "STATEMENT";
95                 $this->headers = array('Trans Type', '#', 'Date', 'Due Date', 'Charges',
96                         'Credits', 'Allocated', 'Outstanding');
97         }
98 }
99 if (isset($emailtype))
100 {
101         $doc_Dear_Sirs = "Dear";
102         $doc_AttachedFile = "Attached you will find ";
103         $doc_Kindest_regards = "Kindest regards";
104         $doc_Payment_Link = "You can pay through";
105 }
106 if (isset($header2type) || isset($linetype))
107 {
108         $doc_Invoice_no = ($doctype==13 ? "Delivery Note No." : (($doctype == 7 || $doctype==8 || $doctype==9) ? "Order no." : 
109         ($doctype==10 ? "Invoice No." : ($doctype == 26 ? "Work Order No" : "Credit No."))));
110         $doc_Delivery_no = "Delivery Note No.";
111         $doc_Order_no = "Order no.";
112 }
113 if (isset($linetype))
114 {
115         if ($doctype == 7 || $doctype == 8 || $doctype == 9 || $doctype == 10 || $doctype == 11 || $doctype == 13)
116         {
117                 $doc_Sub_total = "Sub-total";
118                 $doc_Shipping = "Shipping";
119                 $doc_Included = "Included";
120                 $doc_Amount = "amount";
121                 $doc_TOTAL_INVOICE = $doctype==10 ? "TOTAL INVOICE" : "TOTAL CREDIT";
122                 $doc_TOTAL_ORDER = "TOTAL ORDER EX VAT";
123                 $doc_TOTAL_ORDER2 = "TOTAL ORDER VAT INCL.";
124                 $doc_TOTAL_PO = "TOTAL PO EX VAT";
125                 $doc_TOTAL_DELIVERY = "TOTAL DELIVERY INCL. VAT";
126         }
127         else if ($doctype == 12)
128         {
129                 $doc_Outstanding = "Outstanding Transactions";
130                 $doc_Current = "Current";
131                 $doc_Total_Balance = "Total Balance";
132                 $doc_Statement = "Statement";
133                 $doc_as_of = "as of";
134                 $doc_Days = "Days";
135                 $doc_Over = "Over";
136         }
137 }
138 ?>