summaryrefslogtreecommitdiff
path: root/templates/Service-request_quotation.html
blob: 9a9970b3e2105e2ebde313ff70cb9c459674a306 (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>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</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>RFQ #</th>
  87. <th width=17% align=left>Date</th>
  88. <th width=17% align=left>Required by</th>
  89. <th width=17% align=left>Contact</th>
  90. <th width=17% align=left>Shipping Point</th>
  91. <th width=15% align=left>Ship 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>Please provide price and delivery time for the following items:</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>Number</th>
  115. <th align=left><font color=ffffff>Description</th>
  116. <th>Qt'y</th>
  117. <th>&nbsp;</th>
  118. <th>Delivery</th>
  119. <th>Unit Price</th>
  120. <th>Extended</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>
sid = ?, signature = ?, stylesheet = ?,
  • tel = ?, templates = ?, timeout = ?,
  • vclimit = ?
  • WHERE id = ?;"
  • );
  • $userConfUpdate->execute(
  • $self->{acs}, $self->{address},
  • $self->{businessnumber}, $self->{company},
  • $self->{countrycode}, $self->{currency},
  • $self->{dateformat}, $self->{dbdriver},
  • $self->{dbhost}, $self->{dbname},
  • $self->{dboptions}, $self->{dbpasswd},
  • $self->{dbport}, $self->{dbuser},
  • $self->{email}, $self->{fax},
  • $self->{menuwidth}, $self->{name},
  • $self->{numberformat}, $self->{crypted_password},
  • $self->{print}, $self->{printer},
  • $self->{role}, $self->{sid},
  • $self->{signature}, $self->{stylesheet},
  • $self->{tel}, $self->{templates},
  • $self->{timeout}, $self->{vclimit},
  • $userID
  • );
  • }
  • else {
  • my $userConfInsert = $dbh->prepare(
  • "INSERT INTO users_conf(acs, address, businessnumber,
  • company, countrycode, currency,
  • dateformat, dbdriver,
  • dbhost, dbname, dboptions, dbpasswd,
  • dbport, dbuser, email, fax, menuwidth,
  • name, numberformat, print, printer, role,
  • sid, signature, stylesheet, tel, templates,
  • timeout, vclimit, id, crypted_password)
  • VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
  • ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
  • ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"
  • );
  • $userConfInsert->execute(
  • $self->{acs}, $self->{address},
  • $self->{businessnumber}, $self->{company},
  • $self->{countrycode}, $self->{currency},
  • $self->{dateformat}, $self->{dbdriver},
  • $self->{dbhost}, $self->{dbname},
  • $self->{dboptions}, $self->{dbpasswd},
  • $self->{dbport}, $self->{dbuser},
  • $self->{email}, $self->{fax},
  • $self->{menuwidth}, $self->{name},
  • $self->{numberformat}, $self->{print},
  • $self->{printer}, $self->{role},
  • $self->{sid}, $self->{signature},
  • $self->{stylesheet}, $self->{tel},
  • $self->{templates}, $self->{timeout},
  • $self->{vclimit}, $userID,
  • $self->{crypted_password}
  • );
  • }
  • if ( !$self->{'admin'} ) {
  • $self->{dbpasswd} =~ s/\\'/'/g;
  • $self->{dbpasswd} =~ s/\\\\/\\/g;
  • # format dbconnect and dboptions string
  • LedgerSMB::User::dbconnect_vars( $self, $self->{dbname} );
  • # check if login is in database
  • my $dbh = DBI->connect(
  • $self->{dbconnect}, $self->{dbuser},
  • $self->{dbpasswd}, { AutoCommit => 0 }
  • ) or $self->error($DBI::errstr);
  • $dbh->{pg_enable_utf8} = 1;
  • # add login to employee table if it does not exist
  • my $login = $self->{login};
  • $login =~ s/@.*//;
  • my $sth = $dbh->prepare("SELECT entity_id FROM employee WHERE login = ?;");
  • $sth->execute($login);
  • my ($id) = $sth->fetchrow_array;
  • $sth->finish;
  • my $employeenumber;
  • my @values;
  • if ($id) {
  • $query = qq|UPDATE employee SET
  • role = ?,
  • email = ?,
  • name = ?
  • WHERE login = ?|;
  • @values = ( $self->{role}, $self->{email}, $self->{name}, $login );
  • }
  • else {
  • my ($employeenumber) =
  • Form::update_defaults( "", \%$self, "employeenumber", $dbh );
  • $query = qq|
  • INSERT INTO employee
  • (login, employeenumber, name,
  • workphone, role, email, sales)
  • VALUES (?, ?, ?, ?, ?, ?, '1')|;
  • @values = (
  • $login, $employeenumber, $self->{name},
  • $self->{tel}, $self->{role}, $self->{email}
  • );
  • }
  • $sth = $dbh->prepare($query);
  • $sth->execute(@values);
  • $dbh->commit;
  • $dbh->disconnect;
  • }
  • }