summaryrefslogtreecommitdiff
path: root/UI/Customer/customer.html
blob: 4bd9ae8dd2bcab8e578d9186a742d69f565b2dc7 (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="vendor.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.type ?></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 name='loc_type'>
  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=submit value="add_location"
  231. id="loc_save_location">Save Location</button>
  232. </div>
  233. </form>
  234. </div>
  235. <div class="container" id="contact_div">
  236. <div class="listtop"><?lsmb text('Contact Information') ?></div>
  237. <table width="100%">
  238. <tr class="listheading">
  239. <th class="contact_class"><?lsmb text('Type:') ?></th>
  240. <th class="contact"><?lsmb text('Contact Info:') ?></th>
  241. <th class="contact_actions"><?lsmb text('Actions:') ?></th>
  242. </tr>
  243. <?lsmb FOREACH ct = contacts ?>
  244. <tr>
  245. <td class="contact_class"><?lsmb ct.class ?></td>
  246. <td class="contact"><?lsmb ct.contact ?></td>
  247. <td class="contact_actions">
  248. <a href="customer.pl?entity_id=<?lsmb entity_id
  249. ?>&contact_id=<?lsmb ct.id
  250. ?>&action=edit_contact"
  251. >[<?lsmb text('Edit'); ?>]</a>&nbsp;&nbsp;
  252. <a href="customer.pl?entity_id=<?lsmb entity_id
  253. ?>&contact_id=<?lsmb ct.id
  254. ?>&action=delete_contact"
  255. >[<?lsmb text('Delete'); ?>]</a>
  256. </td>
  257. </tr>
  258. <?lsmb END ?>
  259. </table>
  260. <form action="customer.pl">
  261. <input type="hidden" name="entity_id" value="<?lsmb entity_id ?>">
  262. <input type="hidden" name="contact_id" value="<?lsmb contact_id ?>">
  263. <div><label for="contact_type"><?lsmb text('Type:') ?></label>
  264. <select name="contact_class" id="contact_type">
  265. <?lsmb FOREACH cc = contact_class ?>
  266. <option value="<?lsmb cc.id ?>"><?lsmb cc.class ?></option>
  267. <?lsmb END ?>
  268. </select>
  269. </div>
  270. <div><label for="contact_info"><?lsmb text('Contact Info:') ?></label>
  271. <input type="text" id="contact_info" name="contact"
  272. value="<?lsmb contact ?>">
  273. </div>
  274. <div><button name="action" id="contact_action_save"
  275. value="save_contact"><?lsmb text('Save Contact') ?></button>
  276. </div>
  277. </div>
  278. <div class="container" id="bank_div">
  279. <div class="listtop"><?lsmb text('Bank Accounts') ?></div>
  280. <table width="100%">
  281. <tr class="listheading">
  282. <th class="bic"><?lsmb text('BIC/SWIFT Code') ?></th>
  283. <th class="iban"><?lsmb text('Account Number') ?></th>
  284. <th class="actions"><?lsmb text('Actions>') ?></th>
  285. </tr>
  286. <?lsmb FOREACH ba = bank_account ?>
  287. <tr>
  288. <td class="bic"><?lsmb ba.bic ?></td>
  289. <td class="iban"><?lsmb ba.iban ?></td>
  290. <td class="actions">
  291. <a href="customer.pl?action=edit_bank_acct&entity_id=<?lsmb
  292. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  293. >[Edit]</a>
  294. <a href="customer.pl?action=delete_bank_acct&entity_id=<?lsmb
  295. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  296. >[Delete]</a>
  297. </td>
  298. </tr>
  299. <?lsmb END ?>
  300. </table>
  301. <form action="customer.pl">
  302. <input type="hidden" name="entity_id" value="<?lsmb entity_id ?>">
  303. <input type="hidden" name="bank_account_id"
  304. value="<?lsmb bank_account_id ?>">
  305. <div><label for="bic"><?lsmb text('BIC/SWIFT Code:') ?></label>
  306. <input type="text" name="bic" id="bic" value="<?lsmb bic ?>">
  307. </div>
  308. <div><label for="iban"><?lsmb text('Bank Account:') ?></label>
  309. <input type="text" name="iban" id="iban" value="<?lsmb iban ?>">
  310. </div>
  311. <div><button id="bank_account_save" name="action"
  312. value="save_bank_account"><?lsmb text('Save') ?></button>
  313. </div>
  314. </div>
  315. <?lsmb END ?>
  316. </body>
  317. </html>