summaryrefslogtreecommitdiff
path: root/UI/Contact/contact.html
blob: c061ac52c855211d7e0d2bce773ff5b697df4fe1 (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. } ?><?lsmb PROCESS button element_data = {
  169. text = text('Generate')
  170. type = "submit"
  171. name = "action"
  172. value = "generate_control_code"
  173. class = "submit"
  174. } ?><br/>
  175. <?lsmb PROCESS input element_data = {
  176. label = text('Name:')
  177. type= "text"
  178. name = "name"
  179. value = name
  180. size = "20"
  181. } ?><br/>
  182. <table>
  183. <tr>
  184. <td>
  185. <?lsmb INCLUDE input element_data = {
  186. label = text('Tax Number/SSN:'),
  187. name = "tax_id",
  188. value = tax_id,
  189. type = "text",
  190. size = "19"
  191. } #' ?>
  192. </td>
  193. <td>
  194. <?lsmb INCLUDE input element_data = {
  195. label = text('SIC:'),
  196. name = "sic_code",
  197. value = sic_code,
  198. type = "text",
  199. size = "19",
  200. class = 'sic'
  201. } ?>
  202. </td>
  203. </tr>
  204. </table>
  205. <hr/>
  206. <?lsmb INCLUDE button element_data = {
  207. text = text('Save'),
  208. class="submit"
  209. type="submit"
  210. name="action"
  211. value="save"
  212. accesskey="S"
  213. title="Save [Alt-S]"
  214. } ?>
  215. </form>
  216. <?lsmb FOREACH n = notes ?>
  217. <div class="note">
  218. <div class="note_contents"><?lsmb n.note ?></div>
  219. </div>
  220. <?lsmb END ?>
  221. </div>
  222. <?lsmb IF entity_id ?>
  223. <div id="credit_div">
  224. <div class="listtop"><strong>Accounts</strong></div>
  225. <table width="100%">
  226. <tr class="listheading">
  227. <th class="account_class"><?lsmb text('Type') ?></th>
  228. <th class="number"><?lsmb text("Number") ?></th>
  229. <th class="credit_limit"><?lsmb text('Credit Limit') ?></th>
  230. <th class="start_date"><?lsmb text('Start Date') ?></th>
  231. <th class="end_date"><?lsmb text('End Date') ?></th>
  232. </tr>
  233. <?lsmb FOREACH cl_item = credit_list ?>
  234. <tr <?lsmb IF meta_number == cl_item.meta_number ?> class="active"<?lsmb END ?>>
  235. <td><?lsmb IF cl_item.entity_class == 1 ?><?lsmb text('Vendor') ?>
  236. <?lsmb ELSIF cl_item.entity_class == 2 ?><?lsmb text('Customer') ?>
  237. <?lsmb END ?>
  238. </td>
  239. <td><a href="<?lsmb script ?>?action=get&account_class=<?lsmb
  240. account_class ?>&entity_id=<?lsmb entity_id
  241. ?>&meta_number=<?lsmb cl_item.meta_number ?>"><?lsmb cl_item.meta_number ?></a></td>
  242. <td><?lsmb cl_item.credit_limit ?></td>
  243. <td><?lsmb cl_item.start_date ?></td>
  244. <td><?lsmb cl_item.end_date ?></td>
  245. </tr>
  246. <?lsmb END ?>
  247. </table>
  248. <form id="credit_form" name="credit_form" method="post"
  249. action="<?lsmb script ?>">
  250. <?lsmb PROCESS input element_data = {
  251. type = "hidden"
  252. name = "entity_id"
  253. value = entity_id
  254. } ?>
  255. <?lsmb PROCESS input element_data = {
  256. type = "hidden"
  257. name = "credit_id"
  258. value = credit_id
  259. } ?>
  260. <?lsmb PROCESS input element_data = {
  261. type = "hidden"
  262. name = "account_class"
  263. value = account_class
  264. } ?>
  265. <?lsmb PROCESS input element_data = {
  266. label = text("$entity_classname Number:"),
  267. type= "text",
  268. name = "meta_number",
  269. value = meta_number,
  270. size = "20"
  271. } # " ?><br/>
  272. <table>
  273. <tr id="date-row">
  274. <td>
  275. <?lsmb PROCESS input element_data = {
  276. label = text('Starting Date:'),
  277. name = "startdate",
  278. class = "date",
  279. value = startdate,
  280. type = "text",
  281. size = "12",
  282. maxlength = "10"
  283. } #' ?>
  284. </td>
  285. <td>
  286. <?lsmb PROCESS input element_data = {
  287. label = text('End Date:'),
  288. name = "enddate",
  289. class = "date",
  290. value = enddate,
  291. type = "text",
  292. size = "12",
  293. maxlength = "10"
  294. } #' ?>
  295. </td>
  296. </tr>
  297. <tr id="credit-row">
  298. <td>
  299. <?lsmb INCLUDE input element_data = {
  300. label = text('Credit Limit:'),
  301. name = "creditlimit",
  302. value = creditlimit,
  303. type = "text",
  304. size = "20"
  305. } #' ?>
  306. </td>
  307. <td><span id="terms-span">
  308. <?lsmb INCLUDE input element_data = {
  309. label = text('Terms:'),
  310. name = "terms",
  311. value = terms,
  312. type = "text",
  313. size = "5"
  314. } ?> <?lsmb text('days') ?></span>
  315. </td>
  316. </tr>
  317. <tr id="discount-gifi-row">
  318. <td>
  319. <?lsmb INCLUDE input element_data = {
  320. label = text('Discount:'),
  321. name = "discount",
  322. value = discount,
  323. type = "text",
  324. size = "3",
  325. maxlength = 3
  326. } ?>% /
  327. <?lsmb INCLUDE input element_data = {
  328. name = "discount_terms",
  329. value = discount_terms,
  330. type = "text",
  331. size = "3",
  332. maxlength = 3
  333. } ?> <?lsmb text('days') ?>
  334. </td>
  335. <td>
  336. <?lsmb INCLUDE input element_data = {
  337. label = text('Subcontract GIFI:'),
  338. name = "gifi_accno",
  339. value = gifi_accno,
  340. type = "text",
  341. size = "19"
  342. } #' ?>
  343. </td>
  344. </tr>
  345. <tr id="account-link-row">
  346. <td> <?lsmb INCLUDE select element_data = {
  347. name = "ar_ap_account_id"
  348. default_values = [ar_ap_account_id]
  349. options = ar_ap_acc_list
  350. label = text((account_class == 1) ? 'AP' : 'AR')
  351. text_attr = "text"
  352. value_attr = "id"
  353. } ?>
  354. </td>
  355. <td> <?lsmb INCLUDE select element_data = {
  356. name = "cash_account_id"
  357. default_values = [cash_account_id]
  358. options = cash_acc_list
  359. label = text('Payment')
  360. text_attr = "text"
  361. value_attr = "id"
  362. } ?>
  363. </td>
  364. </tr>
  365. <tr id="business-threshold-row">
  366. <td> <?lsmb INCLUDE select element_data = {
  367. name = "business_id"
  368. options = business_types
  369. default_values = [business_id]
  370. text_attr = "description"
  371. value_attr = "id"
  372. label = text('Business Type:') #'
  373. } ?>
  374. </td>
  375. <td> <?lsmb INCLUDE input element_data = {
  376. name = "threshold"
  377. value = threshold
  378. type = "text"
  379. size = "20"
  380. label = text('Threshold')
  381. class = "numeric"
  382. } ?>
  383. </tr>
  384. </table>
  385. <?lsmb IF credit_id;
  386. INCLUDE button element_data = {
  387. text = text('Save Changes'),
  388. class="submit"
  389. type="submit"
  390. name="action"
  391. value="save_credit"
  392. accesskey="C"
  393. title="Save Credit Account[Alt-C]"
  394. };
  395. END ?>
  396. <?lsmb INCLUDE button element_data = {
  397. text = text('Save New'),
  398. class="submit"
  399. type="submit"
  400. name="action"
  401. value="save_credit_new"
  402. title="Save Credit Account as New" #'
  403. } ?>
  404. <?lsmb INCLUDE button element_data = {
  405. class="submit"
  406. type="submit"
  407. name="action"
  408. value="add_transaction"
  409. accesskey="A"
  410. title="Transaction [Alt-A]"
  411. text = (entity_class == 1) ? text('AP Transaction') : text('AR Transaction')
  412. } ?>
  413. <?lsmb INCLUDE button element_data = {
  414. class="submit"
  415. type="submit"
  416. name="action"
  417. value="add_invoice"
  418. accesskey="I"
  419. title="Invoice [Alt-I]"
  420. text = (entity_class == 1) ? text('Vendor Invoice') : text('Customer Invoice')
  421. } ?>
  422. <?lsmb INCLUDE button element_data = {
  423. class="submit"
  424. type="submit"
  425. name="action"
  426. value="add_order"
  427. accesskey="O"
  428. title="Order [Alt-O]"
  429. text = (entity_class == 1) ? text('Purchase Order') : text('Sales Order')
  430. } ?>
  431. <?lsmb INCLUDE button element_data = {
  432. class="submit"
  433. type="submit"
  434. name="action"
  435. value="rfq"
  436. accesskey="Q"
  437. title="Quotation [Alt-Q]"
  438. text = (entity_class == 1) ? text('RFQ') : text('Quotation')
  439. } ?>
  440. <?lsmb INCLUDE button element_data = {
  441. class="submit"
  442. type="submit"
  443. name="action"
  444. value="pricelist"
  445. accesskey="P"
  446. title="Pricelist [Alt-P]"
  447. text = text('Pricelist')
  448. } ?>
  449. </form>
  450. </div>
  451. <?lsmb END ?>
  452. <?lsmb END ?>
  453. <?lsmb IF entity_id && credit_id ?>
  454. <div id="location_div" class="container">
  455. <div class="listtop"><?lsmb text('Locations') ?></div>
  456. <!-- This entire form should probably be optionaly automated with AJAX
  457. in order to prevent user confusion -CT -->
  458. <form id="location_form" action="<?lsmb script ?>">
  459. <?lsmb PROCESS input element_data = {
  460. type="hidden"
  461. name="entity_id"
  462. value=entity_id
  463. } ?>
  464. <?lsmb PROCESS input element_data = {
  465. type="hidden"
  466. name="credit_id"
  467. value=credit_id
  468. } ?>
  469. <?lsmb PROCESS input element_data = {
  470. type="hidden"
  471. name="location_id"
  472. value=location_id
  473. } ?>
  474. <table width="100%">
  475. <tr class="listheading">
  476. <th class="type"><?lsmb text('Type') ?></th>
  477. <th class="line_one"><?lsmb text('Address1') ?></th>
  478. <th class="city"><?lsmb text('City') ?></th>
  479. <th class="state"><?lsmb text('State/Province') ?></th>
  480. <th class="mail_code"><?lsmb text('ZIP/Post Code') ?></th>
  481. <th class="country"><?lsmb text('Country') ?></th>
  482. <th class="actions"><?lsmb text('Actions') ?></th>
  483. </tr>
  484. <?lsmb FOREACH loc = locations ?>
  485. <tr <?lsmb IF location_id == loc.id ?> class="active" <?lsmb END ?>>
  486. <td class="type"><?lsmb loc.class ?></td>
  487. <td class="line_one"><?lsmb loc.line_one ?></td>
  488. <td class="city"><?lsmb loc.city ?></td>
  489. <td class="state"><?lsmb loc.state ?></td>
  490. <td class="mail_code"><?lsmb loc.mail_code ?></td>
  491. <td class="country"><?lsmb loc.country ?></td>
  492. <td class="actions">
  493. <!-- TODO: Automate links with AJAX -->
  494. <a href="<?lsmb script ?>?action=edit&entity_id=<?lsmb entity_id
  495. ?>&location_id=<?lsmb loc.id ?>&credit_id=<?lsmb
  496. credit_id ?>">[edit]</a>
  497. <a href="<?lsmb script ?>?action=delete_location&entity_id=<?lsmb
  498. entity_id ?>&location_id=<?lsmb loc.id
  499. ?>&credit_id = <?lsmb credit_id ?>">[delete]</a>
  500. </td>
  501. </tr>
  502. <?lsmb END ?>
  503. </table>
  504. <div> <!-- TODO: Move to elements.html -CT -->
  505. <label for="loc_type"><?lsmb text('Type:') ?></label>
  506. <select id='loc_type' name="location_class">
  507. <?lsmb FOREACH lc = location_class_list ?>
  508. <option value="<?lsmb lc.id ?>"><?lsmb lc.class ?></option>
  509. <?lsmb END ?>
  510. </select>
  511. </div>
  512. <div>
  513. <?lsmb PROCESS input element_data = {
  514. label = text('Address:'),
  515. name = "line_one",
  516. value = line_one,
  517. type = "text",
  518. size = "20"
  519. } ?>
  520. </div>
  521. <div>
  522. <?lsmb PROCESS input element_data = {
  523. name = "line_two"
  524. class = "addl-address"
  525. value = line_two
  526. type = "text"
  527. size = "20"
  528. } ?>
  529. </div>
  530. <div>
  531. <?lsmb PROCESS input element_data = {
  532. name = "line_three"
  533. class = "addl-address"
  534. value = line_three
  535. type = "text"
  536. size = "20"
  537. } ?>
  538. </div>
  539. <div>
  540. <?lsmb PROCESS input element_data = {
  541. label = text('City:'),
  542. name = "city",
  543. value = city,
  544. type = "text",
  545. size = "20"
  546. } ?>
  547. </div>
  548. <div>
  549. <?lsmb PROCESS input element_data = {
  550. label = text('State/Province:'),
  551. name = "state",
  552. value = state,
  553. type = "text",
  554. size = "20"
  555. } ?>
  556. </div>
  557. <div>
  558. <?lsmb PROCESS input element_data = {
  559. label = text('Zip/Post Code:'),
  560. name = "mail_code",
  561. value = mail_code,
  562. type = "text",
  563. size = "20"
  564. } #' ?>
  565. </div>
  566. <div> <!-- TODO: Move to elements.html -CT -->
  567. <?lsmb INCLUDE select element_data = {
  568. text_attr = "name"
  569. value_attr = "id"
  570. default_values = [country]
  571. options = country_list
  572. name = "country_code"
  573. label = text('Country:')
  574. } ?>
  575. </div>
  576. <div><?lsmb PROCESS button element_data = {
  577. class = "submit"
  578. name = "action"
  579. value = "add_location"
  580. id = "loc_save_location"
  581. text = text('Save Location')
  582. } #' ?>
  583. </div>
  584. </form>
  585. </div>
  586. <div class="container" id="contact_div">
  587. <div class="listtop"><?lsmb text('Contact Information') ?></div>
  588. <table width="100%">
  589. <tr class="listheading">
  590. <th class="contact_class"><?lsmb text('Type:') ?></th>
  591. <th class="contact"><?lsmb text('Contact Info:') ?></th>
  592. <th class="contact_actions"><?lsmb text('Actions:') ?></th>
  593. </tr>
  594. <?lsmb FOREACH ct = contacts ?>
  595. <tr>
  596. <td class="contact_class"><?lsmb ct.class ?></td>
  597. <td class="contact"><?lsmb ct.contact ?></td>
  598. <td class="contact_actions">
  599. <a href="<?lsmb tt_url(script)
  600. ?>?entity_id=<?lsmb tt_url(entity_id)
  601. ?>&contact=<?lsmb tt_url(ct.contact)
  602. ?>&contact_class=<?lsmb tt_url(ct.class_id)
  603. ?>&description=<?lsmb tt_url(ct.description)
  604. ?>&action=edit&credit_id=<?lsmb
  605. tt_url(credit_id) ?>"
  606. >[<?lsmb text('Edit'); ?>]</a>&nbsp;&nbsp;
  607. <a href="<?lsmb tt_url(script)
  608. ?>?entity_id=<?lsmb tt_url(entity_id)
  609. ?>&contact_id=<?lsmb tt_url(ct.id)
  610. ?>&action=delete_contact&credit_id=<?lsmb
  611. tt_url(credit_id) ?>"
  612. >[<?lsmb text('Delete'); ?>]</a>
  613. </td>
  614. </tr>
  615. <?lsmb END ?>
  616. </table>
  617. <form action="<?lsmb script ?>">
  618. <?lsmb PROCESS input element_data = {
  619. type="hidden"
  620. name="entity_id"
  621. value=entity_id
  622. } ?>
  623. <?lsmb PROCESS input element_data = {
  624. type="hidden"
  625. name="credit_id"
  626. value=credit_id
  627. } ?>
  628. <?lsmb PROCESS input element_data = {
  629. type="hidden"
  630. name="old_contact_class"
  631. value=contact_class
  632. } ?>
  633. <?lsmb PROCESS input element_data = {
  634. type="hidden"
  635. name="old_contact"
  636. value=contact
  637. } ?>
  638. <?lsmb PROCESS input element_data = {
  639. type="hidden"
  640. name="contact_id"
  641. value=contact_id
  642. } ?>
  643. <div>
  644. <?lsmb PROCESS select element_data = {
  645. name = "contact_class"
  646. label = "Type"
  647. text_attr = "class"
  648. value_attr = "id"
  649. default_values = [contact_class]
  650. options = contact_class_list
  651. } ?>
  652. </div>
  653. <div>
  654. <?lsmb PROCESS input element_data = {
  655. label = text('Description:'),
  656. name = "description"
  657. value = description
  658. type = "text"
  659. size = "20"
  660. } #' ?>
  661. </div>
  662. <div>
  663. <?lsmb PROCESS input element_data = {
  664. label = text('Contact Info:'),
  665. name = "contact"
  666. value = contact
  667. type = "text"
  668. size = "20"
  669. } #' ?>
  670. </div>
  671. <div><?lsmb PROCESS button element_data = {
  672. name = "action",
  673. value = "save_contact",
  674. text = text('Save Contact'),
  675. class = "submit"
  676. } #' ?>
  677. <?lsmb IF contact.defined ?>
  678. <?lsmb PROCESS button element_data = {
  679. name = "action",
  680. value = "save_contact_new",
  681. text = text('Save As New'),
  682. class = "submit"
  683. } #' ?>
  684. <?lsmb END # IF old_contact.defined ?>
  685. </div>
  686. </form>
  687. </div>
  688. <div class="container" id="bank_div">
  689. <div class="listtop"><?lsmb text('Bank Accounts') ?></div>
  690. <table width="100%">
  691. <tr class="listheading">
  692. <th class="bic"><?lsmb text('BIC/SWIFT Code') ?></th>
  693. <th class="iban"><?lsmb text('Account Number') ?></th>
  694. <th class="actions"><?lsmb text('Actions') ?></th>
  695. </tr>
  696. <?lsmb FOREACH ba = bank_account ?>
  697. <tr>
  698. <td class="bic"><?lsmb ba.bic ?></td>
  699. <td class="iban"><?lsmb ba.iban ?></td>
  700. <td class="actions">
  701. <a href="<?lsmb script ?>?action=edit_bank_acct&entity_id=<?lsmb
  702. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  703. >[Edit]</a>
  704. <a href="<?lsmb script ?>?action=delete_bank_acct&entity_id=<?lsmb
  705. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  706. >[Delete]</a>
  707. </td>
  708. </tr>
  709. <?lsmb END ?>
  710. </table>
  711. <form name="bank_acct" action="<?lsmb script ?>">
  712. <?lsmb PROCESS input element_data = {
  713. type="hidden"
  714. name="entity_id"
  715. value=entity_id
  716. } ?>
  717. <?lsmb PROCESS input element_data = {
  718. type="hidden"
  719. name="credit_id"
  720. value=credit_id
  721. } ?>
  722. <?lsmb PROCESS input element_data = {
  723. type="hidden"
  724. name="bank_account_id"
  725. value=bank_account_id
  726. } ?>
  727. <div><label for="bic">
  728. <?lsmb INCLUDE input element_data = {
  729. type="text"
  730. label = text('BIC/SWIFT Code:')
  731. name="bic"
  732. value=bic
  733. size=20
  734. } #' ?>
  735. </div>
  736. <div><label for="iban">
  737. <?lsmb PROCESS input element_data = {
  738. type="text"
  739. label = text('Bank Account:')
  740. name="iban"
  741. value=iban
  742. size=20
  743. } #' ?>
  744. </div>
  745. <div><?lsmb PROCESS button element_data = {
  746. name="action"
  747. value="save_bank_account"
  748. class="submit"
  749. text = text('Save')
  750. } ?>
  751. </div>
  752. </form>
  753. </div>
  754. <div id="notes_div">
  755. <div class="listtop"><?lsmb text('Notes') ?></div>
  756. <form action="<?lsmb script ?>" method="post">
  757. <?lsmb PROCESS input element_data = {
  758. type="hidden"
  759. name="entity_id"
  760. value=entity_id
  761. } ?>
  762. <?lsmb PROCESS input element_data = {
  763. type="hidden"
  764. name="credit_id"
  765. value=credit_id
  766. } ?>
  767. <?lsmb IF credit_id -?>
  768. <div class="input"><?lsmb PROCESS select element_data = {
  769. name = "note_class"
  770. default_values = [note_class]
  771. options = note_class_options
  772. label = text("Note Class") #"
  773. text_attr = "label"
  774. value_attr = "value"
  775. } ?>
  776. </div>
  777. <?lsmb END # IF credit_id -?>
  778. <div class="input"><?lsmb PROCESS textarea element_data = {
  779. label = text('Notes:<br />')
  780. name = 'note'
  781. } ?></div>
  782. <div class="input">
  783. <?lsmb PROCESS button element_data = {
  784. text = text('Save')
  785. class = 'submit'
  786. name = 'action'
  787. value = 'save_notes'
  788. } ?>
  789. </form>
  790. <?lsmb FOREACH n = notes ?>
  791. <div class="note">
  792. <div class="timestamp"><?lsmb text('Entered at: [_1]', n.created) ?></div>
  793. <div class="author"><?lsmb text("Author: [_1]", n.created_by) ?></div>
  794. <div class="note_contents"><?lsmb n.note ?></div>
  795. </div>
  796. <?lsmb END ?>
  797. </div>
  798. <?lsmb END ?>
  799. </body>
  800. </html>