summaryrefslogtreecommitdiff
path: root/UI/Contact/contact.html
blob: f2d145317dfaedaee114036defbb5ebe748abc5c (plain)
  1. <?lsmb script_css = "Contact/contact.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. <?lsmb IF entity_id ?><?lsmb operation = "Edit" ?><?lsmb ELSE
  9. ?><?lsmb operation = "Add"
  10. ?><?lsmb END ?>
  11. <!-- CT: Keys for localization scripts:
  12. <?lsmb text("Add Customer") ?>
  13. <?lsmb text("Edit Customer") ?>
  14. <?lsmb text("Add Vendor") ?>
  15. <?lsmb text("Edit Vendor") ?>
  16. <?lsmb text("Add Employee") ?>
  17. <?lsmb text("Edit Employee") ?>
  18. -->
  19. <ul class="navigation">
  20. <li><a href="#customer_div"><?lsmb text('Account') ?></a></li>
  21. <?lsmb IF entity_id ?>
  22. <li><a href="#location_div"><?lsmb text('Addresses') ?></a></li>
  23. <li><a href="#contact_div"><?lsmb text('Contact Info') ?></a></li>
  24. <li><a href="#bank_div"><?lsmb text('Bank Accounts') ?></a></li>
  25. <!-- Commented out as not yet implemented -CT
  26. <li><a href="#notes_div"><?lsmb text('Notes') ?></a></li>
  27. <li><a href="#history_div"><?lsmb text('History') ?></a></li>
  28. -->
  29. <?lsmb END ?>
  30. </ul>
  31. </div>
  32. <div class="container" id="customer_div">
  33. <?lsmb SWITCH entity_class
  34. ?><?lsmb CASE 1 ?><?lsmb entity_classname = "Vendor"
  35. ?><?lsmb CASE 2 ?><?lsmb entity_classname = "Customer"
  36. ?><?lsmb CASE 3 ?><?lsmb entity_classname = "Employee"
  37. ?><?lsmb END ?>
  38. <div class="listtop"><strong><?lsmb text("$operation $entity_classname") ?></strong></div>
  39. <?lsmb FOREACH n = notes ?>
  40. <div class="entity_note"><?lsmb n.note ?></div>
  41. <?lsmb END ?>
  42. <form name="customer" method="POST" action="<?lsmb script ?>">
  43. <?lsmb PROCESS input element_data = {
  44. type = "hidden"
  45. name = "entity_id"
  46. value = entity_id
  47. } ?>
  48. <?lsmb PROCESS input element_data = {
  49. label = text('Name:'),
  50. type= "text",
  51. name = "name",
  52. value = name,
  53. size = "20"
  54. } ?><br/>
  55. <?lsmb PROCESS input element_data = {
  56. label = text('Account Number:'),
  57. type= "text",
  58. name = "meta_number",
  59. value = meta_number,
  60. size = "20"
  61. } ?><br/>
  62. <table>
  63. <!-- TODO: Create another tab for order history, and another one
  64. for notes -->
  65. <tr>
  66. <td>
  67. <?lsmb PROCESS input element_data = {
  68. label = text('Starting Date:'),
  69. name = "startdate",
  70. class = "date",
  71. value = startdate,
  72. type = "text",
  73. size = "12",
  74. maxlength = "10"
  75. } ?>
  76. </td>
  77. <td>
  78. <?lsmb PROCESS input element_data = {
  79. label = text('End Date:'),
  80. name = "enddate",
  81. class = "date",
  82. value = enddate,
  83. type = "text",
  84. size = "12",
  85. maxlength = "10"
  86. } ?>
  87. </td>
  88. </tr>
  89. <tr>
  90. <td>
  91. <?lsmb PROCESS input element_data = {
  92. label = text('Credit Limit:'),
  93. name = "creditlimit",
  94. value = creditlimit,
  95. type = "text",
  96. size = "20"
  97. } ?>
  98. </td>
  99. <td>
  100. <?lsmb PROCESS input element_data = {
  101. label = text('Terms:'),
  102. name = "terms",
  103. value = terms,
  104. type = "text",
  105. size = "5"
  106. } ?> <?lsmb text('days') ?>
  107. </td>
  108. </tr>
  109. <tr>
  110. <td>
  111. <?lsmb PROCESS input element_data = {
  112. label = text('Tax Number/SSN:'),
  113. name = "taxnumber",
  114. value = taxnumber,
  115. type = "text",
  116. size = "19"
  117. } ?>
  118. </td>
  119. <td>
  120. <?lsmb PROCESS input element_data = {
  121. label = text('Subcontract GIFI:'),
  122. name = "gifi_accno",
  123. value = gifi_accno,
  124. type = "text",
  125. size = "19"
  126. } ?>
  127. </td>
  128. </tr>
  129. <tr>
  130. <td>
  131. <?lsmb PROCESS input element_data = {
  132. label = text('Discount:'),
  133. name = "discount",
  134. value = discount,
  135. type = "text",
  136. size = "3",
  137. maxlength = 3
  138. } ?>% /
  139. <?lsmb PROCESS input element_data = {
  140. name = "discount_terms",
  141. value = discount_terms,
  142. type = "text",
  143. size = "3",
  144. maxlength = 3
  145. } ?> <?lsmb text('days') ?>
  146. </td>
  147. <td>
  148. <?lsmb PROCESS input element_data = {
  149. label = text('SIC:'),
  150. name = "sic_code",
  151. value = sic_code,
  152. type = "text",
  153. size = "19",
  154. class = 'sic'
  155. } ?>
  156. </td>
  157. </tr>
  158. <tr>
  159. <tr>
  160. <td>
  161. <!-- TODO: Move to elements.html framework. -CT -->
  162. <label for="notes"><?lsmb text('Notes:') ?></label><br/>
  163. <textarea name="notes" rows="3" cols="40" id="notes"></textarea>
  164. </td>
  165. </tr>
  166. </table>
  167. <hr/>
  168. <?lsmb PROCESS button element_data = {
  169. text = text('Save'),
  170. class="submit"
  171. type="submit"
  172. name="action"
  173. value="save"
  174. accesskey="S"
  175. title="Save [Alt-S]"
  176. } ?>
  177. <?lsmb PROCESS button element_data = {
  178. class="submit"
  179. type="submit"
  180. name="action"
  181. value="ap_transaction"
  182. accesskey="A"
  183. title="AP Transaction [Alt-A]"
  184. text = text('AP Transaction')
  185. } ?>
  186. <?lsmb PROCESS button element_data = {
  187. class="submit"
  188. type="submit"
  189. name="action"
  190. value="customer_invoice"
  191. accesskey="I"
  192. title="customer Invoice [Alt-I]"
  193. text = text('Customer Invoice')
  194. } ?>
  195. <?lsmb PROCESS button element_data = {
  196. class="submit"
  197. type="submit"
  198. name="action"
  199. value="purchase_order"
  200. accesskey="O"
  201. title="Purchase Order [Alt-O]"
  202. text = text('Purchase Order')
  203. } ?>
  204. <?lsmb PROCESS button element_data = {
  205. class="submit"
  206. type="submit"
  207. name="action"
  208. value="rfq"
  209. accesskey="Q"
  210. title="RFQ [Alt-Q]"
  211. text = text('RFQ')
  212. } ?>
  213. <?lsmb PROCESS button element_data = {
  214. class="submit"
  215. type="submit"
  216. name="action"
  217. value="pricelist"
  218. accesskey="P"
  219. title="Pricelist [Alt-P]"
  220. text = text('Pricelist')
  221. } ?>
  222. </form>
  223. </div>
  224. <?lsmb IF entity_id ?>
  225. <div id="location_div" class="container">
  226. <div class="listtop"><?lsmb text('Locations') ?></div>
  227. <!-- This entire form should probably be optionaly automated with AJAX
  228. in oder to prevent user confusion -->
  229. <form id="location_form" action="<?lsmb script ?>">
  230. <?lsmb PROCESS input element_data = {
  231. type="hidden"
  232. name="entity_id"
  233. value=entity_id
  234. } ?>
  235. <?lsmb PROCESS input element_data = {
  236. type="hidden"
  237. name="location_id"
  238. value=location_id
  239. } ?>
  240. <table width="100%">
  241. <tr class="listheading">
  242. <th class="type"><?lsmb text('Type') ?></th>
  243. <th class="line_one"><?lsmb text('Address1') ?></th>
  244. <th class="city"><?lsmb text('City') ?></th>
  245. <th class="state"><?lsmb text('State/Province') ?></th>
  246. <th class="mail_code"><?lsmb text('ZIP/Post Code') ?></th>
  247. <th class="country"><?lsmb text('Country') ?></th>
  248. <th class="actions"><?lsmb text('Actions') ?></th>
  249. </tr>
  250. <?lsmb FOREACH loc = locations ?>
  251. <tr>
  252. <td class="type"><?lsmb loc.class ?></td>
  253. <td class="line_one"><?lsmb loc.line_one ?></td>
  254. <td class="city"><?lsmb loc.city ?></td>
  255. <td class="state"><?lsmb loc.state ?></td>
  256. <td class="mail_code"><?lsmb loc.mail_code ?></td>
  257. <td class="country"><?lsmb loc.country ?></td>
  258. <td class="actions">
  259. <!-- TODO: Automate links with AJAX -->
  260. <a href="<?lsmb script ?>?action=edit&entity_id=<?lsmb id
  261. ?>&location_id=<?lsmb loc.id ?>">[edit]</a>
  262. <a href="<?lsmb script ?>?action=delete_location&entity_id=<?lsmb
  263. id ?>&location_id=<?lmb loc.id ?>">[delete]</a>
  264. </td>
  265. </tr>
  266. <?lsmb END ?>
  267. </table>
  268. <div> <!-- TODO: Move to elements.html -CT -->
  269. <label for="loc_type"><?lsmb text('Type:') ?></label>
  270. <select id='loc_type' name="location_class">
  271. <?lsmb FOREACH lc = location_class_list ?>
  272. <option value="<?lsmb lc.id ?>"><?lsmb lc.class ?></option>
  273. <?lsmb END ?>
  274. </select>
  275. </div>
  276. <div>
  277. <?lsmb PROCESS input element_data = {
  278. label = text('Address:'),
  279. name = "line_one",
  280. value = line_one,
  281. type = "text",
  282. size = "20"
  283. } ?>
  284. </div>
  285. <div>
  286. <?lsmb PROCESS input element_data = {
  287. name = "line_two",
  288. value = line_two,
  289. type = "text",
  290. size = "20"
  291. } ?>
  292. </div>
  293. <div>
  294. <?lsmb PROCESS input element_data = {
  295. name = "line_three",
  296. value = line_three,
  297. type = "text",
  298. size = "20"
  299. } ?>
  300. </div>
  301. <div>
  302. <?lsmb PROCESS input element_data = {
  303. label = text('City:'),
  304. name = "city",
  305. value = city,
  306. type = "text",
  307. size = "20"
  308. } ?>
  309. </div>
  310. <div>
  311. <?lsmb PROCESS input element_data = {
  312. label = text('State/Province:'),
  313. name = "state",
  314. value = state,
  315. type = "text",
  316. size = "20"
  317. } ?>
  318. </div>
  319. <div>
  320. <?lsmb PROCESS input element_data = {
  321. label = text('Zip/Post Code:'),
  322. name = "mail_code",
  323. value = mail_code,
  324. type = "text",
  325. size = "20"
  326. } ?>
  327. </div>
  328. <div> <!-- TODO: Move to elements.html -CT -->
  329. <label for="country"><?lsmb text('Country:') ?></label>
  330. <select name="country" id="country">
  331. <?lsmb FOREACH c = country_list ?>
  332. <option value="<?lsmb c.id ?>"><?lsmb c.name ?></option>
  333. <?lsmb END ?>
  334. </select>
  335. </div>
  336. <div><?lsmb PROCESS button element_data = {
  337. class = "submit"
  338. name = "action"
  339. value = "add_location"
  340. id = "loc_save_location"
  341. text = text('Save Location')
  342. } ?>
  343. </div>
  344. </form>
  345. </div>
  346. <div class="container" id="contact_div">
  347. <div class="listtop"><?lsmb text('Contact Information') ?></div>
  348. <table width="100%">
  349. <tr class="listheading">
  350. <th class="contact_class"><?lsmb text('Type:') ?></th>
  351. <th class="contact"><?lsmb text('Contact Info:') ?></th>
  352. <th class="contact_actions"><?lsmb text('Actions:') ?></th>
  353. </tr>
  354. <?lsmb FOREACH ct = contacts ?>
  355. <tr>
  356. <td class="contact_class"><?lsmb ct.class ?></td>
  357. <td class="contact"><?lsmb ct.contact ?></td>
  358. <td class="contact_actions">
  359. <a href="<?lsmb script ?>?entity_id=<?lsmb entity_id
  360. ?>&contact_id=<?lsmb ct.id
  361. ?>&action=edit_contact"
  362. >[<?lsmb text('Edit'); ?>]</a>&nbsp;&nbsp;
  363. <a href="<?lsmb script ?>?entity_id=<?lsmb entity_id
  364. ?>&contact_id=<?lsmb ct.id
  365. ?>&action=delete_contact"
  366. >[<?lsmb text('Delete'); ?>]</a>
  367. </td>
  368. </tr>
  369. <?lsmb END ?>
  370. </table>
  371. <form action="<?lsmb script ?>">
  372. <?lsmb PROCESS input element_data = {
  373. type="hidden"
  374. name="entity_id"
  375. value=entity_id
  376. } ?>
  377. <?lsmb PROCESS input element_data = {
  378. type="hidden"
  379. name="contact_id"
  380. value=contact_id
  381. } ?>
  382. <div><label for="contact_type"><?lsmb text('Type:') ?></label>
  383. <select name="contact_class" id="contact_type">
  384. <?lsmb FOREACH cc = contact_class_list ?>
  385. <option value="<?lsmb cc.id ?>"><?lsmb cc.class ?></option>
  386. <?lsmb END ?>
  387. </select>
  388. <!-- TODO: Move the above select list to elements.html -CT -->
  389. </div>
  390. <div>
  391. <?lsmb PROCESS input element_data = {
  392. label = text('Contact Info:'),
  393. name = "contact"
  394. value = contact
  395. type = "text"
  396. size = "20"
  397. } ?>
  398. </div>
  399. <div><?lsmb PROCESS button element_data = {
  400. name = "action",
  401. value = "save_contact",
  402. text = text('Save Contact'),
  403. class = "submit"
  404. } ?>
  405. </div>
  406. </form>
  407. </div>
  408. <div class="container" id="bank_div">
  409. <div class="listtop"><?lsmb text('Bank Accounts') ?></div>
  410. <table width="100%">
  411. <tr class="listheading">
  412. <th class="bic"><?lsmb text('BIC/SWIFT Code') ?></th>
  413. <th class="iban"><?lsmb text('Account Number') ?></th>
  414. <th class="actions"><?lsmb text('Actions') ?></th>
  415. </tr>
  416. <?lsmb FOREACH ba = bank_account ?>
  417. <tr>
  418. <td class="bic"><?lsmb ba.bic ?></td>
  419. <td class="iban"><?lsmb ba.iban ?></td>
  420. <td class="actions">
  421. <a href="<?lsmb script ?>?action=edit_bank_acct&entity_id=<?lsmb
  422. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  423. >[Edit]</a>
  424. <a href="<?lsmb script ?>?action=delete_bank_acct&entity_id=<?lsmb
  425. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  426. >[Delete]</a>
  427. </td>
  428. </tr>
  429. <?lsmb END ?>
  430. </table>
  431. <form name="bank_acct" action="<?lsmb script ?>">
  432. <?lsmb PROCESS input element_data = {
  433. type="hidden"
  434. name="entity_id"
  435. value=entity_id
  436. } ?>
  437. <?lsmb PROCESS input element_data = {
  438. type="hidden"
  439. name="bank_account_id"
  440. value=bank_account_id
  441. } ?>
  442. <div><label for="bic">
  443. <?lsmb PROCESS input element_data = {
  444. type="text"
  445. label = text('BIC/SWIFT Code:')
  446. name="bic"
  447. value=bic
  448. size=20
  449. } ?>
  450. </div>
  451. <div><label for="iban">
  452. <?lsmb PROCESS input element_data = {
  453. type="text"
  454. label = text('Bank Account:')
  455. name="iban"
  456. value=iban
  457. size=20
  458. } ?>
  459. </div>
  460. <div><?lsmb PROCESS button element_data = {
  461. name="action"
  462. value="save_bank_account"
  463. class="submit"
  464. text = text('Save')
  465. } ?>
  466. </div>
  467. </div>
  468. <?lsmb END ?>
  469. </body>
  470. </html>