summaryrefslogtreecommitdiff
path: root/UI/Contact/contact.html
blob: 0c0bb43cc6a92046d6cf8dddada5409d99c63bd2 (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 IF !country; country = default_country; END -?>
  592. <?lsmb INCLUDE select element_data = {
  593. text_attr = "name"
  594. value_attr = "id"
  595. default_values = [country]
  596. options = country_list
  597. name = "country_code"
  598. label = text('Country:')
  599. } ?>
  600. </div>
  601. <div><?lsmb PROCESS button element_data = {
  602. class = "submit"
  603. name = "action"
  604. value = "add_location"
  605. id = "loc_save_location"
  606. text = text('Save Location')
  607. } #' ?>
  608. </div>
  609. </form>
  610. </div>
  611. <div class="container" id="contact_div">
  612. <div class="listtop"><?lsmb text('Contact Information') ?></div>
  613. <table width="100%">
  614. <tr class="listheading">
  615. <th class="contact_class"><?lsmb text('Type:') ?></th>
  616. <th class="description"><?lsmb text('Description:') ?></th>
  617. <th class="contact"><?lsmb text('Contact Info:') ?></th>
  618. <th class="contact_actions"><?lsmb text('Actions:') ?></th>
  619. </tr>
  620. <?lsmb FOREACH ct = contacts ?>
  621. <tr>
  622. <td class="contact_class"><?lsmb ct.class ?></td>
  623. <td class="description"><?lsmb ct.description ?></td>
  624. <td class="contact"><?lsmb ct.contact ?></td>
  625. <td class="contact_actions">
  626. <a href="<?lsmb tt_url(script)
  627. ?>?entity_id=<?lsmb tt_url(entity_id)
  628. ?>&contact=<?lsmb tt_url(ct.contact)
  629. ?>&contact_class=<?lsmb tt_url(ct.class_id)
  630. ?>&description=<?lsmb tt_url(ct.description)
  631. ?>&action=edit&credit_id=<?lsmb
  632. tt_url(credit_id) ?>"
  633. >[<?lsmb text('Edit'); ?>]</a>&nbsp;&nbsp;
  634. <a href="<?lsmb tt_url(script)
  635. ?>?entity_id=<?lsmb tt_url(entity_id)
  636. ?>&contact_id=<?lsmb tt_url(ct.id)
  637. ?>&action=delete_contact&credit_id=<?lsmb
  638. tt_url(credit_id) ?>"
  639. >[<?lsmb text('Delete'); ?>]</a>
  640. </td>
  641. </tr>
  642. <?lsmb END ?>
  643. </table>
  644. <form action="<?lsmb script ?>">
  645. <?lsmb PROCESS input element_data = {
  646. type="hidden"
  647. name="entity_id"
  648. value=entity_id
  649. } ?>
  650. <?lsmb PROCESS input element_data = {
  651. type="hidden"
  652. name="credit_id"
  653. value=credit_id
  654. } ?>
  655. <?lsmb PROCESS input element_data = {
  656. type="hidden"
  657. name="old_contact_class"
  658. value=contact_class
  659. } ?>
  660. <?lsmb PROCESS input element_data = {
  661. type="hidden"
  662. name="old_contact"
  663. value=contact
  664. } ?>
  665. <?lsmb PROCESS input element_data = {
  666. type="hidden"
  667. name="contact_id"
  668. value=contact_id
  669. } ?>
  670. <div>
  671. <?lsmb PROCESS select element_data = {
  672. name = "contact_class"
  673. label = "Type"
  674. text_attr = "class"
  675. value_attr = "id"
  676. default_values = [contact_class]
  677. options = contact_class_list
  678. } ?>
  679. </div>
  680. <div>
  681. <?lsmb PROCESS input element_data = {
  682. label = text('Description:'),
  683. name = "description"
  684. value = description
  685. type = "text"
  686. size = "20"
  687. } #' ?>
  688. </div>
  689. <div>
  690. <?lsmb PROCESS input element_data = {
  691. label = text('Contact Info:'),
  692. name = "contact"
  693. value = contact
  694. type = "text"
  695. size = "20"
  696. } #' ?>
  697. </div>
  698. <div><?lsmb PROCESS button element_data = {
  699. name = "action",
  700. value = "save_contact",
  701. text = text('Save Contact'),
  702. class = "submit"
  703. } #' ?>
  704. <?lsmb IF contact.defined ?>
  705. <?lsmb PROCESS button element_data = {
  706. name = "action",
  707. value = "save_contact_new",
  708. text = text('Save As New'),
  709. class = "submit"
  710. } #' ?>
  711. <?lsmb END # IF old_contact.defined ?>
  712. </div>
  713. </form>
  714. </div>
  715. <div class="container" id="bank_div">
  716. <div class="listtop"><?lsmb text('Bank Accounts') ?></div>
  717. <table width="100%">
  718. <tr class="listheading">
  719. <th class="bic"><?lsmb text('BIC/SWIFT Code') ?></th>
  720. <th class="iban"><?lsmb text('Account Number') ?></th>
  721. <th class="actions"><?lsmb text('Actions') ?></th>
  722. </tr>
  723. <?lsmb FOREACH ba = bank_account ?>
  724. <tr>
  725. <td class="bic"><?lsmb ba.bic ?></td>
  726. <td class="iban"><?lsmb ba.iban ?></td>
  727. <td class="actions">
  728. <a href="<?lsmb script ?>?action=edit_bank_acct&entity_id=<?lsmb
  729. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  730. >[Edit]</a>
  731. <a href="<?lsmb script ?>?action=delete_bank_acct&entity_id=<?lsmb
  732. entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
  733. >[Delete]</a>
  734. </td>
  735. </tr>
  736. <?lsmb END ?>
  737. </table>
  738. <form name="bank_acct" action="<?lsmb script ?>">
  739. <?lsmb PROCESS input element_data = {
  740. type="hidden"
  741. name="entity_id"
  742. value=entity_id
  743. } ?>
  744. <?lsmb PROCESS input element_data = {
  745. type="hidden"
  746. name="credit_id"
  747. value=credit_id
  748. } ?>
  749. <?lsmb PROCESS input element_data = {
  750. type="hidden"
  751. name="bank_account_id"
  752. value=bank_account_id
  753. } ?>
  754. <div><label for="bic">
  755. <?lsmb INCLUDE input element_data = {
  756. type="text"
  757. label = text('BIC/SWIFT Code:')
  758. name="bic"
  759. value=bic
  760. size=20
  761. } #' ?>
  762. </div>
  763. <div><label for="iban">
  764. <?lsmb PROCESS input element_data = {
  765. type="text"
  766. label = text('Bank Account:')
  767. name="iban"
  768. value=iban
  769. size=20
  770. } #' ?>
  771. </div>
  772. <div><?lsmb PROCESS button element_data = {
  773. name="action"
  774. value="save_bank_account"
  775. class="submit"
  776. text = text('Save')
  777. } ?>
  778. </div>
  779. </form>
  780. </div>
  781. <div id="notes_div">
  782. <div class="listtop"><?lsmb text('Notes') ?></div>
  783. <form action="<?lsmb script ?>" method="post">
  784. <?lsmb PROCESS input element_data = {
  785. type="hidden"
  786. name="entity_id"
  787. value=entity_id
  788. } ?>
  789. <?lsmb PROCESS input element_data = {
  790. type="hidden"
  791. name="credit_id"
  792. value=credit_id
  793. } ?>
  794. <?lsmb IF credit_id -?>
  795. <div class="input"><?lsmb PROCESS select element_data = {
  796. name = "note_class"
  797. default_values = [note_class]
  798. options = note_class_options
  799. label = text("Note Class") #"
  800. text_attr = "label"
  801. value_attr = "value"
  802. } ?>
  803. </div>
  804. <?lsmb END # IF credit_id -?>
  805. <div class="input"><?lsmb PROCESS textarea element_data = {
  806. label = text('Notes:<br />')
  807. name = 'note'
  808. } ?></div>
  809. <div class="input">
  810. <?lsmb PROCESS button element_data = {
  811. text = text('Save')
  812. class = 'submit'
  813. name = 'action'
  814. value = 'save_notes'
  815. } ?>
  816. </form>
  817. <?lsmb FOREACH n = notes ?>
  818. <div class="note">
  819. <div class="timestamp"><?lsmb text('Entered at: [_1]', n.created) ?></div>
  820. <div class="author"><?lsmb text("Author: [_1]", n.created_by) ?></div>
  821. <div class="note_contents"><?lsmb n.note ?></div>
  822. </div>
  823. <?lsmb END ?>
  824. </div>
  825. <?lsmb END ?>
  826. </body>
  827. </html>