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