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