summaryrefslogtreecommitdiff
path: root/templates/Swedish-request_quotation.html
blob: daccd45b03d8a2b079980519be818f8108418728 (plain)
  1. <body bgcolor=ffffff>
  2. <table width="100%">
  3. <tr valign=bottom>
  4. <td width=10>&nbsp;</td>
  5. <td>
  6. <table width="100%">
  7. <tr>
  8. <td>
  9. <h4>
  10. <?lsmb company ?>
  11. <br><?lsmb address ?>
  12. </h4>
  13. </td>
  14. <td><img src=http://www.ledger-smb.org/images/ledger-smb.png border=0 width=80 height=58>
  15. </td>
  16. <td align=right>
  17. <h4>
  18. Tel: <?lsmb tel ?>
  19. <br>Fax: <?lsmb fax ?>
  20. </h4>
  21. </td>
  22. </tr>
  23. <tr>
  24. <th colspan=3>
  25. <h4>B E G Ä R A N &nbsp;&nbsp; A V &nbsp;&nbsp; K V O T</h4>
  26. </th>
  27. </tr>
  28. </table>
  29. <table width=100% callspacing=0 cellpadding=0>
  30. <tr>
  31. <td>
  32. <table width="100%">
  33. <tr bgcolor=000000>
  34. <th align=left width="50%"><font color=ffffff>To:</th>
  35. <th align=left width="50%"><font color=ffffff>Ship To:</th>
  36. </tr>
  37. <tr valign=top>
  38. <td><?lsmb name ?>
  39. <br><?lsmb address1 ?>
  40. <?lsmb if address2 ?>
  41. <br><?lsmb address2 ?>
  42. <?lsmb end address2 ?>
  43. <br><?lsmb city ?> <?lsmb state ?> <?lsmb zipcode ?>
  44. <?lsmb if country ?>
  45. <br><?lsmb country ?>
  46. <?lsmb end country ?>
  47. <br>
  48. <?lsmb if contact ?>
  49. <br>Attn: <?lsmb contact ?>
  50. <?lsmb end contact ?>
  51. <?lsmb if vendorphone ?>
  52. <br>Tel: <?lsmb vendorphone ?>
  53. <?lsmb end vendorphone ?>
  54. <?lsmb if vendorfax ?>
  55. <br>Fax: <?lsmb vendorfax ?>
  56. <?lsmb end vendorfax ?>
  57. </td>
  58. <td><?lsmb shiptoname ?>
  59. <br><?lsmb shiptoaddress1 ?>
  60. <?lsmb if shiptoaddress2 ?>
  61. <br><?lsmb shiptoaddr2 ?>
  62. <?lsmb end shiptoaddress2 ?>
  63. <br><?lsmb shiptocity ?> <?lsmb shiptostate ?> <?lsmb shiptozipcode ?>
  64. <?lsmb if shiptocountry ?>
  65. <br><?lsmb shiptocountry ?>
  66. <?lsmb end shiptocountry ?>
  67. <br>
  68. <?lsmb if shiptocontact ?>
  69. <br>Attn: <?lsmb shiptocontact ?>
  70. <?lsmb end shiptocontact ?>
  71. <?lsmb if shiptophone ?>
  72. <br>Tel: <?lsmb shiptophone ?>
  73. <?lsmb end shiptophone ?>
  74. <?lsmb if shiptofax ?>
  75. <br>Fax: <?lsmb shiptofax ?>
  76. <?lsmb end shiptofax ?>
  77. </tr>
  78. </table>
  79. </td>
  80. </tr>
  81. <tr><td>&nbsp;</td></tr>
  82. <tr>
  83. <td colspan=2>
  84. <table width=100% border=1>
  85. <tr>
  86. <th width=17% align=left>BAK #</th>
  87. <th width=17% align=left>Datum</th>
  88. <th width=17% align=left>Begärt av</th>
  89. <th width=17% align=left>Kontakt</th>
  90. <th width=17% align=left>Destination</th>
  91. <th width=15% align=left>Fraktas via</th>
  92. </tr>
  93. <tr>
  94. <td><?lsmb quonumber ?></td>
  95. <td><?lsmb quodate ?></td>
  96. <td><?lsmb reqdate ?></td>
  97. <td><?lsmb employee ?></td>
  98. <td><?lsmb shippingpoint ?>&nbsp;</td>
  99. <td><?lsmb shipvia ?>&nbsp;</td>
  100. </tr>
  101. </table>
  102. </td>
  103. </tr>
  104. <tr height="10"></tr>
  105. <tr>
  106. <td>Var vänlig delge pris och leverans tid för dessa artiklar:</td>
  107. </tr>
  108. <tr height="10"></tr>
  109. <tr>
  110. <td>
  111. <table width="100%">
  112. <tr>
  113. <!-- <th align=right>No.</th> -->
  114. <th align=left>Numner</th>
  115. <th align=left><font color=ffffff>Beskrivning</th>
  116. <th>Antal</th>
  117. <th>&nbsp;</th>
  118. <th>Leveras</th>
  119. <th>Enhets Pris</th>
  120. <th>Utökat</th>
  121. </tr>
  122. <?lsmb foreach number ?>
  123. <tr valign=top>
  124. <!-- <td align=right><?lsmb runningnumber ?>.</td>
  125. other per line item variables available <?lsmb reqdate ?>
  126. adjust the colspan if you include this to shift subtotal one to the right
  127. -->
  128. <td><?lsmb number ?></td>
  129. <td><?lsmb description ?></td>
  130. <td align=right><?lsmb qty ?></td>
  131. <td><?lsmb unit ?></td>
  132. </tr>
  133. <?lsmb end number ?>
  134. <tr>
  135. <td colspan=7><hr noshade></td>
  136. </tr>
  137. </table>
  138. </td>
  139. </tr>
  140. <tr>
  141. <td>
  142. <table width="100%">
  143. <?lsmb if notes ?>
  144. <tr valign=top>
  145. <td>Notes</td>
  146. <td><?lsmb notes ?></td>
  147. </tr>
  148. <?lsmb end notes ?>
  149. </table>
  150. </td>
  151. </tr>
  152. <tr><td>&nbsp;</td></tr>
  153. <tr>
  154. <td>
  155. <table width="100%">
  156. <tr valign=top>
  157. <td width="70%">&nbsp;</td>
  158. <td width="30%">
  159. X <hr noshade>
  160. </td>
  161. </tr>
  162. </table>
  163. </td>
  164. </tr>
  165. </table>
  166. </td>
  167. </tr>
  168. </table>
  169. </body>
  170. </html>
s="hl kwb">$locale->text('Description').qq|
  • </td>
  • <td>
  • <input name="l_sellprice" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Sell Price').qq|
  • </td>
  • <td>
  • <input name="l_curr" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Currency').qq|
  • </td>
  • </tr>
  • <tr>
  • <td>
  • <input name="l_qty" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Qty').qq|
  • </td>
  • <td>
  • <input name="l_unit" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Unit').qq|
  • </td>
  • <td>
  • <input name="l_discount" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Discount').qq|
  • </td>
  • <tr>
  • </tr>
  • <td>
  • <input name="l_deliverydate" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Delivery Date').qq|
  • </td>
  • <td>
  • <input name="l_projectnumber" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Project Number').qq|
  • </td>
  • <td>
  • <input name="l_serialnumber" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Serial Number').qq|
  • </td>
  • </tr>
  • </table>
  • </td>
  • </tr>
  • |;
  • &search_name;
  • if ($form->{lynx}) {
  • require "bin/menu.pl";
  • &menubar;
  • }
  • print qq|
  • </body>
  • </html>
  • |;
  • }
  • sub transactions {
  • if ($form->{db} eq 'customer') {
  • $translabel = $locale->text('AR Transactions');
  • $invlabel = $locale->text('Sales Invoices');
  • $ordlabel = $locale->text('Sales Orders');
  • $quolabel = $locale->text('Quotations');
  • } else {
  • $translabel = $locale->text('AP Transactions');
  • $invlabel = $locale->text('Vendor Invoices');
  • $ordlabel = $locale->text('Purchase Orders');
  • $quolabel = $locale->text('Request for Quotations');
  • }
  • $transactions = qq|
  • <tr>
  • <td></td>
  • <td>
  • <table>
  • <tr>
  • <td>
  • <table>
  • <tr>
  • <td><input name="l_transnumber" type=checkbox class=checkbox value=Y> $translabel</td>
  • </tr>
  • <tr>
  • <td><input name="l_invnumber" type=checkbox class=checkbox value=Y> $invlabel</td>
  • </tr>
  • <tr>
  • <td><input name="l_ordnumber" type=checkbox class=checkbox value=Y> $ordlabel</td>
  • </tr>
  • <tr>
  • <td><input name="l_quonumber" type=checkbox class=checkbox value=Y> $quolabel</td>
  • </tr>
  • </table>
  • </td>
  • <td>
  • <table>
  • <tr>
  • <th>|.$locale->text('From').qq|</th>
  • <td><input name=transdatefrom size=11 title="$myconfig{dateformat}"></td>
  • <th>|.$locale->text('To').qq|</th>
  • <td><input name=transdateto size=11 title="$myconfig{dateformat}"></td>
  • </tr>
  • <tr>
  • <td></td>
  • <td colspan=3>
  • <input name="open" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Open').qq|
  • <input name="closed" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Closed').qq|
  • </td>
  • </tr>
  • <tr>
  • <td></td>
  • <td colspan=3>
  • <input name="l_amount" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Amount').qq|
  • <input name="l_tax" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Tax').qq|
  • <input name="l_total" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Total').qq|
  • <input name="l_subtotal" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Subtotal').qq|
  • </td>
  • </tr>
  • </table>
  • </td>
  • </tr>
  • </table>
  • </td>
  • </tr>
  • |;
  • }
  • sub include_in_report {
  • $label = ucfirst $form->{db};
  • @a = ();
  • push @a, qq|<input name="l_ndx" type=checkbox class=checkbox value=Y> |.$locale->text('No.');
  • push @a, qq|<input name="l_id" type=checkbox class=checkbox value=Y> |.$locale->text('ID');
  • push @a, qq|<input name="l_$form->{db}number" type=checkbox class=checkbox value=Y> |.$locale->text($label . ' Number');
  • push @a, qq|<input name="l_name" type=checkbox class=checkbox value=Y $form->{l_name}> |.$locale->text('Company Name');
  • push @a, qq|<input name="l_contact" type=checkbox class=checkbox value=Y $form->{l_contact}> |.$locale->text('Contact');
  • push @a, qq|<input name="l_email" type=checkbox class=checkbox value=Y $form->{l_email}> |.$locale->text('E-mail');
  • push @a, qq|<input name="l_address" type=checkbox class=checkbox value=Y> |.$locale->text('Address');
  • push @a, qq|<input name="l_city" type=checkbox class=checkbox value=Y> |.$locale->text('City');
  • push @a, qq|<input name="l_state" type=checkbox class=checkbox value=Y> |.$locale->text('State/Province');
  • push @a, qq|<input name="l_zipcode" type=checkbox class=checkbox value=Y> |.$locale->text('Zip/Postal Code');
  • push @a, qq|<input name="l_country" type=checkbox class=checkbox value=Y> |.$locale->text('Country');
  • push @a, qq|<input name="l_phone" type=checkbox class=checkbox value=Y $form->{l_phone}> |.$locale->text('Phone');
  • push @a, qq|<input name="l_fax" type=checkbox class=checkbox value=Y> |.$locale->text('Fax');
  • push @a, qq|<input name="l_cc" type=checkbox class=checkbox value=Y> |.$locale->text('Cc');
  • if ($myconfig{role} =~ /(admin|manager)/) {
  • push @a, qq|<input name="l_bcc" type=checkbox class=checkbox value=Y> |.$locale->text('Bcc');
  • }
  • push @a, qq|<input name="l_notes" type=checkbox class=checkbox value=Y> |.$locale->text('Notes');
  • push @a, qq|<input name="l_discount" type=checkbox class=checkbox value=Y> |.$locale->text('Discount');
  • push @a, qq|<input name="l_taxaccount" type=checkbox class=checkbox value=Y> |.$locale->text('Tax Account');
  • push @a, qq|<input name="l_taxnumber" type=checkbox class=checkbox value=Y> |.$locale->text('Tax Number');
  • if ($form->{db} eq 'customer') {
  • push @a, qq|<input name="l_employee" type=checkbox class=checkbox value=Y> |.$locale->text('Salesperson');
  • push @a, qq|<input name="l_manager" type=checkbox class=checkbox value=Y> |.$locale->text('Manager');
  • push @a, qq|<input name="l_pricegroup" type=checkbox class=checkbox value=Y> |.$locale->text('Pricegroup');
  • } else {
  • push @a, qq|<input name="l_employee" type=checkbox class=checkbox value=Y> |.$locale->text('Employee');
  • push @a, qq|<input name="l_manager" type=checkbox class=checkbox value=Y> |.$locale->text('Manager');
  • push @a, qq|<input name="l_gifi_accno" type=checkbox class=checkbox value=Y> |.$locale->text('GIFI');
  • }
  • push @a, qq|<input name="l_sic_code" type=checkbox class=checkbox value=Y> |.$locale->text('SIC');
  • push @a, qq|<input name="l_iban" type=checkbox class=checkbox value=Y> |.$locale->text('IBAN');
  • push @a, qq|<input name="l_bic" type=checkbox class=checkbox value=Y> |.$locale->text('BIC');
  • push @a, qq|<input name="l_business" type=checkbox class=checkbox value=Y> |.$locale->text('Type of Business');
  • push @a, qq|<input name="l_terms" type=checkbox class=checkbox value=Y> |.$locale->text('Terms');
  • push @a, qq|<input name="l_language" type=checkbox class=checkbox value=Y> |.$locale->text('Language');
  • push @a, qq|<input name="l_startdate" type=checkbox class=checkbox value=Y> |.$locale->text('Startdate');
  • push @a, qq|<input name="l_enddate" type=checkbox class=checkbox value=Y> |.$locale->text('Enddate');
  • $include = qq|
  • <tr>
  • <th align=right nowrap>|.$locale->text('Include in Report').qq|</th>
  • <td>
  • <table>
  • |;
  • while (@a) {
  • $include .= qq|<tr>\n|;
  • for (1 .. 5) {
  • $include .= qq|<td nowrap>|. shift @a;
  • $include .= qq|</td>\n|;
  • }
  • $include .= qq|</tr>\n|;
  • }
  • $include .= qq|
  • </table>
  • </td>
  • </tr>
  • |;
  • }
  • sub search {
  • # $locale->text('Customers')
  • # $locale->text('Vendors')
  • $form->{title} = $locale->text('Search') unless $form->{title};
  • for (qw(name contact phone email)) { $form->{"l_$_"} = 'checked' }
  • $form->{nextsub} = "list_names";
  • $orphan = qq|
  • <tr>
  • <td></td>
  • <td><input name=status class=radio type=radio value=all checked>&nbsp;|.$locale->text('All').qq|
  • <input name=status class=radio type=radio value=active>&nbsp;|.$locale->text('Active').qq|
  • <input name=status class=radio type=radio value=inactive>&nbsp;|.$locale->text('Inactive').qq|
  • <input name=status class=radio type=radio value=orphaned>&nbsp;|.$locale->text('Orphaned').qq|</td>
  • </tr>
  • |;
  • &transactions;
  • &include_in_report;
  • &search_name;
  • if ($form->{lynx}) {
  • require "bin/menu.pl";
  • &menubar;
  • }
  • print qq|
  • </body>
  • </html>
  • |;
  • }
  • sub search_name {
  • $label = ucfirst $form->{db};
  • if ($form->{db} eq 'customer') {
  • $employee = qq|
  • <th align=right nowrap>|.$locale->text('Salesperson').qq|</th>
  • <td><input name=employee size=32></td>
  • |;
  • }
  • if ($form->{db} eq 'vendor') {
  • $employee = qq|
  • <th align=right nowrap>|.$locale->text('Employee').qq|</th>
  • <td><input name=employee size=32></td>
  • |;
  • }
  • $form->header;
  • print qq|
  • <body>
  • <form method=post action=$form->{script}>
  • <input type=hidden name=db value=$form->{db}>
  • <table width=100%>
  • <tr>
  • <th class=listtop>$form->{title}</th>
  • </tr>
  • <tr height="5"></tr>
  • <tr valign=top>
  • <td>
  • <table>
  • <tr valign=top>
  • <td>
  • <table>
  • <tr>
  • <th align=right nowrap>|.$locale->text('Company Name').qq|</th>
  • <td><input name=name size=32></td>
  • </tr>
  • <tr>
  • <th align=right nowrap>|.$locale->text('Contact').qq|</th>
  • <td><input name=contact size=32></td>
  • </tr>
  • <tr>
  • <th align=right nowrap>|.$locale->text('E-mail').qq|</th>
  • <td><input name=email size=32></td>
  • </tr>
  • <tr>
  • <th align=right nowrap>|.$locale->text('Phone').qq|</th>
  • <td><input name=phone size=20></td>
  • </tr>
  • <tr>
  • $employee
  • </tr>
  • <tr>
  • <th align=right nowrap>|.$locale->text('Notes').qq|</th>
  • <td colspan=3><textarea name=notes rows=3 cols=32></textarea></td>
  • </tr>
  • </table>
  • </td>
  • <td>
  • <table>
  • <tr>
  • <th align=right nowrap>|.$locale->text($label . ' Number').qq|</th>
  • <td><input name=$form->{db}number size=32></td>
  • </tr>
  • <tr>
  • <th align=right nowrap>|.$locale->text('Address').qq|</th>
  • <td><input name=address size=32></td>
  • </tr>
  • <tr>
  • <th align=right nowrap>|.$locale->text('City').qq|</th>
  • <td><input name=city size=32></td>
  • </tr>
  • <tr>
  • <th align=right nowrap>|.$locale->text('State/Province').qq|</th>
  • <td><input name=state size=32></td>
  • </tr>
  • <tr>
  • <th align=right nowrap>|.$locale->text('Zip/Postal Code').qq|</th>
  • <td><input name=zipcode size=10></td>
  • </tr>
  • <tr>
  • <th align=right nowrap>|.$locale->text('Country').qq|</th>
  • <td><input name=country size=32></td>
  • </tr>
  • <tr>
  • <th align=right nowrap>|.$locale->text('Startdate').qq|</th>
  • <td>|.$locale->text('From').qq| <input name=startdatefrom size=11 title="$myconfig{dateformat}"> |.$locale->text('To').qq| <input name=startdateto size=11 title="$myconfig{dateformat}"></td>
  • </tr>
  • </table>
  • </td>
  • </tr>
  • </table>
  • </td>
  • </tr>
  • <tr>
  • <td>
  • <table>
  • $orphan
  • $transactions
  • $include
  • </table>
  • </td>
  • </tr>
  • <tr>
  • <td><hr size=3 noshade></td>
  • </tr>
  • </table>
  • <input type="hidden" name="nextsub" value="$form->{nextsub}">
  • <input type="hidden" name="path" value="$form->{path}">
  • <input type="hidden" name="login" value="$form->{login}">
  • <input type="hidden" name="sessionid" value="$form->{sessionid}">
  • <br>
  • <button type="submit" class="submit" name="action" value="continue">|.$locale->text('Continue').qq|</button>
  • </form>
  • |;
  • }
  • sub list_names {
  • CT->search(\%myconfig, \%$form);
  • $href = "$form->{script}?action=list_names&direction=$form->{direction}&oldsort=$form->{oldsort}&db=$form->{db}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&status=$form->{status}&l_subtotal=$form->{l_subtotal}";
  • $form->sort_order();
  • $callback = "$form->{script}?action=list_names&direction=$form->{direction}&oldsort=$form->{oldsort}&db=$form->{db}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&status=$form->{status}&l_subtotal=$form->{l_subtotal}";
  • @columns = $form->sort_columns(id, name, "$form->{db}number", address,
  • city, state, zipcode, country, contact,
  • phone, fax, email, cc, bcc, employee,
  • manager, notes, discount, terms,
  • taxaccount, taxnumber, gifi_accno, sic_code, business,
  • pricegroup, language, iban, bic,
  • startdate, enddate,
  • invnumber, invamount, invtax, invtotal,
  • ordnumber, ordamount, ordtax, ordtotal,
  • quonumber, quoamount, quotax, quototal);
  • unshift @columns, "ndx";
  • $form->{l_invnumber} = "Y" if $form->{l_transnumber};
  • foreach $item (qw(inv ord quo)) {
  • if ($form->{"l_${item}number"}) {
  • for (qw(amount tax total)) { $form->{"l_$item$_"} = $form->{"l_$_"} }
  • $removeemployee = 1;
  • $openclosed = 1;
  • }
  • }
  • $form->{open} = $form->{closed} = "" if !$openclosed;
  • foreach $item (@columns) {
  • if ($form->{"l_$item"} eq "Y") {
  • push @column_index, $item;
  • # add column to href and callback
  • $callback .= "&l_$item=Y";
  • $href .= "&l_$item=Y";
  • }
  • }
  • foreach $item (qw(amount tax total transnumber)) {
  • if ($form->{"l_$item"} eq "Y") {
  • $callback .= "&l_$item=Y";
  • $href .= "&l_$item=Y";
  • }
  • }
  • if ($form->{status} eq 'all') {
  • $option = $locale->text('All');
  • }
  • if ($form->{status} eq 'orphaned') {
  • $option = $locale->text('Orphaned');
  • }
  • if ($form->{status} eq 'active') {
  • $option = $locale->text('Active');
  • }
  • if ($form->{status} eq 'inactive') {
  • $option = $locale->text('Inactive');
  • }
  • if ($form->{name}) {
  • $callback .= "&name=".$form->escape($form->{name},1);
  • $href .= "&name=".$form->escape($form->{name});
  • $option .= "\n<br>".$locale->text('Name')." : $form->{name}";
  • }
  • if ($form->{address}) {
  • $callback .= "&address=".$form->escape($form->{address},1);
  • $href .= "&address=".$form->escape($form->{address});
  • $option .= "\n<br>".$locale->text('Address')." : $form->{address}";
  • }
  • if ($form->{city}) {
  • $callback .= "&city=".$form->escape($form->{city},1);
  • $href .= "&city=".$form->escape($form->{city});
  • $option .= "\n<br>".$locale->text('City')." : $form->{city}";
  • }
  • if ($form->{state}) {
  • $callback .= "&state=".$form->escape($form->{state},1);
  • $href .= "&state=".$form->escape($form->{state});
  • $option .= "\n<br>".$locale->text('State')." : $form->{state}";
  • }
  • if ($form->{zipcode}) {
  • $callback .= "&zipcode=".$form->escape($form->{zipcode},1);
  • $href .= "&zipcode=".$form->escape($form->{zipcode});
  • $option .= "\n<br>".$locale->text('Zip/Postal Code')." : $form->{zipcode}";
  • }
  • if ($form->{country}) {
  • $callback .= "&country=".$form->escape($form->{country},1);
  • $href .= "&country=".$form->escape($form->{country});
  • $option .= "\n<br>".$locale->text('Country')." : $form->{country}";
  • }
  • if ($form->{contact}) {
  • $callback .= "&contact=".$form->escape($form->{contact},1);
  • $href .= "&contact=".$form->escape($form->{contact});
  • $option .= "\n<br>".$locale->text('Contact')." : $form->{contact}";
  • }
  • if ($form->{employee}) {
  • $callback .= "&employee=".$form->escape($form->{employee},1);
  • $href .= "&employee=".$form->escape($form->{employee});
  • $option .= "\n<br>";
  • if ($form->{db} eq 'customer') {
  • $option .= $locale->text('Salesperson');
  • }
  • if ($form->{db} eq 'vendor') {
  • $option .= $locale->text('Employee');
  • }
  • $option .= " : $form->{employee}";
  • }
  • $fromdate = "";
  • $todate = "";
  • if ($form->{startdatefrom}) {
  • $callback .= "&startdatefrom=$form->{startdatefrom}";
  • $href .= "&startdatefrom=$form->{startdatefrom}";
  • $fromdate = $locale->date(\%myconfig, $form->{startdatefrom}, 1);
  • }
  • if ($form->{startdateto}) {
  • $callback .= "&startdateto=$form->{startdateto}";
  • $href .= "&startdateto=$form->{startdateto}";
  • $todate = $locale->date(\%myconfig, $form->{startdateto}, 1);
  • }
  • if ($fromdate || $todate) {
  • $option .= "\n<br>".$locale->text('Startdate')." $fromdate - $todate";
  • }
  • if ($form->{notes}) {
  • $callback .= "&notes=".$form->escape($form->{notes},1);
  • $href .= "&notes=".$form->escape($form->{notes});
  • $option .= "\n<br>".$locale->text('Notes')." : $form->{notes}";
  • }
  • if ($form->{"$form->{db}number"}) {
  • $callback .= qq|&$form->{db}number=|.$form->escape($form->{"$form->{db}number"},1);
  • $href .= "&$form->{db}number=".$form->escape($form->{"$form->{db}number"});
  • $option .= "\n<br>".$locale->text('Number').qq| : $form->{"$form->{db}number"}|;
  • }
  • if ($form->{phone}) {
  • $callback .= "&phone=".$form->escape($form->{phone},1);
  • $href .= "&phone=".$form->escape($form->{phone});
  • $option .= "\n<br>".$locale->text('Phone')." : $form->{phone}";
  • }
  • if ($form->{email}) {
  • $callback .= "&email=".$form->escape($form->{email},1);
  • $href .= "&email=".$form->escape($form->{email});
  • $option .= "\n<br>".$locale->text('E-mail')." : $form->{email}";
  • }
  • if ($form->{transdatefrom}) {
  • $callback .= "&transdatefrom=$form->{transdatefrom}";
  • $href .= "&transdatefrom=$form->{transdatefrom}";
  • $option .= "\n<br>" if ($option);
  • $option .= $locale->text('From')."&nbsp;".$locale->date(\%myconfig, $form->{transdatefrom}, 1);
  • }
  • if ($form->{transdateto}) {
  • $callback .= "&transdateto=$form->{transdateto}";
  • $href .= "&transdateto=$form->{transdateto}";
  • if ($form->{transdatefrom}) {
  • $option .= " ";
  • } else {
  • $option .= "\n<br>" if ($option);
  • }
  • $option .= $locale->text('To')."&nbsp;".$locale->date(\%myconfig, $form->{transdateto}, 1);
  • }
  • if ($form->{open}) {
  • $callback .= "&open=$form->{open}";
  • $href .= "&open=$form->{open}";
  • $option .= "\n<br>" if ($option);
  • $option .= $locale->text('Open');
  • }
  • if ($form->{closed}) {
  • $callback .= "&closed=$form->{closed}";
  • $href .= "&closed=$form->{closed}";
  • $option .= "\n<br>" if ($option);
  • $option .= $locale->text('Closed');
  • }
  • $form->{callback} = "$callback&sort=$form->{sort}";
  • $callback = $form->escape($form->{callback});
  • $column_header{ndx} = qq|<th class=listheading>&nbsp;</th>|;
  • $column_header{id} = qq|<th class=listheading>|.$locale->text('ID').qq|</th>|;
  • $column_header{"$form->{db}number"} = qq|<th><a class=listheading href=$href&sort=$form->{db}number>|.$locale->text('Number').qq|</a></th>|;
  • $column_header{name} = qq|<th><a class=listheading href=$href&sort=name>|.$locale->text('Name').qq|</a></th>|;
  • $column_header{address} = qq|<th class=listheading>|.$locale->text('Address').qq|</th>|;
  • $column_header{city} = qq|<th><a class=listheading href=$href&sort=city>|.$locale->text('City').qq|</a></th>|;
  • $column_header{state} = qq|<th><a class=listheading href=$href&sort=state>|.$locale->text('State/Province').qq|</a></th>|;
  • $column_header{zipcode} = qq|<th><a class=listheading href=$href&sort=zipcode>|.$locale->text('Zip/Postal Code').qq|</a></th>|;
  • $column_header{country} = qq|<th><a class=listheading href=$href&sort=country>|.$locale->text('Country').qq|</a></th>|;
  • $column_header{contact} = qq|<th><a class=listheading href=$href&sort=contact>|.$locale->text('Contact').qq|</a></th>|;
  • $column_header{phone} = qq|<th><a class=listheading href=$href&sort=phone>|.$locale->text('Phone').qq|</a></th>|;
  • $column_header{fax} = qq|<th><a class=listheading href=$href&sort=fax>|.$locale->text('Fax').qq|</a></th>|;
  • $column_header{email} = qq|<th><a class=listheading href=$href&sort=email>|.$locale->text('E-mail').qq|</a></th>|;
  • $column_header{cc} = qq|<th><a class=listheading href=$href&sort=cc>|.$locale->text('Cc').qq|</a></th>|;
  • $column_header{bcc} = qq|<th><a class=listheading href=$href&sort=cc>|.$locale->text('Bcc').qq|</a></th>|;
  • $column_header{notes} = qq|<th><a class=listheading href=$href&sort=notes>|.$locale->text('Notes').qq|</a></th>|;
  • $column_header{discount} = qq|<th class=listheading>%</th>|;
  • $column_header{terms} = qq|<th class=listheading>|.$locale->text('Terms').qq|</th>|;
  • $column_header{taxnumber} = qq|<th><a class=listheading href=$href&sort=taxnumber>|.$locale->text('Tax Number').qq|</a></th>|;
  • $column_header{taxaccount} = qq|<th class=listheading>|.$locale->text('Tax Account').qq|</th>|;
  • $column_header{gifi_accno} = qq|<th><a class=listheading href=$href&sort=gifi_accno>|.$locale->text('GIFI').qq|</a></th>|;
  • $column_header{sic_code} = qq|<th><a class=listheading href=$href&sort=sic_code>|.$locale->text('SIC').qq|</a></th>|;
  • $column_header{business} = qq|<th><a class=listheading href=$href&sort=business>|.$locale->text('Type of Business').qq|</a></th>|;
  • $column_header{iban} = qq|<th class=listheading>|.$locale->text('IBAN').qq|</th>|;
  • $column_header{bic} = qq|<th class=listheading>|.$locale->text('BIC').qq|</th>|;
  • $column_header{startdate} = qq|<th><a class=listheading href=$href&sort=startdate>|.$locale->text('Startdate').qq|</a></th>|;
  • $column_header{enddate} = qq|<th><a class=listheading href=$href&sort=enddate>|.$locale->text('Enddate').qq|</a></th>|;
  • $column_header{invnumber} = qq|<th><a class=listheading href=$href&sort=invnumber>|.$locale->text('Invoice').qq|</a></th>|;
  • $column_header{ordnumber} = qq|<th><a class=listheading href=$href&sort=ordnumber>|.$locale->text('Order').qq|</a></th>|;
  • $column_header{quonumber} = qq|<th><a class=listheading href=$href&sort=quonumber>|.$locale->text('Quotation').qq|</a></th>|;
  • if ($form->{db} eq 'customer') {
  • $column_header{employee} = qq|<th><a class=listheading href=$href&sort=employee>|.$locale->text('Salesperson').qq|</a></th>|;
  • } else {
  • $column_header{employee} = qq|<th><a class=listheading href=$href&sort=employee>|.$locale->text('Employee').qq|</a></th>|;
  • }
  • $column_header{manager} = qq|<th><a class=listheading href=$href&sort=manager>|.$locale->text('Manager').qq|</a></th>|;
  • $column_header{pricegroup} = qq|<th><a class=listheading href=$href&sort=pricegroup>|.$locale->text('Pricegroup').qq|</a></th>|;
  • $column_header{language} = qq|<th><a class=listheading href=$href&sort=language>|.$locale->text('Language').qq|</a></th>|;
  • $amount = $locale->text('Amount');
  • $tax = $locale->text('Tax');
  • $total = $locale->text('Total');
  • $column_header{invamount} = qq|<th class=listheading>$amount</th>|;
  • $column_header{ordamount} = qq|<th class=listheading>$amount</th>|;
  • $column_header{quoamount} = qq|<th class=listheading>$amount</th>|;
  • $column_header{invtax} = qq|<th class=listheading>$tax</th>|;
  • $column_header{ordtax} = qq|<th class=listheading>$tax</th>|;
  • $column_header{quotax} = qq|<th class=listheading>$tax</th>|;
  • $column_header{invtotal} = qq|<th class=listheading>$total</th>|;
  • $column_header{ordtotal} = qq|<th class=listheading>$total</th>|;
  • $column_header{quototal} = qq|<th class=listheading>$total</th>|;
  • if ($form->{status}) {
  • $label = ucfirst $form->{db}."s";
  • $form->{title} = $locale->text($label);
  • } else {
  • $label = ucfirst $form->{db};
  • $form->{title} = $locale->text($label ." Transactions");
  • }
  • $form->header;
  • print qq|
  • <body>
  • <table width=100%>
  • <tr>
  • <th class=listtop>$form->{title}</th>
  • </tr>
  • <tr height="5"></tr>
  • <tr>
  • <td>$option</td>
  • </tr>
  • <tr>
  • <td>
  • <table width=100%>
  • <tr class=listheading>
  • |;
  • for (@column_index) { print "$column_header{$_}\n" }
  • print qq|
  • </tr>
  • |;
  • $ordertype = ($form->{db} eq 'customer') ? 'sales_order' : 'purchase_order';
  • $quotationtype = ($form->{db} eq 'customer') ? 'sales_quotation' : 'request_quotation';
  • $subtotal = 0;
  • $i = 0;
  • foreach $ref (@{ $form->{CT} }) {
  • if ($ref->{$form->{sort}} ne $sameitem && $form->{l_subtotal}) {
  • # print subtotal
  • if ($subtotal) {
  • for (@column_index) { $column_data{$_} = "<td>&nbsp;</td>" }
  • &list_subtotal;
  • }
  • }
  • if ($ref->{id} eq $sameid) {
  • for (@column_index) { $column_data{$_} = "<td>&nbsp;</td>" }
  • } else {
  • $i++;
  • $ref->{notes} =~ s/\r?\n/<br>/g;
  • for (@column_index) { $column_data{$_} = "<td>$ref->{$_}&nbsp;</td>" }
  • $column_data{ndx} = "<td align=right>$i</td>";
  • if ($ref->{$form->{sort}} eq $sameitem) {
  • $column_data{$form->{sort}} = "<td>&nbsp;</td>";
  • }
  • $column_data{address} = "<td>$ref->{address1} $ref->{address2}&nbsp;</td>";
  • $column_data{name} = "<td><a href=$form->{script}?action=edit&id=$ref->{id}&db=$form->{db}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&status=$form->{status}&callback=$callback>$ref->{name}&nbsp;</td>";
  • $email = "";
  • if ($form->{sort} =~ /(email|cc)/) {
  • if ($ref->{$form->{sort}} ne $sameitem) {
  • $email = 1;
  • }
  • } else {
  • $email = 1;
  • }
  • if ($email) {
  • foreach $item (qw(email cc bcc)) {
  • if ($ref->{$item}) {
  • $email = $ref->{$item};
  • $email =~ s/</\&lt;/;
  • $email =~ s/>/\&gt;/;
  • $column_data{$item} = qq|<td><a href="mailto:$ref->{$item}">$email</a></td>|;
  • }
  • }
  • }
  • }
  • if ($ref->{formtype} eq 'invoice') {
  • $column_data{invnumber} = "<td><a href=$ref->{module}.pl?action=edit&id=$ref->{invid}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback>$ref->{invnumber}&nbsp;</td>";
  • $column_data{invamount} = "<td align=right>".$form->format_amount(\%myconfig, $ref->{netamount}, 2, "&nbsp;")."</td>";
  • $column_data{invtax} = "<td align=right>".$form->format_amount(\%myconfig, $ref->{amount} - $ref->{netamount}, 2, "&nbsp;")."</td>";
  • $column_data{invtotal} = "<td align=right>".$form->format_amount(\%myconfig, $ref->{amount}, 2, "&nbsp;")."</td>";
  • $invamountsubtotal += $ref->{netamount};
  • $invtaxsubtotal += ($ref->{amount} - $ref->{netamount});
  • $invtotalsubtotal += $ref->{amount};
  • $subtotal = 1;
  • }
  • if ($ref->{formtype} eq 'order') {
  • $column_data{ordnumber} = "<td><a href=$ref->{module}.pl?action=edit&id=$ref->{invid}&type=$ordertype&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback>$ref->{ordnumber}&nbsp;</td>";
  • $column_data{ordamount} = "<td align=right>".$form->format_amount(\%myconfig, $ref->{netamount}, 2, "&nbsp;")."</td>";
  • $column_data{ordtax} = "<td align=right>".$form->format_amount(\%myconfig, $ref->{amount} - $ref->{netamount}, 2, "&nbsp;")."</td>";
  • $column_data{ordtotal} = "<td align=right>".$form->format_amount(\%myconfig, $ref->{amount}, 2, "&nbsp;")."</td>";
  • $ordamountsubtotal += $ref->{netamount};
  • $ordtaxsubtotal += ($ref->{amount} - $ref->{netamount});
  • $ordtotalsubtotal += $ref->{amount};
  • $subtotal = 1;
  • }
  • if ($ref->{formtype} eq 'quotation') {
  • $column_data{quonumber} = "<td><a href=$ref->{module}.pl?action=edit&id=$ref->{invid}&type=$quotationtype&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback>$ref->{quonumber}&nbsp;</td>";
  • $column_data{quoamount} = "<td align=right>".$form->format_amount(\%myconfig, $ref->{netamount}, 2, "&nbsp;")."</td>";
  • $column_data{quotax} = "<td align=right>".$form->format_amount(\%myconfig, $ref->{amount} - $ref->{netamount}, 2, "&nbsp;")."</td>";
  • $column_data{quototal} = "<td align=right>".$form->format_amount(\%myconfig, $ref->{amount}, 2, "&nbsp;")."</td>";
  • $quoamountsubtotal += $ref->{netamount};
  • $quotaxsubtotal += ($ref->{amount} - $ref->{netamount});
  • $quototalsubtotal += $ref->{amount};
  • $subtotal = 1;
  • }
  • if ($sameid ne "$ref->{id}") {
  • if ($form->{l_discount}) {
  • $column_data{discount} = "<td align=right>".$form->format_amount(\%myconfig, $ref->{discount} * 100, "", "&nbsp;")."</td>";
  • }
  • if ($form->{l_terms}) {
  • $column_data{terms} = "<td align=right>".$form->format_amount(\%myconfig, $ref->{terms}, "", "&nbsp;")."</td>";
  • }
  • }
  • $j++; $j %= 2;
  • print "
  • <tr class=listrow$j>
  • ";
  • for (@column_index) { print "$column_data{$_}\n" }
  • print qq|
  • </tr>
  • |;
  • $sameitem = "$ref->{$form->{sort}}";
  • $sameid = $ref->{id};
  • }
  • if ($form->{l_subtotal} && $subtotal) {
  • for (@column_index) { $column_data{$_} = "<td>&nbsp;</td>" }
  • &list_subtotal;
  • }
  • $i = 1;
  • if ($myconfig{acs} !~ /AR--AR/) {
  • if ($form->{db} eq 'customer') {
  • $button{'AR--Customers--Add Customer'}{code} = qq|<button class="submit" type="submit" name="action" value="add_customer">|.$locale->text('Add Customer').qq|</button> |;
  • $button{'AR--Customers--Add Customer'}{order} = $i++;
  • }
  • }
  • if ($myconfig{acs} !~ /AP--AP/) {
  • if ($form->{db} eq 'vendor') {
  • $button{'AP--Vendors--Add Vendor'}{code} = qq|<button class="submit" type="submit" name="action" value="add_vendor">|.$locale->text('Add Vendor').qq|</button> |;
  • $button{'AP--Vendors--Add Vendor'}{order} = $i++;
  • }
  • }
  • foreach $item (split /;/, $myconfig{acs}) {
  • delete $button{$item};
  • }
  • print qq|
  • </table>
  • </td>
  • </tr>
  • <tr>
  • <td><hr size=3 noshade></td>
  • </tr>
  • </table>
  • <br>
  • <form method=post action=$form->{script}>
  • |;
  • $form->hide_form(qw(callback db path login sessionid));
  • if ($form->{status}) {
  • foreach $item (sort { $a->{order} <=> $b->{order} } %button) {
  • print $item->{code};
  • }
  • }
  • if ($form->{lynx}) {
  • require "bin/menu.pl";
  • &menubar;
  • }
  • print qq|
  • </form>
  • </body>
  • </html>
  • |;
  • }
  • sub list_subtotal {
  • $column_data{invamount} = "<td align=right>".$form->format_amount(\%myconfig, $invamountsubtotal, 2, "&nbsp;")."</td>";
  • $column_data{invtax} = "<td align=right>".$form->format_amount(\%myconfig, $invtaxsubtotal, 2, "&nbsp;")."</td>";
  • $column_data{invtotal} = "<td align=right>".$form->format_amount(\%myconfig, $invtotalsubtotal, 2, "&nbsp;")."</td>";
  • $invamountsubtotal = 0;
  • $invtaxsubtotal = 0;
  • $invtotalsubtotal = 0;
  • $column_data{ordamount} = "<td align=right>".$form->format_amount(\%myconfig, $ordamountsubtotal, 2, "&nbsp;")."</td>";
  • $column_data{ordtax} = "<td align=right>".$form->format_amount(\%myconfig, $ordtaxsubtotal, 2, "&nbsp;")."</td>";
  • $column_data{ordtotal} = "<td align=right>".$form->format_amount(\%myconfig, $ordtotalsubtotal, 2, "&nbsp;")."</td>";
  • $ordamountsubtotal = 0;
  • $ordtaxsubtotal = 0;
  • $ordtotalsubtotal = 0;
  • $column_data{quoamount} = "<td align=right>".$form->format_amount(\%myconfig, $quoamountsubtotal, 2, "&nbsp;")."</td>";
  • $column_data{quotax} = "<td align=right>".$form->format_amount(\%myconfig, $quotaxsubtotal, 2, "&nbsp;")."</td>";
  • $column_data{quototal} = "<td align=right>".$form->format_amount(\%myconfig, $quototalsubtotal, 2, "&nbsp;")."</td>";
  • $quoamountsubtotal = 0;
  • $quotaxsubtotal = 0;
  • $quototalsubtotal = 0;
  • print "
  • <tr class=listsubtotal>
  • ";
  • for (@column_index) { print "$column_data{$_}\n" }
  • print qq|
  • </tr>
  • |;
  • }
  • sub list_history {
  • CT->get_history(\%myconfig, \%$form);
  • $href = "$form->{script}?action=list_history&direction=$form->{direction}&oldsort=$form->{oldsort}&db=$form->{db}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&type=$form->{type}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&history=$form->{history}";
  • $form->sort_order();
  • $callback = "$form->{script}?action=list_history&direction=$form->{direction}&oldsort=$form->{oldsort}&db=$form->{db}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&type=$form->{type}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&history=$form->{history}";
  • $form->{l_fxsellprice} = $form->{l_curr};
  • @columns = $form->sort_columns(partnumber, description, qty, unit, sellprice, fxsellprice, curr, discount, deliverydate, projectnumber, serialnumber);
  • if ($form->{history} eq 'summary') {
  • @columns = $form->sort_columns(partnumber, description, qty, unit, sellprice, curr);
  • }
  • foreach $item (@columns) {
  • if ($form->{"l_$item"} eq "Y") {
  • push @column_index, $item;
  • # add column to href and callback
  • $callback .= "&l_$item=Y";
  • $href .= "&l_$item=Y";
  • }
  • }
  • if ($form->{history} eq 'detail') {
  • $option = $locale->text('Detail');
  • }
  • if ($form->{history} eq 'summary') {
  • $option .= $locale->text('Summary');
  • }
  • if ($form->{name}) {
  • $callback .= "&name=".$form->escape($form->{name},1);
  • $href .= "&name=".$form->escape($form->{name});
  • $option .= "\n<br>".$locale->text('Name')." : $form->{name}";
  • }
  • if ($form->{contact}) {
  • $callback .= "&contact=".$form->escape($form->{contact},1);
  • $href .= "&contact=".$form->escape($form->{contact});
  • $option .= "\n<br>".$locale->text('Contact')." : $form->{contact}";
  • }
  • if ($form->{"$form->{db}number"}) {
  • $callback .= qq|&$form->{db}number=|.$form->escape($form->{"$form->{db}number"},1);
  • $href .= "&$form->{db}number=".$form->escape($form->{"$form->{db}number"});
  • $option .= "\n<br>".$locale->text('Number').qq| : $form->{"$form->{db}number"}|;
  • }
  • if ($form->{email}) {
  • $callback .= "&email=".$form->escape($form->{email},1);
  • $href .= "&email=".$form->escape($form->{email});
  • $option .= "\n<br>".$locale->text('E-mail')." : $form->{email}";
  • }
  • if ($form->{transdatefrom}) {
  • $callback .= "&transdatefrom=$form->{transdatefrom}";
  • $href .= "&transdatefrom=$form->{transdatefrom}";
  • $option .= "\n<br>" if ($option);
  • $option .= $locale->text('From')."&nbsp;".$locale->date(\%myconfig, $form->{transdatefrom}, 1);
  • }
  • if ($form->{transdateto}) {
  • $callback .= "&transdateto=$form->{transdateto}";
  • $href .= "&transdateto=$form->{transdateto}";
  • if ($form->{transdatefrom}) {
  • $option .= " ";
  • } else {
  • $option .= "\n<br>" if ($option);
  • }
  • $option .= $locale->text('To')."&nbsp;".$locale->date(\%myconfig, $form->{transdateto}, 1);
  • }
  • if ($form->{open}) {
  • $callback .= "&open=$form->{open}";
  • $href .= "&open=$form->{open}";
  • $option .= "\n<br>" if ($option);
  • $option .= $locale->text('Open');
  • }
  • if ($form->{closed}) {
  • $callback .= "&closed=$form->{closed}";
  • $href .= "&closed=$form->{closed}";
  • $option .= "\n<br>" if ($option);
  • $option .= $locale->text('Closed');
  • }
  • $form->{callback} = "$callback&sort=$form->{sort}";
  • $callback = $form->escape($form->{callback});
  • $column_header{partnumber} = qq|<th><a class=listheading href=$href&sort=partnumber>|.$locale->text('Part Number').qq|</a></th>|;
  • $column_header{description} = qq|<th><a class=listheading href=$href&sort=description>|.$locale->text('Description').qq|</a></th>|;
  • if ($form->{history} eq 'summary') {
  • $column_header{sellprice} = qq|<th class=listheading>|.$locale->text('Total').qq|</th>|;
  • } else {
  • $column_header{sellprice} = qq|<th class=listheading>|.$locale->text('Sell Price').qq|</th>|;
  • }
  • $column_header{fxsellprice} = qq|<th>&nbsp;</th>|;
  • $column_header{curr} = qq|<th class=listheading>|.$locale->text('Curr').qq|</th>|;
  • $column_header{discount} = qq|<th class=listheading>|.$locale->text('Discount').qq|</th>|;
  • $column_header{qty} = qq|<th class=listheading>|.$locale->text('Qty').qq|</th>|;
  • $column_header{unit} = qq|<th class=listheading>|.$locale->text('Unit').qq|</th>|;
  • $column_header{deliverydate} = qq|<th><a class=listheading href=$href&sort=deliverydate>|.$locale->text('Delivery Date').qq|</a></th>|;
  • $column_header{projectnumber} = qq|<th><a class=listheading href=$href&sort=projectnumber>|.$locale->text('Project Number').qq|</a></th>|;
  • $column_header{serialnumber} = qq|<th><a class=listheading href=$href&sort=serialnumber>|.$locale->text('Serial Number').qq|</a></th>|;
  • # $locale->text('Customer History')
  • # $locale->text('Vendor History')
  • $label = ucfirst $form->{db};
  • $form->{title} = $locale->text($label." History");
  • $colspan = $#column_index + 1;
  • $form->header;
  • print qq|
  • <body>
  • <table width=100%>
  • <tr>
  • <th class=listtop>$form->{title}</th>
  • </tr>
  • <tr height="5"></tr>
  • <tr>
  • <td>$option</td>
  • </tr>
  • <tr>
  • <td>
  • <table width=100%>
  • <tr class=listheading>
  • |;
  • for (@column_index) { print "$column_header{$_}\n" }
  • print qq|
  • </tr>
  • |;
  • $module = 'oe';
  • if ($form->{db} eq 'customer') {
  • $invlabel = $locale->text('Sales Invoice');
  • $ordlabel = $locale->text('Sales Order');
  • $quolabel = $locale->text('Quotation');
  • $ordertype = 'sales_order';
  • $quotationtype = 'sales_quotation';
  • if ($form->{type} eq 'invoice') {
  • $module = 'is';
  • }
  • } else {
  • $invlabel = $locale->text('Vendor Invoice');
  • $ordlabel = $locale->text('Purchase Order');
  • $quolabel = $locale->text('RFQ');