summaryrefslogtreecommitdiff
path: root/UI/Customer/customer.html
blob: 759f4d722e1865e689811e9be5ba9884b31ca825 (plain)
  1. <?lsmb script_css = "Customer/customer.css" ?><?lsmb PROCESS 'ui-header.html' ?>
  2. <?lsmb PROCESS 'elements.html' ?>
  3. <body>
  4. <div class="navigation" id="nav_div">
  5. </div>
  6. <div class="container" id="customer_div">
  7. <div class="listtop"><strong><?lsmb text('Add/Edit Customer') ?></strong></div>
  8. <?lsmb IF name ?>
  9. <font size="17"><?lsmb name?></font>
  10. <?lsmb END ?>
  11. <form name="customer" method="POST" action="customer.pl">
  12. <input type="hidden" name="entity_id" value="<?lsmb entity_id ?>">
  13. <label for="name"><?lsmb text('Name:') ?></label>
  14. <input name="name" id="name" type="text" value="<?lsmb name ?>"><br/>
  15. <label for="meta_number"><?lsmb text('Account Number:') ?></label>
  16. <input name="meta_number" id="meta_number" type="text"
  17. value="<?lsmb meta_number?>"><br/>
  18. <table>
  19. <?lsmb IF ordered ?>
  20. <tr>
  21. <td><b><?lsmb text('Shipping Address') ?></b></td>
  22. <td><b><?lsmb text('Billing Address (if different)') ?></p></td>
  23. </tr>
  24. <?lsmb END ?>
  25. <?lsmb FOREACH entry = ordered ?>
  26. <tr>
  27. <td>
  28. <label for="shipping_<?lsmb entry ?>"><?lsmb text(entry) ?>:
  29. </label>
  30. <input id="shipping_<?lsmb entry ?>" type="text"
  31. name="shipping_<?lsmb entry ?>"
  32. value="<?lsmb entry ?>">
  33. </td>
  34. <td>
  35. <input type="text" name="billing_<?lsmb entry ?>"
  36. value="<?lsmb entry ?>">
  37. </td>
  38. </tr>
  39. <?lsmb END ?>
  40. <tr>
  41. <td>
  42. <label for="startdate"><?lsmb text('Starting Date:') ?></label>
  43. <input id="startdate" type="text" name="startdate"
  44. class="date" value="<?lsmb startdate ?>">
  45. </td>
  46. <td>
  47. <label for="enddate"><?lsmb('End date:') ?></label>
  48. <input id="enddate" type="text" name="startdate"
  49. class="date" value="<?lsmb enddate ?>">
  50. </td>
  51. </tr>
  52. <tr>
  53. <td>
  54. <label for="creditlimit"><?lsmb text('Credit Limit:') ?></label>
  55. <input id="creditlimit" name="creditlimit" type="text"
  56. value="<?lsmb creditlimit ?>">
  57. </td>
  58. <td>
  59. <label for="terms"><?lsmb text('Terms:') ?></label>
  60. <input id="terms" name="terms" type="text"
  61. value="<?lsmb terms ?>"> days
  62. </td>
  63. </tr>
  64. <tr>
  65. <td>
  66. <label for="taxnumber"><?lsmb text('Tax Number/SSN:') ?></label>
  67. <input id="taxnumber" name="taxnumber" type="text"
  68. value="<?lsmb taxnumber ?>">
  69. </td>
  70. <td>
  71. <label for="gifi_accno"><?lsmb text('Subcontract GIFI:') ?>
  72. </label>
  73. <input id="gifi_accno" name="gifi_accno" type="text"
  74. value="<?lsmb gifi_accno ?>">
  75. </td>
  76. </tr>
  77. <tr>
  78. <td>
  79. <label for="discount"><?lsmb text('Discount %:') ?></label>
  80. <input id="discount" name="discount" type="text" size="3"
  81. maxlength="3" value="<?lsmb discount ?>">/
  82. <input id="discountdays" name="discountdays" type="text"
  83. size="3" value="<?lsmb discount_days ?>">
  84. </td>
  85. <td>
  86. <label for="sic_code"><?lsmb text('SIC Code:') ?></label>
  87. <input id="sic_code" name="sic_code" type="text"
  88. value="<?lsmb sic_code ?>">
  89. </td>
  90. </tr>
  91. <tr>
  92. <tr>
  93. <td>
  94. <label for="notes"><?lsmb text('Notes:') ?></label><br/>
  95. <textarea name="notes" rows="3" cols="40" id="notes"><?lsmb
  96. notes
  97. ?></textarea>
  98. <!-- CT: The prior funny whitespace may look funny but it
  99. prevents additional whitespace from being added to the data
  100. every time it is saved. -->
  101. </td>
  102. </tr>
  103. </table>
  104. <hr/>
  105. <button class="submit"
  106. type="submit"
  107. name="action"
  108. value="save"
  109. accesskey="S"
  110. title="Save [Alt-S]"><?lsmb text('Save') ?></button>
  111. <button class="submit"
  112. type="submit"
  113. name="action"
  114. value="ap_transaction"
  115. accesskey="A"
  116. title="AP Transaction [Alt-A]">
  117. <?lsmb text('AP Transaction') ?></button>
  118. <button class="submit"
  119. type="submit"
  120. name="action"
  121. value="customer_invoice"
  122. accesskey="I"
  123. title="customer Invoice [Alt-I]">
  124. <?lsmb text('Customer Invoice') ?></button>
  125. <button class="submit"
  126. type="submit"
  127. name="action"
  128. value="purchase_order"
  129. accesskey="O"
  130. title="Purchase Order [Alt-O]">
  131. <?lsmb text('Purchase Order') ?></button>
  132. <button class="submit"
  133. type="submit"
  134. name="action"
  135. value="rfq"
  136. accesskey="Q"
  137. title="RFQ [Alt-Q]"><?lsmb text('RFQ') ?></button>
  138. <button class="submit"
  139. type="submit"
  140. name="action"
  141. value="pricelist"
  142. accesskey="P"
  143. title="Pricelist [Alt-P]">
  144. <?lsmb text('Pricelist') ?></button>
  145. </form>
  146. </div>
  147. <?lsmb #IF id ?>
  148. <div id="locations" class="container">
  149. <div class="listtop"><?lsmb text('Locations') ?></div>
  150. <!-- This entire form should probably be optionaly automated with AJAX
  151. in oder to prevent user confusion -->
  152. <form id="location_form" action="vendor.pl">
  153. <input type="hidden" name="entity_id" value="<?lsmb entity_id ?>">
  154. <input type="hidden" name="location_id" value="<?lsmb location_id ?>">
  155. <table width="100%">
  156. <tr class="listheading">
  157. <th class="type"><?lsmb text('Type') ?></th>
  158. <th class="line_one"><?lsmb text('Address1') ?></th>
  159. <th class="city"><?lsmb text('City') ?></th>
  160. <th class="state"><?lsmb text('State/Province') ?></th>
  161. <th class="mail_code"><?lsmb text('ZIP/Post Code') ?></th>
  162. <th class="country"><?lsmb text('Country') ?></th>
  163. <th class="actions"><?lsmb text('Actions') ?></th>
  164. </tr>
  165. <?lsmb FOREACH loc = locations ?>
  166. <tr>
  167. <td class="type"><?lsmb loc.type ?></td>
  168. <td class="line_one"><?lsmb loc.line_one ?></td>
  169. <td class="city"><?lsmb loc.city ?></td>
  170. <td class="state"><?lsmb loc.state ?></td>
  171. <td class="mail_code"><?lsmb loc.mail_code ?></td>
  172. <td class="country"><?lsmb loc.country ?></td>
  173. <td class="actions">
  174. <!-- TODO: Automate links with AJAX -->
  175. <a href="customer.pl?action=edit&entity_id=<?lsmb id
  176. ?>&location_id=<?lsmb loc.id ?>">[edit]</a>
  177. <a href="customer.pl?action=delete_location&entity_id=<?lsmb
  178. id ?>&location_id=<?lmb loc.id ?>">[delete]</a>
  179. </td>
  180. </tr>
  181. <?lsmb END ?>
  182. </table>
  183. <div>
  184. <label for="loc_type"><?lsmb text('Type:') ?></label>
  185. <select name='loc_type'>
  186. <?lsmb FOREACH lc = location_class ?>
  187. <option value="<?lsmb lc.id ?>"><?lsmb lc.class ?></option>
  188. <?lsmb END ?>
  189. </select>
  190. </div>
  191. <div>
  192. <label for="line_one"><?lsmb text('Address:') ?></label>
  193. <input name="line_one" id="line_one"/>
  194. </div>
  195. <div>
  196. <input name="line_two" id="line_two"/>
  197. </div>
  198. <div>
  199. <input name="line_three" id="line_three"/>
  200. </div>
  201. <div>
  202. <label for="city"><?lsmb text('City:') ?></label>
  203. <input name="city" id="city"/>
  204. </div>
  205. <div>
  206. <label for="state"><?lsmb text('State/Province:') ?></label>
  207. <input name="state" id="state"/>
  208. </div>
  209. <div>
  210. <label for="mail_code"><?lsmb text('Zip/Post Code:') ?></label>
  211. <input name="mail_code" id="mail_code"/>
  212. </div>
  213. <div>
  214. <label for="country"><?lsmb text('Country:') ?></label>
  215. <select name="country" id="country">
  216. <?lsmb FOREACH c = country ?>
  217. <option value="<?lsmb c.id ?>"><?lsmb c.name ?></option>
  218. <?lsmb END ?>
  219. </select>
  220. </div>
  221. <div><button type=submit class="submit" name=submit value="add_location"
  222. id="loc_save_location">Save Location</button>
  223. </div>
  224. </form>
  225. </div>
  226. <div class="container" id="contact_div">
  227. <div class="listtop"><?lsmb text('Contact Information') ?></div>
  228. <table width="100%">
  229. <tr class="listheading">
  230. <th class="contact_class"><?lsmb text('Type:') ?></th>
  231. <th class="contact"><?lsmb text('Contact Info:') ?></th>
  232. <th class="contact_actions"><?lsmb text('Actions:') ?></th>
  233. </tr>
  234. <?lsmb FOREACH ct = contacts ?>
  235. <tr>
  236. <td class="contact_class"><?lsmb ct.class ?></td>
  237. <td class="contact"><?lsmb ct.contact ?></td>
  238. <td class="contact_actions">
  239. <a href="customer.pl?entity_id=<?lsmb entity_id
  240. ?>&contact_id=<?lsmb ct.id
  241. ?>&action=edit_contact"
  242. >[<?lsmb text('Edit'); ?>]</a>&nbsp;&nbsp;
  243. <a href="customer.pl?entity_id=<?lsmb entity_id
  244. ?>&contact_id=<?lsmb ct.id
  245. ?>&action=delete_contact"
  246. >[<?lsmb text('Delete'); ?>]</a>
  247. </td>
  248. </tr>
  249. <?lsmb END ?>
  250. </table>
  251. <form action="customer.pl">
  252. <input type="hidden" name="entity_id" value="<?lsmb entity_id ?>">
  253. <input type="hidden" name="contact_id" value="<?lsmb contact_id ?>">
  254. <div><label for="contact_type"><?lsmb text('Type:') ?></label>
  255. <select name="contact_class" id="contact_type">
  256. <?lsmb FOREACH cc = contact_class ?>
  257. <option value="<?lsmb cc.id ?>"><?lsmb cc.class ?></option>
  258. <?lsmb END ?>
  259. </select>
  260. </div>
  261. <div><label for="contact_info"><?lsmb text('Contact Info:') ?></label>
  262. <input type="text" id="contact_info" name="contact"
  263. value="<?lsmb contact ?>">
  264. </div>
  265. <div><button name="action" id="contact_action_save"
  266. value="save_contact"><?lsmb text('Save Contact') ?></button>
  267. </div>
  268. </div>
  269. <div class="container" id="bank_div">
  270. <div class="listtop"><?lsmb text('Bank Accounts') ?></div>
  271. <table width="100%">
  272. <tr class="listheading">
  273. <th class="bic"><?lsmb text('BIC/SWIFT Code') ?></th>
  274. <th class="iban"><?lsmb text('Account Number') ?></th>
  275. <th class="actions"><?lsmb text('Actions>') ?></th>
  276. </tr>
  277. <?lsmb FOREACH ba = bank_account ?>
  278. <tr>
  279. <td class="bic"><?lsmb ba.bic ?></td>
  280. <td class="iban"><?lsmb ba.iban ?></td>
  281. <td class="actions">
  282. <a href="customer.pl?action=edit_bank_acct&entity_id=<?lsmb
  283. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  284. >[Edit]</a>
  285. <a href="customer.pl?action=delete_bank_acct&entity_id=<?lsmb
  286. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  287. >[Delete]</a>
  288. </td>
  289. </tr>
  290. <?lsmb END ?>
  291. </table>
  292. <form action="customer.pl">
  293. <input type="hidden" name="entity_id" value="<?lsmb entity_id ?>">
  294. <input type="hidden" name="bank_account_id"
  295. value="<?lsmb bank_account_id ?>">
  296. <div><label for="bic"><?lsmb text('BIC/SWIFT Code:') ?></label>
  297. <input type="text" name="bic" id="bic" value="<?lsmb bic ?>">
  298. </div>
  299. <div><label for="iban"><?lsmb text('Bank Account:') ?></label>
  300. <input type="text" name="iban" id="iban" value="<?lsmb iban ?>">
  301. </div>
  302. <div><button id="bank_account_save" name="action"
  303. value="save_bank_account"><?lsmb text('Save') ?></button>
  304. </div>
  305. </div>
  306. <?lsmb #END ?>
  307. </body>
  308. </html>