summaryrefslogtreecommitdiff
path: root/UI/Contact/contact.html
blob: 070b6713603a427df040b13a5037d9842ffee89c (plain)
  1. <?lsmb INCLUDE 'ui-header.html'
  2. include_stylesheet = [
  3. stylesheet
  4. 'UI/Contact/contact.css'
  5. ] ?>
  6. <?lsmb PROCESS 'elements.html' ?>
  7. <body>
  8. <?lsmb IF name ?>
  9. <div class="pageheading"><?lsmb name?></div>
  10. <?lsmb END ?>
  11. <div class="navigation" id="nav_div">
  12. <?lsmb IF entity_id ?><?lsmb operation = "Edit" ?><?lsmb ELSE
  13. ?><?lsmb operation = "Add"
  14. ?><?lsmb END ?>
  15. <!-- CT: Keys for localization scripts:
  16. <?lsmb text("Add Customer") ?>
  17. <?lsmb text("Edit Customer") ?>
  18. <?lsmb text("Add Vendor") ?>
  19. <?lsmb text("Edit Vendor") ?>
  20. <?lsmb text("Add Employee") ?>
  21. <?lsmb text("Edit Employee") ?>
  22. -->
  23. <ul class="navigation">
  24. <?lsmb IF entity_class == 3 ?>
  25. <li><a href="#hr_div"><?lsmb text('HR') ?></a></li>
  26. <?lsmb ELSE ?>
  27. <li><a href="#company_div"><?lsmb text('Company') ?></a></li>
  28. <li><a href="#credit_div"><?lsmb text('Accounts') ?></a></li>
  29. <?lsmb END ?>
  30. <?lsmb IF entity_id ?>
  31. <li><a href="#location_div"><?lsmb text('Addresses') ?></a></li>
  32. <li><a href="#contact_div"><?lsmb text('Contact Info') ?></a></li>
  33. <li><a href="#bank_div"><?lsmb text('Bank Accounts') ?></a></li>
  34. <li><a href="#notes_div"><?lsmb text('Notes') ?></a></li>
  35. <!-- Commented out as not yet implemented -CT
  36. <li><a href="#history_div"><?lsmb text('History') ?></a></li>
  37. <li><a href="#user_div"><?lsmb text('User') ?></a></li>
  38. -->
  39. <?lsmb END ?>
  40. </ul>
  41. </div>
  42. <?lsmb IF entity_class == 3 ?>
  43. <div id="hr_div" class="container">
  44. <div class="listtop"><strong><?lsmb text("$operation Employee") ?></strong></div>
  45. <form name="hr" action="<?lsmb script ?>" method="post">
  46. <?lsmb PROCESS input element_data = {
  47. type = "hidden"
  48. name = "entity_id"
  49. value = entity_id
  50. } ?>
  51. <div class="input" id="person_name_div"><?lsmb text('Name:')?>&nbsp;
  52. <!-- TODO: Add Saluatation -->
  53. <?lsmb PROCESS input element_data = {
  54. label = text('First')
  55. name = "first_name"
  56. value = first_name
  57. type = "text"
  58. size = 20
  59. } ?>
  60. <?lsmb PROCESS input element_data = {
  61. label = text('Middle')
  62. name = "middle_name"
  63. value = middle_name
  64. type = "text"
  65. size = 20
  66. } ?>
  67. <?lsmb PROCESS input element_data = {
  68. label = text('Last')
  69. name = "last_name"
  70. value = last_name
  71. type = "text"
  72. size = 20
  73. } ?>
  74. </div>
  75. <div id="job_title_div">
  76. <!-- Note that the strange # ' constructs are only necessary to help VIM avoid
  77. problems with multi-word single-quoted constructs in PI tags. -CT -->
  78. <?lsmb PROCESS input element_data = {
  79. label = text('Job Title:')
  80. name = "role"
  81. value = role
  82. type = "text"
  83. size = 20
  84. } # ' ?>
  85. <?lsmb PROCESS input element_data = {
  86. label = text('Sales:')
  87. value = 1
  88. type = "checkbox"
  89. checked = sales
  90. name = "sales"
  91. } ?>
  92. <?lsmb PROCESS input element_data = {
  93. label = text('Employee Number')
  94. value = employee_number
  95. name = "employee_number"
  96. type = "text"
  97. size = 20
  98. } # ' ?>
  99. <label for="manager_select"><?lsmb text('Manager:') ?></label>
  100. <select id="manager_select" name="manager_id">
  101. <?lsmb FOREACH e = employee ?>
  102. <option value = e.entity_id <?lsmb (manager_id == e.entity_id) ? "SELECTED" : ""?><?lsmb e.name ?></option>
  103. <?lsmb END ?>
  104. </select>
  105. <div>
  106. <?lsmb PROCESS input element_data = {
  107. label = text('DOB:')
  108. name = "dob"
  109. value = dob
  110. type = "text"
  111. class = "date"
  112. size = 10
  113. } ?>
  114. <?lsmb PROCESS input element_data = {
  115. label = text('Start Date:')
  116. name = "start_date"
  117. value = start_date
  118. type = "text"
  119. class = "date"
  120. size = 10
  121. } # ' ?>
  122. <?lsmb PROCESS input element_data = {
  123. label = text('End Date:')
  124. name = "end_date"
  125. value = end_date
  126. class = "text"
  127. type = "text"
  128. size = 10
  129. } # ' ?>
  130. <div>
  131. <?lsmb PROCESS button element_data = {
  132. text = text('Save')
  133. class = "submit"
  134. type = "submit"
  135. value = "save_employee"
  136. } ?>
  137. </div>
  138. </form>
  139. <?lsmb ELSE ?>
  140. <div class="container" id="company_div">
  141. <?lsmb SWITCH entity_class
  142. ?><?lsmb CASE 1 ?><?lsmb entity_classname = "Vendor"
  143. ?><?lsmb CASE 2 ?><?lsmb entity_classname = "Customer"
  144. ?><?lsmb END ?>
  145. <div class="listtop"><strong><?lsmb text("$operation $entity_classname") ?></strong></div>
  146. <form name="customer" method="post" action="<?lsmb script ?>">
  147. <?lsmb PROCESS input element_data = {
  148. type = "hidden"
  149. name = "entity_id"
  150. value = entity_id
  151. } ?>
  152. <?lsmb PROCESS input element_data = {
  153. type = "hidden"
  154. name = "id"
  155. value = id
  156. } ?>
  157. <?lsmb PROCESS input element_data = {
  158. type = "hidden"
  159. name = "account_class"
  160. value = account_class
  161. } ?>
  162. <?lsmb PROCESS input element_data = {
  163. label = text('Control Code:') #'
  164. type= "text"
  165. name = "control_code"
  166. value = control_code
  167. size = "20"
  168. } ?>
  169. <?lsmb IF !created_as_class;
  170. created_as_class = entity_class;
  171. END; # IF !created_as_class ?>
  172. <?lsmb PROCESS select element_data = {
  173. name = "created_as_class"
  174. options = entity_classes
  175. default_values = [created_as_class]
  176. text_attr = 'class'
  177. value_attr = 'id'
  178. label = text('Class:')
  179. } ?>
  180. <?lsmb PROCESS button element_data = {
  181. text = text('Generate Control Code')
  182. type = "submit"
  183. name = "action"
  184. value = "generate_control_code"
  185. class = "submit"
  186. } ?><br/>
  187. <?lsmb PROCESS input element_data = {
  188. label = text('Name:')
  189. type= "text"
  190. name = "name"
  191. value = name
  192. size = "20"
  193. } ?><br/>
  194. <table>
  195. <tr>
  196. <td>
  197. <?lsmb INCLUDE input element_data = {
  198. label = text('Tax Number/SSN:'),
  199. name = "tax_id",
  200. value = tax_id,
  201. type = "text",
  202. size = "19"
  203. } #' ?>
  204. </td>
  205. <td>
  206. <?lsmb INCLUDE input element_data = {
  207. label = text('SIC:'),
  208. name = "sic_code",
  209. value = sic_code,
  210. type = "text",
  211. size = "19",
  212. class = 'sic'
  213. } ?>
  214. </td>
  215. </tr>
  216. </table>
  217. <hr/>
  218. <?lsmb INCLUDE button element_data = {
  219. text = text('Save'),
  220. class="submit"
  221. type="submit"
  222. name="action"
  223. value="save"
  224. accesskey="S"
  225. title="Save [Alt-S]"
  226. } ?>
  227. </form>
  228. <?lsmb FOREACH n = notes ?>
  229. <div class="note">
  230. <div class="note_contents"><?lsmb n.note ?></div>
  231. </div>
  232. <?lsmb END ?>
  233. </div>
  234. <?lsmb IF entity_id ?>
  235. <div id="credit_div">
  236. <div class="listtop"><strong>Accounts</strong></div>
  237. <table width="100%">
  238. <tr class="listheading">
  239. <th class="account_class"><?lsmb text('Type') ?></th>
  240. <th class="number"><?lsmb text("Number") ?></th>
  241. <th class="description"><?lsmb text("Description") ?></th>
  242. <th class="credit_limit"><?lsmb text('Credit Limit') ?></th>
  243. <th class="start_date"><?lsmb text('Start Date') ?></th>
  244. <th class="end_date"><?lsmb text('End Date') ?></th>
  245. </tr>
  246. <?lsmb FOREACH cl_item = credit_list ?>
  247. <tr <?lsmb IF meta_number == cl_item.meta_number ?> class="active"<?lsmb END ?>>
  248. <td><?lsmb IF cl_item.entity_class == 1 ?><?lsmb text('Vendor') ?>
  249. <?lsmb ELSIF cl_item.entity_class == 2 ?><?lsmb text('Customer') ?>
  250. <?lsmb END ?>
  251. </td>
  252. <td><a href="<?lsmb script ?>?action=get&account_class=<?lsmb
  253. account_class ?>&entity_id=<?lsmb entity_id
  254. ?>&meta_number=<?lsmb cl_item.meta_number ?>"><?lsmb cl_item.meta_number ?></a></td>
  255. <td><?lsmb cl_item.description ?></td>
  256. <td><?lsmb cl_item.credit_limit ?></td>
  257. <td><?lsmb cl_item.start_date ?></td>
  258. <td><?lsmb cl_item.end_date ?></td>
  259. </tr>
  260. <?lsmb END ?>
  261. </table>
  262. <form id="credit_form" name="credit_form" method="post"
  263. action="<?lsmb script ?>">
  264. <?lsmb PROCESS input element_data = {
  265. type = "hidden"
  266. name = "entity_id"
  267. value = entity_id
  268. } ?>
  269. <?lsmb PROCESS input element_data = {
  270. type = "hidden"
  271. name = "credit_id"
  272. value = credit_id
  273. } ?>
  274. <?lsmb PROCESS input element_data = {
  275. type = "hidden"
  276. name = "account_class"
  277. value = account_class
  278. } ?>
  279. <table>
  280. <tr class="eca_row">
  281. <td>
  282. <?lsmb PROCESS input element_data = {
  283. label = text("$entity_classname Number:"),
  284. type= "text",
  285. name = "meta_number",
  286. value = meta_number,
  287. size = "20"
  288. } # " ?></td>
  289. <td><?lsmb PROCESS input element_data = {
  290. label = text("Description:"),
  291. type= "text",
  292. name = "description",
  293. value = description,
  294. size = "20"
  295. } ?></td>
  296. </tr>
  297. <tr id="date-row">
  298. <td>
  299. <?lsmb PROCESS input element_data = {
  300. label = text('Starting Date:'),
  301. name = "startdate",
  302. class = "date",
  303. value = startdate,
  304. type = "text",
  305. size = "12",
  306. maxlength = "10"
  307. } #' ?>
  308. </td>
  309. <td>
  310. <?lsmb PROCESS input element_data = {
  311. label = text('End Date:'),
  312. name = "enddate",
  313. class = "date",
  314. value = enddate,
  315. type = "text",
  316. size = "12",
  317. maxlength = "10"
  318. } #' ?>
  319. </td>
  320. </tr>
  321. <tr id="credit-row">
  322. <td>
  323. <?lsmb INCLUDE input element_data = {
  324. label = text('Credit Limit:'),
  325. name = "creditlimit",
  326. value = creditlimit,
  327. type = "text",
  328. size = "20"
  329. } #' ?>
  330. </td>
  331. <td><span id="terms-span">
  332. <?lsmb INCLUDE input element_data = {
  333. label = text('Terms:'),
  334. name = "terms",
  335. value = terms,
  336. type = "text",
  337. size = "5"
  338. } ?> <?lsmb text('days') ?></span>
  339. </td>
  340. </tr>
  341. <tr id="discount-gifi-row">
  342. <td>
  343. <?lsmb INCLUDE input element_data = {
  344. label = text('Discount:'),
  345. name = "discount",
  346. value = discount,
  347. type = "text",
  348. size = "3",
  349. maxlength = 3
  350. } ?>% /
  351. <?lsmb INCLUDE input element_data = {
  352. name = "discount_terms",
  353. value = discount_terms,
  354. type = "text",
  355. size = "3",
  356. maxlength = 3
  357. } ?> <?lsmb text('days') ?>
  358. </td>
  359. <td>
  360. <?lsmb INCLUDE input element_data = {
  361. label = text('Subcontract GIFI:'),
  362. name = "gifi_accno",
  363. value = gifi_accno,
  364. type = "text",
  365. size = "19"
  366. } #' ?>
  367. </td>
  368. </tr>
  369. <tr id="account-link-row">
  370. <td> <?lsmb INCLUDE select element_data = {
  371. name = "ar_ap_account_id"
  372. default_values = [ar_ap_account_id]
  373. options = ar_ap_acc_list
  374. label = text((account_class == 1) ? 'AP' : 'AR')
  375. text_attr = "text"
  376. value_attr = "id"
  377. } ?>
  378. </td>
  379. <td> <?lsmb INCLUDE select element_data = {
  380. name = "cash_account_id"
  381. default_values = [cash_account_id]
  382. options = cash_acc_list
  383. label = text('Payment')
  384. text_attr = "text"
  385. value_attr = "id"
  386. } ?>
  387. </td>
  388. </tr>
  389. <tr id="business-threshold-row">
  390. <td> <?lsmb INCLUDE select element_data = {
  391. name = "business_id"
  392. options = business_types
  393. default_values = [business_id]
  394. text_attr = "description"
  395. value_attr = "id"
  396. label = text('Business Type:') #'
  397. } ?>
  398. </td>
  399. <td> <?lsmb INCLUDE input element_data = {
  400. name = "threshold"
  401. value = threshold
  402. type = "text"
  403. size = "20"
  404. label = text('Threshold')
  405. class = "numeric"
  406. } ?>
  407. </tr>
  408. </table>
  409. <?lsmb IF credit_id;
  410. INCLUDE button element_data = {
  411. text = text('Save Changes'),
  412. class="submit"
  413. type="submit"
  414. name="action"
  415. value="save_credit"
  416. accesskey="C"
  417. title="Save Credit Account[Alt-C]"
  418. };
  419. END ?>
  420. <?lsmb INCLUDE button element_data = {
  421. text = text('Save New'),
  422. class="submit"
  423. type="submit"
  424. name="action"
  425. value="save_credit_new"
  426. title="Save Credit Account as New" #'
  427. } ?>
  428. <?lsmb INCLUDE button element_data = {
  429. class="submit"
  430. type="submit"
  431. name="action"
  432. value="add_transaction"
  433. accesskey="A"
  434. title="Transaction [Alt-A]"
  435. text = (entity_class == 1) ? text('AP Transaction') : text('AR Transaction')
  436. } ?>
  437. <?lsmb INCLUDE button element_data = {
  438. class="submit"
  439. type="submit"
  440. name="action"
  441. value="add_invoice"
  442. accesskey="I"
  443. title="Invoice [Alt-I]"
  444. text = (entity_class == 1) ? text('Vendor Invoice') : text('Customer Invoice')
  445. } ?>
  446. <?lsmb INCLUDE button element_data = {
  447. class="submit"
  448. type="submit"
  449. name="action"
  450. value="add_order"
  451. accesskey="O"
  452. title="Order [Alt-O]"
  453. text = (entity_class == 1) ? text('Purchase Order') : text('Sales Order')
  454. } ?>
  455. <?lsmb INCLUDE button element_data = {
  456. class="submit"
  457. type="submit"
  458. name="action"
  459. value="rfq"
  460. accesskey="Q"
  461. title="Quotation [Alt-Q]"
  462. text = (entity_class == 1) ? text('RFQ') : text('Quotation')
  463. } ?>
  464. <?lsmb INCLUDE button element_data = {
  465. class="submit"
  466. type="submit"
  467. name="action"
  468. value="pricelist"
  469. accesskey="P"
  470. title="Pricelist [Alt-P]"
  471. text = text('Pricelist')
  472. } ?>
  473. </form>
  474. </div>
  475. <?lsmb END ?>
  476. <?lsmb END ?>
  477. <?lsmb IF entity_id && credit_id ?>
  478. <div id="location_div" class="container">
  479. <div class="listtop"><?lsmb text('Locations') ?></div>
  480. <!-- This entire form should probably be optionaly automated with AJAX
  481. in order to prevent user confusion -CT -->
  482. <form id="location_form" action="<?lsmb script ?>">
  483. <?lsmb PROCESS input element_data = {
  484. type="hidden"
  485. name="entity_id"
  486. value=entity_id
  487. } ?>
  488. <?lsmb PROCESS input element_data = {
  489. type="hidden"
  490. name="credit_id"
  491. value=credit_id
  492. } ?>
  493. <?lsmb PROCESS input element_data = {
  494. type="hidden"
  495. name="location_id"
  496. value=location_id
  497. } ?>
  498. <table width="100%">
  499. <tr class="listheading">
  500. <th class="type"><?lsmb text('Type') ?></th>
  501. <th class="line_one"><?lsmb text('Address1') ?></th>
  502. <th class="city"><?lsmb text('City') ?></th>
  503. <th class="state"><?lsmb text('State/Province') ?></th>
  504. <th class="mail_code"><?lsmb text('ZIP/Post Code') ?></th>
  505. <th class="country"><?lsmb text('Country') ?></th>
  506. <th class="actions"><?lsmb text('Actions') ?></th>
  507. </tr>
  508. <?lsmb FOREACH loc = locations ?>
  509. <tr <?lsmb IF location_id == loc.id ?> class="active" <?lsmb END ?>>
  510. <td class="type"><?lsmb loc.class ?></td>
  511. <td class="line_one"><?lsmb loc.line_one ?></td>
  512. <td class="city"><?lsmb loc.city ?></td>
  513. <td class="state"><?lsmb loc.state ?></td>
  514. <td class="mail_code"><?lsmb loc.mail_code ?></td>
  515. <td class="country"><?lsmb loc.country ?></td>
  516. <td class="actions">
  517. <!-- TODO: Automate links with AJAX -->
  518. <a href="<?lsmb script ?>?action=edit&entity_id=<?lsmb entity_id
  519. ?>&location_id=<?lsmb loc.id ?>&credit_id=<?lsmb
  520. credit_id ?>">[edit]</a>
  521. <a href="<?lsmb script ?>?action=delete_location&entity_id=<?lsmb
  522. entity_id ?>&location_id=<?lsmb loc.id
  523. ?>&credit_id = <?lsmb credit_id ?>">[delete]</a>
  524. </td>
  525. </tr>
  526. <?lsmb END ?>
  527. </table>
  528. <div> <!-- TODO: Move to elements.html -CT -->
  529. <label for="loc_type"><?lsmb text('Type:') ?></label>
  530. <select id='loc_type' name="location_class">
  531. <?lsmb FOREACH lc = location_class_list ?>
  532. <option value="<?lsmb lc.id ?>"><?lsmb lc.class ?></option>
  533. <?lsmb END ?>
  534. </select>
  535. </div>
  536. <div>
  537. <?lsmb PROCESS input element_data = {
  538. label = text('Address:'),
  539. name = "line_one",
  540. value = line_one,
  541. type = "text",
  542. size = "20"
  543. } ?>
  544. </div>
  545. <div>
  546. <?lsmb PROCESS input element_data = {
  547. name = "line_two"
  548. class = "addl-address"
  549. value = line_two
  550. type = "text"
  551. size = "20"
  552. } ?>
  553. </div>
  554. <div>
  555. <?lsmb PROCESS input element_data = {
  556. name = "line_three"
  557. class = "addl-address"
  558. value = line_three
  559. type = "text"
  560. size = "20"
  561. } ?>
  562. </div>
  563. <div>
  564. <?lsmb PROCESS input element_data = {
  565. label = text('City:'),
  566. name = "city",
  567. value = city,
  568. type = "text",
  569. size = "20"
  570. } ?>
  571. </div>
  572. <div>
  573. <?lsmb PROCESS input element_data = {
  574. label = text('State/Province:'),
  575. name = "state",
  576. value = state,
  577. type = "text",
  578. size = "20"
  579. } ?>
  580. </div>
  581. <div>
  582. <?lsmb PROCESS input element_data = {
  583. label = text('Zip/Post Code:'),
  584. name = "mail_code",
  585. value = mail_code,
  586. type = "text",
  587. size = "20"
  588. } #' ?>
  589. </div>
  590. <div> <!-- TODO: Move to elements.html -CT -->
  591. <?lsmb INCLUDE select element_data = {
  592. text_attr = "name"
  593. value_attr = "id"
  594. default_values = [country]
  595. options = country_list
  596. name = "country_code"
  597. label = text('Country:')
  598. } ?>
  599. </div>
  600. <div><?lsmb PROCESS button element_data = {
  601. class = "submit"
  602. name = "action"
  603. value = "add_location"
  604. id = "loc_save_location"
  605. text = text('Save Location')
  606. } #' ?>
  607. </div>
  608. </form>
  609. </div>
  610. <div class="container" id="contact_div">
  611. <div class="listtop"><?lsmb text('Contact Information') ?></div>
  612. <table width="100%">
  613. <tr class="listheading">
  614. <th class="contact_class"><?lsmb text('Type:') ?></th>
  615. <th class="description"><?lsmb text('Description:') ?></th>
  616. <th class="contact"><?lsmb text('Contact Info:') ?></th>
  617. <th class="contact_actions"><?lsmb text('Actions:') ?></th>
  618. </tr>
  619. <?lsmb FOREACH ct = contacts ?>
  620. <tr>
  621. <td class="contact_class"><?lsmb ct.class ?></td>
  622. <td class="description"><?lsmb ct.description ?></td>
  623. <td class="contact"><?lsmb ct.contact ?></td>
  624. <td class="contact_actions">
  625. <a href="<?lsmb tt_url(script)
  626. ?>?entity_id=<?lsmb tt_url(entity_id)
  627. ?>&contact=<?lsmb tt_url(ct.contact)
  628. ?>&contact_class=<?lsmb tt_url(ct.class_id)
  629. ?>&description=<?lsmb tt_url(ct.description)
  630. ?>&action=edit&credit_id=<?lsmb
  631. tt_url(credit_id) ?>"
  632. >[<?lsmb text('Edit'); ?>]</a>&nbsp;&nbsp;
  633. <a href="<?lsmb tt_url(script)
  634. ?>?entity_id=<?lsmb tt_url(entity_id)
  635. ?>&contact_id=<?lsmb tt_url(ct.id)
  636. ?>&action=delete_contact&credit_id=<?lsmb
  637. tt_url(credit_id) ?>"
  638. >[<?lsmb text('Delete'); ?>]</a>
  639. </td>
  640. </tr>
  641. <?lsmb END ?>
  642. </table>
  643. <form action="<?lsmb script ?>">
  644. <?lsmb PROCESS input element_data = {
  645. type="hidden"
  646. name="entity_id"
  647. value=entity_id
  648. } ?>
  649. <?lsmb PROCESS input element_data = {
  650. type="hidden"
  651. name="credit_id"
  652. value=credit_id
  653. } ?>
  654. <?lsmb PROCESS input element_data = {
  655. type="hidden"
  656. name="old_contact_class"
  657. value=contact_class
  658. } ?>
  659. <?lsmb PROCESS input element_data = {
  660. type="hidden"
  661. name="old_contact"
  662. value=contact
  663. } ?>
  664. <?lsmb PROCESS input element_data = {
  665. type="hidden"
  666. name="contact_id"
  667. value=contact_id
  668. } ?>
  669. <div>
  670. <?lsmb PROCESS select element_data = {
  671. name = "contact_class"
  672. label = "Type"
  673. text_attr = "class"
  674. value_attr = "id"
  675. default_values = [contact_class]
  676. options = contact_class_list
  677. } ?>
  678. </div>
  679. <div>
  680. <?lsmb PROCESS input element_data = {
  681. label = text('Description:'),
  682. name = "description"
  683. value = description
  684. type = "text"
  685. size = "20"
  686. } #' ?>
  687. </div>
  688. <div>
  689. <?lsmb PROCESS input element_data = {
  690. label = text('Contact Info:'),
  691. name = "contact"
  692. value = contact
  693. type = "text"
  694. size = "20"
  695. } #' ?>
  696. </div>
  697. <div><?lsmb PROCESS button element_data = {
  698. name = "action",
  699. value = "save_contact",
  700. text = text('Save Contact'),
  701. class = "submit"
  702. } #' ?>
  703. <?lsmb IF contact.defined ?>
  704. <?lsmb PROCESS button element_data = {
  705. name = "action",
  706. value = "save_contact_new",
  707. text = text('Save As New'),
  708. class = "submit"
  709. } #' ?>
  710. <?lsmb END # IF old_contact.defined ?>
  711. </div>
  712. </form>
  713. </div>
  714. <div class="container" id="bank_div">
  715. <div class="listtop"><?lsmb text('Bank Accounts') ?></div>
  716. <table width="100%">
  717. <tr class="listheading">
  718. <th class="bic"><?lsmb text('BIC/SWIFT Code') ?></th>
  719. <th class="iban"><?lsmb text('Account Number') ?></th>
  720. <th class="actions"><?lsmb text('Actions') ?></th>
  721. </tr>
  722. <?lsmb FOREACH ba = bank_account ?>
  723. <tr>
  724. <td class="bic"><?lsmb ba.bic ?></td>
  725. <td class="iban"><?lsmb ba.iban ?></td>
  726. <td class="actions">
  727. <a href="<?lsmb script ?>?action=edit_bank_acct&entity_id=<?lsmb
  728. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  729. >[Edit]</a>
  730. <a href="<?lsmb script ?>?action=delete_bank_acct&entity_id=<?lsmb
  731. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  732. >[Delete]</a>
  733. </td>
  734. </tr>
  735. <?lsmb END ?>
  736. </table>
  737. <form name="bank_acct" action="<?lsmb script ?>">
  738. <?lsmb PROCESS input element_data = {
  739. type="hidden"
  740. name="entity_id"
  741. value=entity_id
  742. } ?>
  743. <?lsmb PROCESS input element_data = {
  744. type="hidden"
  745. name="credit_id"
  746. value=credit_id
  747. } ?>
  748. <?lsmb PROCESS input element_data = {
  749. type="hidden"
  750. name="bank_account_id"
  751. value=bank_account_id
  752. } ?>
  753. <div><label for="bic">
  754. <?lsmb INCLUDE input element_data = {
  755. type="text"
  756. label = text('BIC/SWIFT Code:')
  757. name="bic"
  758. value=bic
  759. size=20
  760. } #' ?>
  761. </div>
  762. <div><label for="iban">
  763. <?lsmb PROCESS input element_data = {
  764. type="text"
  765. label = text('Bank Account:')
  766. name="iban"
  767. value=iban
  768. size=20
  769. } #' ?>
  770. </div>
  771. <div><?lsmb PROCESS button element_data = {
  772. name="action"
  773. value="save_bank_account"
  774. class="submit"
  775. text = text('Save')
  776. } ?>
  777. </div>
  778. </form>
  779. </div>
  780. <div id="notes_div">
  781. <div class="listtop"><?lsmb text('Notes') ?></div>
  782. <form action="<?lsmb script ?>" method="post">
  783. <?lsmb PROCESS input element_data = {
  784. type="hidden"
  785. name="entity_id"
  786. value=entity_id
  787. } ?>
  788. <?lsmb PROCESS input element_data = {
  789. type="hidden"
  790. name="credit_id"
  791. value=credit_id
  792. } ?>
  793. <?lsmb IF credit_id -?>
  794. <div class="input"><?lsmb PROCESS select element_data = {
  795. name = "note_class"
  796. default_values = [note_class]
  797. options = note_class_options
  798. label = text("Note Class") #"
  799. text_attr = "label"
  800. value_attr = "value"
  801. } ?>
  802. </div>
  803. <?lsmb END # IF credit_id -?>
  804. <div class="input"><?lsmb PROCESS textarea element_data = {
  805. label = text('Notes:<br />')
  806. name = 'note'
  807. } ?></div>
  808. <div class="input">
  809. <?lsmb PROCESS button element_data = {
  810. text = text('Save')
  811. class = 'submit'
  812. name = 'action'
  813. value = 'save_notes'
  814. } ?>
  815. </form>
  816. <?lsmb FOREACH n = notes ?>
  817. <div class="note">
  818. <div class="timestamp"><?lsmb text('Entered at: [_1]', n.created) ?></div>
  819. <div class="author"><?lsmb text("Author: [_1]", n.created_by) ?></div>
  820. <div class="note_contents"><?lsmb n.note ?></div>
  821. </div>
  822. <?lsmb END ?>
  823. </div>
  824. <?lsmb END ?>
  825. </body>
  826. </html>