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