Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 75.79 KB | None | 0 0
  1. <%@ page trimDirectiveWhitespaces="true" %>
  2. <%@ taglib uri="/tags/struts-html" prefix="html" %>
  3. <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
  4. <%@ page import="ro.sdc.ibank.auth.facade.AuthDataFacade"%>
  5. <%@ page import="java.util.Vector"%>
  6. <%@ page import="ro.sdc.ibank.util.misc.DataFormat"%>
  7. <%@ page import="ro.sdc.ibank.util.NumberFormat"%>
  8. <%@ page import="ro.sdc.ibank.util.OPUtils"%>
  9. <%@ page import="ro.sdc.ibank.util.Message"%>
  10. <%@ page import="ro.sdc.ibank.data.ListerData"%>
  11. <%@ page import="java.util.List"%>
  12. <%@ page import="java.util.ArrayList" %>
  13. <%@ page import="ro.sdc.ibank.data.CountryData"%>
  14. <%@ page import="ro.sdc.ibank.data.AccountData"%>
  15. <%@ page import="ro.sdc.ibank.util.misc.Constants"%>
  16. <%@ page import="ro.sdc.ibank.data.BenefRolData"%>
  17. <%@ page import="ro.sdc.ibank.data.CodeData" %>
  18. <%@ page import="ro.sdc.ibank.data.OrdersRolData" %>
  19. <%@ page import="ro.sdc.ibank.util.Utils" %>
  20. <%@ page import="ro.sdc.ibank.util.misc.Parameters" %>
  21. <%@ page import="ro.sdc.ibank.misc.ParameterCache" %>
  22. <%
  23.  
  24.  
  25. // titlul paginii din title bar
  26. //String titleBar = Message.getMessage("dpv.label.titleBar","dpv",request);
  27. // pozitia paginii in meniu
  28. String pageID="op.new";
  29. // titlul paginii
  30. String pageName =Message.getMessage("op.label.steps.pageName","op",request);
  31. //obtine data bancara[pe baza ei voi efectua diferite teste]
  32. String data_bancara = ParameterCache.getInstance().getObjParameterStringValue(Parameters.BANKDATECURRENT);
  33.  
  34. String language = ro.sdc.common.web.WebUtil.getLanguage( request );
  35. String pattern = ro.sdc.common.web.WebUtil.getDatePattern( request,"date.format.calendar" );
  36.  
  37. ListerData benefs = (ListerData) request.getAttribute("benefs");
  38. ListerData accounts = (ListerData) request.getAttribute("accounts");
  39.  
  40. String bank_json = (String) request.getAttribute("bankList");
  41.  
  42.  
  43. boolean hasMobileBanking = false;
  44. if (request.getAttribute("hasMobileBanking")!=null)
  45. {
  46. hasMobileBanking = ((Boolean)request.getAttribute("hasMobileBanking")).booleanValue();
  47. }
  48.  
  49. OrdersRolData opData = new OrdersRolData();
  50.  
  51. //cazul in care vizualizez un PO existent
  52. if (request.getParameter("view") != null || request.getParameter("generate") != null) {
  53. //System.out.println("############################################");
  54. opData = (OrdersRolData) request.getAttribute("opData");
  55. if (opData == null){
  56. System.out.println("OPData e NULL");
  57. } else if (opData.getInitTransaction() == null){
  58. System.out.println("INITTRANSACTION e NULL");
  59. } else {
  60. System.out.println("Totul e OK");
  61. }
  62. //System.out.println("############################################");
  63. }
  64.  
  65. %>
  66. <%@ include file="../commonjspf/i.top.jspf" %>
  67. <SCRIPT TYPE="text/javascript" SRC="../javascript/jquery/jquery-2.1.4.min.js"></SCRIPT>
  68. <SCRIPT TYPE="text/javascript" SRC="../javascript/jquery/jquery-ui.min.js"></SCRIPT>
  69. <link rel="stylesheet" type="text/css" href="../javascript/jquery/jquery-ui.min.css"></link>
  70.  
  71. <!--[if lte IE 8]>
  72. <SCRIPT TYPE="text/javascript" SRC="../javascript/ie_compatibility/jquery-1.11.3.js"></SCRIPT>
  73.  
  74. <![endif]-->
  75. <STYLE>
  76.  
  77. #auth_area_mask {
  78. background-color: rgba(80,80,80, 0.7);
  79. display: none;
  80. width: 100%;
  81. height: 100%;
  82. position: absolute;
  83. top: 0px;
  84. left: 0px;
  85. }
  86.  
  87. #auth_area {
  88. width: 750px;
  89. height: 680px;
  90. position: relative;
  91. margin: auto;
  92. display: block;
  93. top: 50px;
  94. left: 0;
  95. right: 0;
  96. bottom: 0;
  97. background: white;
  98. overflow-y: auto;
  99. }
  100.  
  101.  
  102. #spin_mask {
  103. display: none;
  104. text-align: center;
  105. background-color: rgba(80,80,80,0.7);
  106. width: 100%;
  107. height: 100%;
  108. position: absolute;
  109. top: 0px;
  110. left: 0px;
  111.  
  112. }
  113.  
  114.  
  115.  
  116. table {
  117. border: 1px solid black;
  118. }
  119.  
  120. input {
  121. margin-top: 5px;
  122. margin-bottom: 5px;
  123. }
  124.  
  125.  
  126.  
  127.  
  128. #cautare_banca {
  129. margin-bottom: 0px;
  130. width: 200px;
  131. }
  132. #found {
  133. border: 1px solid darkgrey;
  134. width: 260px;
  135. height: 100px;
  136. overflow: auto;
  137. display: none;
  138. position: absolute;
  139. background: rgba(255,255,255,1.0);
  140. }
  141.  
  142. .sel {
  143. padding: 3px;
  144.  
  145. }
  146.  
  147. .sel:hover {
  148. background: #141f78;
  149. color: white;
  150. }
  151.  
  152. .sel_benef {
  153. padding: 3px;
  154.  
  155. }
  156.  
  157. .sel_benef:hover {
  158. background: blue;
  159. color: white;
  160. }
  161.  
  162. .non-bpos {
  163. display: none;
  164. }
  165.  
  166. #mask {
  167. background-color: rgba(80,80,80, 0.7);
  168.  
  169. width: 100%;
  170. height: 100%;
  171. position: absolute;
  172. top: 0px;
  173. left: 0px;
  174.  
  175. }
  176. #transaction_date{
  177. border-radius: 5px;
  178. border-color:#AAAAAA;
  179.  
  180. }
  181.  
  182. #benef_adder_div {
  183. width: 420px;
  184. height: 580px;
  185. position: relative;
  186. margin: auto;
  187. display: block;
  188. top: 100px;
  189. left: 0;
  190. right: 0;
  191. bottom: 0;
  192. background: white;
  193.  
  194.  
  195. }
  196.  
  197. #mask_transactions {
  198. display: none;
  199. background-color: rgba(80,80,80, 0.7);
  200.  
  201. width: 100%;
  202. height: 100%;
  203. position: absolute;
  204. top: 0px;
  205. left: 0px;
  206. }
  207.  
  208. #transactions_content {
  209. width: 420px;
  210. height: 200px;
  211. position: relative;
  212. margin: auto;
  213. display: block;
  214. top: 100px;
  215. left: 0;
  216. right: 0;
  217. bottom: 0;
  218. background: white;
  219. border-radius: 7px;
  220.  
  221.  
  222. }
  223. #transaction_sum {
  224. border: 1px solid darkgray;
  225.  
  226. }
  227.  
  228. #reg_number{
  229. border: 1px solid darkgray;
  230. }
  231. #doc_content{
  232. border-radius: 7px;
  233. }
  234.  
  235. #mask_doc {
  236. display: none;
  237. background-color: rgba(80,80,80, 0.7);
  238.  
  239. width: 100%;
  240. height: 100%;
  241. position: absolute;
  242. top: 0px;
  243. left: 0px;
  244. }
  245.  
  246. #doc_content {
  247. width: 420px;
  248. height: 220px;
  249. position: relative;
  250. margin: auto;
  251. display: block;
  252. top: 100px;
  253. left: 0;
  254. right: 0;
  255. bottom: 0;
  256. background: white;
  257.  
  258.  
  259. }
  260.  
  261. #account_select, #selectare_benef {
  262. width: 400px;
  263. }
  264.  
  265. #cautare_benef_input {
  266. width: 400px;
  267. margin-top: 15px;
  268. }
  269.  
  270. #descriere_plata {
  271. width: 400px;
  272. }
  273.  
  274. #add_new_benef{
  275. padding: 10px;
  276. }
  277.  
  278. #inner_new_benef {
  279. padding: 10px;
  280. margin: 0 auto;
  281. width: 65%;
  282.  
  283. }
  284.  
  285. #new_benef_buttons {
  286. display: block;
  287. margin: auto auto;
  288. width: 80%;
  289. height: 80%;
  290. padding: 10px;
  291. }
  292. #preview_dpv_content{
  293. float: left;
  294. width: 27%;
  295. }
  296.  
  297. #create_dpv_content{
  298. float: right;
  299. width: 70%;
  300. }
  301.  
  302. .previewDivField{
  303. margin: 10px;
  304.  
  305. }
  306.  
  307. .previewDivFieldValue{
  308. text-align: center;
  309. margin: 5px;
  310. display: inline-block;
  311. }
  312.  
  313. .my_tab {
  314. width: 45%;
  315. border-collapse: collapse;
  316. text-align: center;
  317. border: 0;
  318.  
  319.  
  320. }
  321.  
  322. .my_tab tr {
  323. border-bottom: 1px solid #CCCCCC;
  324.  
  325. }
  326.  
  327. .my_tab tr:first-child {
  328. border-bottom: 1px solid #494949;
  329. font-weight: bold;
  330.  
  331. }
  332.  
  333. .my_tab td {
  334. padding: 3px;
  335.  
  336. }
  337.  
  338.  
  339. .dpv_subtitle {
  340. font-weight: normal;
  341. font-size: 15px;
  342. margin-top: 10px;
  343. margin-bottom: 5px;
  344. font-family: Ubuntu Bold;
  345. display: block;
  346. color:black;
  347.  
  348. }
  349.  
  350. .dpv_preview_title {
  351. font-weight: normal;
  352. }
  353.  
  354. .delimit_bar {
  355. width: 570px;
  356. background: rgb(223, 218, 218);
  357. height: 2px;
  358. margin-top: 10px;
  359. }
  360.  
  361. .payment_detail {
  362. font-familty: Ubuntu Regular;
  363. font-weight: normal;
  364. }
  365.  
  366.  
  367. select {
  368. font-family: Ubuntu Regular;
  369. border: 1px solid darkgray;
  370. height: 23px;
  371. border-radius: 5px;
  372. }
  373.  
  374. textarea {
  375. font-family: Ubuntu Regular;
  376. }
  377. input {
  378. font-family: Ubuntu Regular;
  379. border-radius: 5px;
  380. border: 1px solid darkgray;
  381.  
  382. }
  383.  
  384.  
  385.  
  386. #select_code_desc{
  387. border-radius: 5px;
  388. margin-top: 5px;
  389. }
  390.  
  391. #adresa_benef{
  392. width: 259;
  393. border-radius: 5px;
  394. }
  395. #benef_bank_address{
  396. width: 259;
  397. border-radius: 5px;
  398. }
  399.  
  400. #benef_adder_div{
  401. height: 610px;
  402. border-radius: 7px;
  403. border: 1px solid darkgray;
  404. }
  405. #document_date{
  406. height: 20px;
  407. border: 1px solid darkgray;
  408. }
  409.  
  410. #show_transactions{
  411. margin-bottom: 10px;
  412. }
  413.  
  414. #add_document_show{
  415. margin-bottom: 10px;
  416. }
  417.  
  418.  
  419.  
  420. #preview_dpv_content {
  421. background: #DFDADA;
  422. margin-left: 5px;
  423. border-radius: 15px;
  424. }
  425.  
  426. .button {
  427.  
  428. font-size: 12px;
  429. height: 25px;
  430. border-radius: 7px;
  431. }
  432.  
  433.  
  434.  
  435. #account_select {
  436. border-radius: 5px;
  437. height: 25px;
  438. font-size: 13px;
  439. }
  440.  
  441.  
  442. #selectare_benef {
  443. border-radius: 5px;
  444. height: 25px;
  445. font-size: 13px;
  446. }
  447.  
  448. #partner_country_sel {
  449. border-radius: 5px;
  450. height: 25px;
  451. font-size: 13px;
  452. }
  453.  
  454. #cautare_benef_input {
  455. border-radius: 5px;
  456. height: 25px;
  457. font-size: 13px;
  458. border: 1px solid darkgrey;
  459. }
  460.  
  461. #descriere_plata {
  462. border-radius: 7px;
  463. }
  464.  
  465. #show_transactions {
  466. min-width: 166px;
  467. }
  468.  
  469.  
  470. #add_document_show {
  471. min-width: 166px;
  472. }
  473.  
  474. #save_button {
  475. min-width: 73px;
  476. margin-right: 5px;
  477. background-color: #BD3826;
  478. }
  479.  
  480.  
  481. #approve_button {
  482. min-width: 83px;
  483. background-color: #BD3826;
  484. margin-right: 5px;
  485. }
  486.  
  487. #reject_button {
  488. min-width: 83px;
  489. background-color: #BD3826;
  490. }
  491.  
  492. #button_description{
  493. font-size: 12px;
  494. background-color: #DFDADA;
  495. padding: 7px;
  496. border-radius: 10px;
  497. margin-bottom: 15px;
  498. width: 560px;
  499. }
  500.  
  501. #create_new_benef{
  502.  
  503. background-color: #BD3826;
  504.  
  505. }
  506. #close_create_new_benef{
  507. background-color: #BD3826;
  508. }
  509.  
  510.  
  511.  
  512. #benef_adder_div {
  513. width: 420px;
  514. height: 450px;
  515. position: relative;
  516. margin: auto;
  517. display: block;
  518. top: 40px;
  519. left: 0;
  520. right: 0;
  521. bottom: 0;
  522. background: #FFFFFF;
  523. border-radius: 7px;
  524. border: 3px solid #818184;
  525. padding-top: 20px;
  526.  
  527. }
  528.  
  529.  
  530. }
  531. #inner_new_benef {
  532. padding: 10px;
  533. margin: 0 auto;
  534. width: 65%;
  535.  
  536. }
  537.  
  538.  
  539.  
  540. #new_benef_buttons {
  541. display: block;
  542. margin: auto auto;
  543. width: 80%;
  544. height: 80%;
  545. padding: 10px;
  546. }
  547.  
  548.  
  549.  
  550.  
  551. .button {
  552. background: #BD3826;
  553. font-size: 12px;
  554. height: 25px;
  555. border-radius: 7px;
  556. }
  557.  
  558. #adresa_benef{
  559. width: 259;
  560. border-radius: 5px;
  561. }
  562. #benef_bank_address{
  563. width: 259;
  564. border-radius: 5px;
  565. }
  566.  
  567.  
  568. #tax {
  569. font-size: 12px;
  570. background-color: #DFDADA;
  571. padding: 1px;
  572. padding-left: 10px;
  573. border-radius: 10px;
  574. margin-bottom: 15px;
  575. margin-top: 10px;
  576. width: 400px;
  577.  
  578. }
  579.  
  580. .star{
  581. color: #BD3826;
  582. font-family: Ubuntu bold;
  583. }
  584.  
  585. </STYLE>
  586. <!--[if lte IE 8]>
  587. <script>
  588. //fac un polyfill pentru placeholder
  589.  
  590.  
  591. $(function () {
  592. //mai intai pentru text
  593. $("input[type='text']").blur(function(){
  594. if ($(this).attr('placeholder') != null && $(this).attr('placeholder') != '' && $(this).val() === ''){
  595. $(this).css('font-style', 'italic');
  596. $(this).val($(this).attr('placeholder'));
  597.  
  598.  
  599. }
  600.  
  601. });
  602.  
  603.  
  604. $("input[type='text']").focus(function(){
  605. if ($(this).attr('placeholder') != null && $(this).attr('placeholder') != '' && $(this).val() === $(this).attr('placeholder')){
  606. $(this).css('font-style', 'normal');
  607. $(this).val('');
  608.  
  609.  
  610. }
  611.  
  612. });
  613.  
  614.  
  615. //apoi pentru textareas
  616. $("textarea").blur(function(){
  617. if ($(this).attr('placeholder') != null && $(this).attr('placeholder') != '' && $(this).val() === ''){
  618. $(this).css('font-style', 'italic');
  619. $(this).val($(this).attr('placeholder'));
  620.  
  621.  
  622. }
  623.  
  624. });
  625.  
  626.  
  627. $("textarea").focus(function(){
  628. if ($(this).attr('placeholder') != null && $(this).attr('placeholder') != '' && $(this).val() === $(this).attr('placeholder')){
  629. $(this).css('font-style', 'normal');
  630. $(this).val('');
  631. }
  632.  
  633. });
  634.  
  635.  
  636.  
  637.  
  638. //dau blur campurilor care trebuie sa arate un placeholder
  639.  
  640. $("#order_no").blur();
  641. $("#transaction_sum_ie").blur();
  642. $("#descriere_plata").blur();
  643. $("#fiscal_id").blur();
  644.  
  645.  
  646.  
  647. //elimin evenimente
  648. $("#transaction_id").unbind("onkeypress");
  649.  
  650. });
  651.  
  652.  
  653.  
  654.  
  655.  
  656. </script>
  657. <style>
  658. #title {
  659. background-image: 0;
  660. background-color: #ffffff;
  661. }
  662.  
  663. #add_new_benef {
  664. border: 1px solid darkgrey;
  665. }
  666.  
  667. #nume_benef {
  668. display: inline-block;
  669. border: 1px solid darkgrey ;
  670. }
  671.  
  672. #alias_benef {
  673. display: inline-block;
  674. border: 1px solid darkgrey ;
  675. }
  676.  
  677. #adresa_benef {
  678. display: inline-block;
  679. border: 1px solid darkgrey ;
  680. }
  681.  
  682. #benef_country_sel {
  683. display: inline-block;
  684. border: 1px solid darkgrey ;
  685. }
  686.  
  687. #cont_benef {
  688. display: inline-block;
  689. border: 1px solid darkgrey ;
  690. }
  691.  
  692. #cautare_banca {
  693. display: inline-block;
  694. border: 1px solid darkgrey ;
  695. }
  696.  
  697. #cautare_banca {
  698. display: inline-block;
  699. border: 1px solid darkgrey ;
  700. }
  701.  
  702. #found {
  703. background: white !important;
  704. }
  705.  
  706. #benef_bank_name {
  707. display: inline-block;
  708. border: 1px solid darkgrey ;
  709. }
  710.  
  711. #benef_bank_bic {
  712. display: inline-block;
  713. border: 1px solid darkgrey ;
  714. }
  715.  
  716. #benef_bank_address {
  717. display: inline-block;
  718. border: 1px solid darkgrey ;
  719. }
  720.  
  721. #benef_bank_country_sel {
  722. display: inline-block;
  723. border: 1px solid darkgrey ;
  724. }
  725.  
  726.  
  727. #transactions_content {
  728. border: 1px solid darkgrey;
  729.  
  730. }
  731.  
  732. #doc_content {
  733. border: 1px solid darkgrey;
  734. width: 440px;
  735. }
  736.  
  737. #doc_content_kernel {
  738. width: 360px;
  739. }
  740.  
  741.  
  742. #bottomArea {
  743. background-image: 0;
  744. background-color: #ffffff;
  745. }
  746.  
  747.  
  748. input[type="radio"] {
  749. border: 0;
  750. }
  751.  
  752. input[type="checkbox"] {
  753. border: 0;
  754. }
  755.  
  756.  
  757. #lastRadioDiv{
  758. margin-top: 5px;
  759. }
  760.  
  761. #add_new_benef {
  762. border-bottom: 0px;
  763. border-top: 0px;
  764. border-left: 0px;
  765. border-right: 0px;
  766. }
  767.  
  768. body {
  769.  
  770. overflow:auto;
  771.  
  772. }
  773.  
  774.  
  775. </style>
  776. <![endif]-->
  777.  
  778. <link rel="stylesheet" type="text/css" href="../theme/calendar.css" />
  779. <SCRIPT TYPE="text/javascript" SRC="../javascript/calendar.js"></SCRIPT>
  780. <SCRIPT TYPE="text/javascript" SRC="../javascript/calendar-<%=language %>.js"></SCRIPT>
  781. <SCRIPT TYPE="text/javascript" SRC="../javascript/calendar-setup.js"></SCRIPT>
  782. <SCRIPT>
  783. if ("aaa".startsWith === undefined) { String.prototype.startsWith = function(f) { return this.indexOf(f) === 0 } }; //Adaugat intrucat pe versiunile vechi de Opera si Chrome nu este recunoscut startsWith
  784. var conturi = null;
  785. var beneficiari = null;
  786.  
  787. var banci = null;
  788. var account_selected = 'none';
  789. var is_sepa = false;
  790.  
  791.  
  792. var cont_benef = '';
  793.  
  794. var uid = -1;
  795.  
  796. var item_counter = 0;
  797.  
  798. var num_test = new RegExp('^\\d+$');
  799.  
  800. var sum_test = '';
  801. if ("<%= language %>" === "en"){
  802. sum_test = new RegExp('^\\d{1,3}(\\,\\d{3}){0,10}\\.\\d{2}$');
  803. } else {
  804. sum_test = new RegExp('^\\d{1,3}(\\.\\d{3}){0,10}\\,\\d{2}$');
  805. }
  806.  
  807. var sum_test_2 = new RegExp('^\\d+$');
  808.  
  809. var separator_pack = ".";
  810. var separator_digit = ",";
  811.  
  812. if ("<%= language %>" === "en"){
  813. separator_pack = ",";
  814. separator_digit = ".";
  815. }
  816. var currently_selected_benef = $("#selectare_benef option")[0];
  817.  
  818. var forPreview = {
  819. client_iban: null,
  820. benef_nume: null,
  821. benef_tara: null,
  822. benef_cont: null,
  823. benef_banca: null,
  824. benef_tara_banca: null,
  825. tranz_sepa: null, //yes,no
  826. tranz_tip: null, //spot, urgent
  827. tranz_comision: null, //out,ben,sha
  828. tranz_plata: null, //cheque,payment order,incasso
  829. mesaj: null
  830. //tranzactiile se gasesc in tranzactii *pe la linia 310
  831.  
  832. };
  833.  
  834. function keepAlive(){
  835. $.post('/iBankWeb/home/keepAlive.do', {}).done(function(){
  836. //console.log('Kept alive]');
  837. });
  838. }
  839.  
  840.  
  841. function getProcessDate(){
  842. return "<%= ((String)request.getAttribute("processDate")) %>";
  843. }
  844.  
  845.  
  846. function ifView(){
  847. <% if (request.getParameter("view") != null) { %>
  848.  
  849.  
  850. $("#account_select").val("<%= opData.getInitTransaction().getAccount_id() %>");
  851. var searched;
  852. //pentru gunoiul de IE8
  853. if (window.attachEvent) {
  854. searched = "<%= opData.getBenef_Name() != null ? opData.getBenef_Name().replaceAll("&","&amp;") : opData.getBenef_Name() %>".replace(/(\s\s+)/g,' ') + "&nbsp;&nbsp;&nbsp;&nbsp;" + "<%= opData.getBenef_Account() %>";
  855. } else { //pentru lumea civilizata
  856. searched = "<%= opData.getBenef_Name() != null ? opData.getBenef_Name().replaceAll("&","&amp;") : opData.getBenef_Name() %>" + "&nbsp;&nbsp;&nbsp;&nbsp;" + "<%= opData.getBenef_Account() %>";
  857. }
  858. //pt beneficiari mai vechi invalizi
  859. setTimeout(function() {
  860. if ($("#selectare_benef option:checked").length === 0) {
  861. show_dialog("<%= Message.getMessage("op.bad.benef.msg", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  862.  
  863. }
  864.  
  865. }, 1000);
  866.  
  867.  
  868. var b_ebankId = $("#selectare_benef option").filter(function () { return $(this).html().trim().indexOf(searched) === 0 }).val();
  869.  
  870. $("#selectare_benef").val(b_ebankId);
  871.  
  872. currently_selected_benef = $("#selectare_benef option:selected");
  873.  
  874. //Extragem contul beneficiarului din option
  875. var benef_sel = $("#selectare_benef option:selected").text();
  876. var nbsp = String.fromCharCode(160);
  877. var separator = nbsp+nbsp+nbsp+nbsp;
  878. var current_iban = benef_sel.split(separator)[1];
  879.  
  880. if (current_iban.length > 7 && current_iban.substring(4,8).toUpperCase() === 'TREZ'){
  881. $("#fiscal_id").show();
  882. $("#div_preview_nr_fiscal").show();
  883.  
  884. } else {
  885. $("#fiscal_id").hide();
  886. $("#div_preview_nr_fiscal").hide();
  887.  
  888. }
  889.  
  890. if (current_iban.length > 7 && current_iban.substring(4,8).toUpperCase() === 'BPOS'){
  891. $("#urgent_div").hide();
  892. $("#div_preview_urgent").hide();
  893.  
  894. } else {
  895. $("#urgent_div").show();
  896. $("#div_preview_urgent").show();
  897. }
  898.  
  899.  
  900.  
  901. if (window.attachEvent){
  902. $("#transaction_sum_ie").val("<%= ro.sdc.common.web.format.NumberFormat.toViewNumber(opData.getInitTransaction().getTransaction_amount(),request) %>");
  903. } else {
  904. $("#transaction_sum").val("<%= ro.sdc.common.web.format.NumberFormat.toViewNumber(opData.getInitTransaction().getTransaction_amount(),request) %>");
  905. }
  906.  
  907.  
  908. $("#order_no").val("<%= opData.getPo_number() %>");
  909.  
  910. var urg = "<%= opData.getUrgent() %>";
  911. if (urg == 1 ){
  912. urg = "yes";
  913. } else {
  914. urg = "no";
  915. }
  916.  
  917.  
  918.  
  919.  
  920. $(".urgent[value='"+urg+"']").prop('checked', true);
  921.  
  922. $("#fiscal_id").val("<%= opData.getFiscalId() %>");
  923.  
  924.  
  925. if (window.attachEvent){
  926. $("#fiscal_id").blur();
  927. }
  928.  
  929. $("#descriere_plata").val("<%= opData.getPo_description().replaceAll("\r\n", "<br>").replace("\n", "<br>") %>");
  930. $("#descriere_plata").val($("#descriere_plata").val().replace(/<br>/g,'\n'));
  931. preview_update();
  932.  
  933. <% } %>
  934.  
  935.  
  936. }
  937.  
  938.  
  939.  
  940. function ifGenerate(){
  941. <% if (request.getParameter("generate") != null) { %>
  942.  
  943.  
  944.  
  945.  
  946.  
  947. $("#account_select").val("<%= opData.getInitTransaction().getAccount_id() %>");
  948.  
  949. <% if (opData.getBenef_Name() != null && !opData.getBenef_Name().trim().equals("")) { %>
  950.  
  951. var searched;
  952. //pentru gunoiul de IE8
  953. if (window.attachEvent) {
  954. searched = "<%= opData.getBenef_Name() %>".replace(/(\s\s+)/g,' ') + "&nbsp;&nbsp;&nbsp;&nbsp;" + "<%= opData.getBenef_Account() %>";
  955. } else { //pentru lumea civilizata
  956. searched = "<%= opData.getBenef_Name() %>" + "&nbsp;&nbsp;&nbsp;&nbsp;" + "<%= opData.getBenef_Account() %>";
  957. }
  958. //pt beneficiari mai vechi invalizi
  959. setTimeout(function() {
  960. if ($("#selectare_benef option:checked").length === 0) {
  961. show_dialog("<%= Message.getMessage("op.bad.benef.msg", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  962. }
  963.  
  964. }, 1000);
  965.  
  966.  
  967. var b_ebankId = $("#selectare_benef option").filter(function () { return $(this).html().trim().indexOf(searched) === 0 }).val();
  968.  
  969. $("#selectare_benef").val(b_ebankId);
  970.  
  971. currently_selected_benef = $("#selectare_benef option:checked");
  972.  
  973.  
  974. //extragem cont beneficiar din option
  975. var benef_sel = $("#selectare_benef option:selected").text();
  976. var nbsp = String.fromCharCode(160);
  977. var separator = nbsp+nbsp+nbsp+nbsp;
  978. var current_iban = benef_sel.split(separator)[1];
  979.  
  980. if (current_iban.length > 7 && current_iban.substring(4,8).toUpperCase() === 'TREZ'){
  981. $("#fiscal_id").show();
  982. $("#div_preview_nr_fiscal").show();
  983.  
  984. } else {
  985. $("#fiscal_id").hide();
  986. $("#div_preview_nr_fiscal").hide();
  987.  
  988. }
  989.  
  990. if (current_iban.length > 7 && current_iban.substring(4,8).toUpperCase() === 'BPOS'){
  991. $("#urgent_div").hide();
  992. $("#div_preview_urgent").hide();
  993.  
  994. } else {
  995. $("#urgent_div").show();
  996. $("#div_preview_urgent").show();
  997. }
  998.  
  999.  
  1000. <% } %>
  1001.  
  1002. <% if (opData.getInitTransaction().getTransaction_amount() != null && !opData.getInitTransaction().getTransaction_amount().equals("0.00") && !opData.getInitTransaction().getTransaction_amount().equals("0,00") ) { %>
  1003. $("#transaction_sum").val("<%= ro.sdc.common.web.format.NumberFormat.toViewNumber(opData.getInitTransaction().getTransaction_amount(),request) %>");
  1004. if (window.attachEvent){
  1005. $("#transaction_sum_ie").val("<%= ro.sdc.common.web.format.NumberFormat.toViewNumber(opData.getInitTransaction().getTransaction_amount(),request) %>");
  1006.  
  1007. } else {
  1008. $("#transaction_sum").val("<%= ro.sdc.common.web.format.NumberFormat.toViewNumber(opData.getInitTransaction().getTransaction_amount(),request) %>");
  1009. }
  1010.  
  1011. <% } %>
  1012.  
  1013. <% if (opData.getPo_number() != null) { %>
  1014. $("#order_no").val("<%= opData.getPo_number() %>");
  1015. <% } %>
  1016.  
  1017.  
  1018. var urg = "<%= opData.getUrgent() %>";
  1019. if (urg == 1 ){
  1020. urg = "yes";
  1021. } else {
  1022. urg = "no";
  1023. }
  1024.  
  1025.  
  1026.  
  1027.  
  1028. $(".urgent[value='"+urg+"']").prop('checked', true);
  1029.  
  1030. <% if (opData.getFiscalId() != null) { %>
  1031. $("#fiscal_id").val("<%= opData.getFiscalId() %>");
  1032.  
  1033. <% } %>
  1034. if (window.attachEvent){
  1035. $("#fiscal_id").blur();
  1036. }
  1037.  
  1038. <% if ( opData.getPo_description()!= null) { %>
  1039. $("#descriere_plata").val("<%= opData.getPo_description().replaceAll("\r\n", "<br>").replace("\n", "<br>") %>");
  1040. $("#descriere_plata").val($("#descriere_plata").val().replace(/<br>/g,'\n'));
  1041. <% } %>
  1042. preview_update();
  1043.  
  1044. <% } %>
  1045.  
  1046.  
  1047. }
  1048.  
  1049. function ifBenef(){
  1050. <% if (request.getParameter("po_id_benef") != null) { %>
  1051.  
  1052.  
  1053. //pt beneficiari mai vechi invalizi
  1054. setTimeout(function() {
  1055. if ($("#selectare_benef option:checked").length === 0) {
  1056. show_dialog("<%= Message.getMessage("op.bad.benef.msg", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1057. }
  1058.  
  1059. }, 1000);
  1060.  
  1061. $("#selectare_benef").val("<%= request.getParameter("po_id_benef")%>");
  1062. currently_selected_benef = $("#selectare_benef option:checked");
  1063. //extragem cont beneficiar din option
  1064.  
  1065. var benef_sel = $("#selectare_benef option:selected").text();
  1066. var nbsp = String.fromCharCode(160);
  1067. var separator = nbsp+nbsp+nbsp+nbsp;
  1068. var current_iban = benef_sel.split(separator)[1];
  1069.  
  1070. if (current_iban.length > 7 && current_iban.substring(4,8).toUpperCase() === 'TREZ'){
  1071. $("#fiscal_id").show();
  1072. $("#div_preview_nr_fiscal").show();
  1073. if (window.attachEvent){
  1074. $("#fiscal_id").blur();
  1075. }
  1076. }else {
  1077. $("#fiscal_id").hide();
  1078. $("#div_preview_nr_fiscal").hide();
  1079.  
  1080. }
  1081. if (current_iban.length > 7 && current_iban.substring(4,8).toUpperCase() === 'BPOS'){
  1082. $("#urgent_div").hide();
  1083. $("#div_preview_urgent").hide();
  1084.  
  1085. } else {
  1086. $("#urgent_div").show();
  1087. $("#div_preview_urgent").show();
  1088. }
  1089.  
  1090.  
  1091. <% } %>
  1092. }
  1093.  
  1094. //functie care se apeleaza cand se updateaza valoarea din calendarul de tranzactii
  1095. //pt a efectua unele validari legate de data
  1096. function trans_cal_update(){
  1097.  
  1098.  
  1099. check_statcode_date();
  1100.  
  1101. //elimin calendarul
  1102. $(".calendar").remove();
  1103. window.calendar = null;
  1104.  
  1105.  
  1106. }
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113. function removeTop(){
  1114. //var $ = parent.window.$;
  1115. $("iframe").contents().find(".noPrint").hide();
  1116. $("iframe").contents().find(".noprint").hide();
  1117. $("iframe").contents().find(".header").hide();
  1118. //$("iframe").contents().find("#bottomArea").parent().show();
  1119. $("iframe").contents().find("#uid").val(uid);
  1120.  
  1121.  
  1122. $("iframe").contents().find("html").css({"width": "600px", "height": "450px", "overflow": "hidden"});
  1123. $("iframe").contents().find("#content").css({"background-color": "white"});
  1124. $("iframe").contents().find("body").css({"background-color": "white"});
  1125. }
  1126.  
  1127.  
  1128. function preview_update(){
  1129. var client_iban_old = $("#preview_client_iban").text();
  1130. var benef_nume_old = $("#preview_benef_nume").text();
  1131. var benef_cont_old = $("#preview_benef_cont").text();
  1132. var suma_old = $("#preview_suma").text();
  1133. var nr_ordin_old = $("#preview_nr_ordin").text();
  1134. var nr_fiscal_old = $("#preview_nr_fiscal").text();
  1135. var urgent_old = $("#preview_urgent").text();
  1136. var descriere_old = $("#preview_descriere").text();
  1137. var nbsp = String.fromCharCode(160);
  1138. var separator = nbsp+nbsp+nbsp+nbsp;
  1139. var client_iban = '';
  1140. //selectare iban din cont
  1141. if ($("#account_select").val() !== 'none') {
  1142.  
  1143. client_iban = $.trim($("#account_select option:selected").text().trim().slice(0,26).trim());
  1144.  
  1145. }
  1146.  
  1147. var benef_nume = '-';
  1148. var benef_cont = '-';
  1149. var benef_sel;
  1150. //selectare beneficiar
  1151.  
  1152. if(currently_selected_benef){
  1153.  
  1154. benef_sel = currently_selected_benef.text();
  1155.  
  1156. }
  1157.  
  1158.  
  1159. if ($("#selectare_benef").val() !== 'none') {
  1160.  
  1161. benef_cont = benef_sel.split(separator)[1];
  1162. benef_nume = currently_selected_benef.text().trim().split('RO')[0].trim();
  1163. }
  1164.  
  1165. var suma = '';
  1166.  
  1167. if (!window.attachEvent){
  1168. suma = $("#transaction_sum").val();
  1169. } else {
  1170. suma = $("#transaction_sum_ie").val();
  1171. }
  1172.  
  1173. var nr_ordin = $("#order_no").val();
  1174. var nr_fiscal = $("#fiscal_id").val();
  1175. var urgent =$(".urgent:checked").val() === "yes" ? true : false;
  1176. var descriere = $("#descriere_plata").val();
  1177.  
  1178. if (window.attachEvent){
  1179.  
  1180. if (nr_ordin === $("#order_no").attr('placeholder')){
  1181. nr_ordin = '';
  1182. }
  1183.  
  1184.  
  1185. if (nr_fiscal === $("#fiscal_id").attr('placeholder')){
  1186. nr_fiscal = '';
  1187. }
  1188.  
  1189. if (suma === $("#transaction_sum_ie").attr('placeholder')){
  1190. suma = '';
  1191. }
  1192.  
  1193. }
  1194. if (client_iban === "none"){
  1195. client_iban = "-";
  1196. }
  1197.  
  1198. if (benef_nume === "none"){
  1199. benef_nume = "-";
  1200. }
  1201.  
  1202. if (urgent){
  1203. urgent = "X"
  1204. } else {
  1205. urgent = "-"
  1206. }
  1207.  
  1208. if (suma === ''){
  1209. suma = '-';
  1210. }
  1211.  
  1212. if (nr_ordin === ''){
  1213. nr_ordin = '-';
  1214. }
  1215.  
  1216. if (nr_fiscal === ''){
  1217. nr_fiscal = '-';
  1218. }
  1219.  
  1220. if (descriere === ''){
  1221. descriere = '-';
  1222. }
  1223.  
  1224. if (client_iban !== client_iban_old){
  1225. $("#preview_client_iban").text(client_iban);
  1226. $("#div_preview_client_iban").fadeTo('slow', 0.5).fadeTo('slow', 1.0);
  1227.  
  1228. }
  1229.  
  1230. if (benef_nume !== benef_nume_old){
  1231. $("#preview_benef_nume").text(benef_nume);
  1232. $("#div_preview_benef_name").fadeTo('slow', 0.5).fadeTo('slow', 1.0);
  1233. }
  1234.  
  1235. if (benef_cont !== benef_cont_old){
  1236. $("#preview_benef_cont").text(benef_cont);
  1237. $("#div_preview_benef_cont").fadeTo('slow', 0.5).fadeTo('slow', 1.0);
  1238. }
  1239.  
  1240. if (urgent !== urgent_old){
  1241. $("#preview_urgent").text(urgent);
  1242. $("#div_preview_urgent").fadeTo('slow', 0.5).fadeTo('slow', 1.0);
  1243. }
  1244.  
  1245. if (suma !== suma_old){
  1246. $("#preview_suma").text(suma);
  1247. $("#div_preview_suma").fadeTo('slow', 0.5).fadeTo('slow', 1.0);
  1248. }
  1249.  
  1250. if (nr_ordin !== nr_ordin_old){
  1251. $("#preview_nr_ordin").text(nr_ordin);
  1252. $("#div_preview_nr_ordin").fadeTo('slow', 0.5).fadeTo('slow', 1.0);
  1253. }
  1254.  
  1255. if (nr_fiscal !== nr_fiscal_old){
  1256. $("#preview_nr_fiscal").text(nr_fiscal);
  1257. $("#div_preview_nr_fiscal").fadeTo('slow', 0.5).fadeTo('slow', 1.0);
  1258. }
  1259.  
  1260. if (descriere !== descriere_old){
  1261. $("#preview_descriere").text(descriere);
  1262. $("#div_preview_descriere").fadeTo('slow', 0.5).fadeTo('slow', 1.0);
  1263. }
  1264.  
  1265.  
  1266. }
  1267.  
  1268.  
  1269. function validateFields(){
  1270. var account_field = $("#account_select");
  1271. var benef_field = $("#selectare_benef");
  1272. var amount_field = '';
  1273. if (window.attachEvent){
  1274. amount_field = $("#transaction_sum_ie");
  1275. } else {
  1276. amount_field = $("#transaction_sum");
  1277.  
  1278. }
  1279.  
  1280.  
  1281.  
  1282. var number_field = $("#order_no");
  1283.  
  1284. var fiscal_field = $("#fiscal_id");
  1285.  
  1286. var urgent = $(".urgent:checked").val() === "yes" ? true : false;
  1287.  
  1288. var description_field = $("#descriere_plata");
  1289.  
  1290. var valid = true;
  1291.  
  1292. var nbsp=String.fromCharCode(160);
  1293. var separator=nbsp+nbsp+nbsp+nbsp;
  1294.  
  1295. var bad = false; //daca e gresit fiscal id-ul
  1296. var bad_reason = '';
  1297. if (window.attachEvent){
  1298. if (fiscal_field.val() !== fiscal_field.attr('placeholder')){
  1299. if (!num_test.test(fiscal_field.val())) {
  1300. bad = true;
  1301. bad_reason = 'not_numeric';
  1302. } else {
  1303. if (fiscal_field.val().length != 23){
  1304. bad = true;
  1305. bad_reason = 'length';
  1306. }
  1307.  
  1308. }
  1309. }
  1310. } else {
  1311. if (fiscal_field.val().trim() !== '') {
  1312. if (!num_test.test(fiscal_field.val())) {
  1313. bad = true;
  1314. bad_reason = 'not_numeric';
  1315. } else {
  1316. if (fiscal_field.val().length != 23){
  1317. bad = true;
  1318. bad_reason = 'length';
  1319. }
  1320.  
  1321. }
  1322. }
  1323.  
  1324.  
  1325. }
  1326.  
  1327.  
  1328. if (account_field.val() === "none"){
  1329. valid = false;
  1330. show_dialog("<%= Message.getMessage("op.error.account.selection", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1331.  
  1332. } else if (benef_field.val() === "none"){
  1333. valid = false;
  1334. show_dialog("<%= Message.getMessage("op.error.benef.selection", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1335.  
  1336.  
  1337. } else if ($("#account_select option:selected").text().trim().split(separator)[0] === currently_selected_benef.text().trim().split(separator)[1]) {
  1338. valid = false;
  1339. show_dialog("<%= Message.getMessage("op.error.sameAccount", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1340.  
  1341.  
  1342. } else if (amount_field.val().trim() === "" || amount_field.val() === "0.00" || amount_field.val() === "0,00"){
  1343. valid = false;
  1344. show_dialog("<%= Message.getMessage("op.error.amount.fill", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1345.  
  1346.  
  1347. } else if (window.attachEvent && (number_field.val() === number_field.attr('placeholder') || number_field.val() !== number_field.attr('placeholder') && !num_test.test(number_field.val())) || !window.attachEvent && (number_field.val().trim() === "" || !num_test.test(number_field.val()))){
  1348. valid = false;
  1349. show_dialog("<%= Message.getMessage("op.error.number.fill", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1350.  
  1351.  
  1352. } else if (bad) {
  1353. valid = false;
  1354. if (bad_reason === 'length'){
  1355. show_dialog("<%= Message.getMessage("op.fiscal_id.char_num", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1356.  
  1357. } else if (bad_reason === 'not_numeric') {
  1358. show_dialog("<%= Message.getMessage("error.fiscal.numeric.error", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1359.  
  1360. }
  1361.  
  1362. } else if (description_field.val().trim() === "" || (window.attachEvent && description_field.val() === description_field.attr("placeholder"))){
  1363. valid = false;
  1364. show_dialog("<%= Message.getMessage("op.error.description.fill", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1365.  
  1366.  
  1367. } else if (window.attachEvent && !sum_test.test($("#transaction_sum_ie").val())){
  1368. //suma invalida
  1369.  
  1370.  
  1371. if (sum_test_2.test($("#transaction_sum_ie").val()) && $("#transaction_sum_ie").val().indexOf("0") !== 0) {
  1372.  
  1373. if ("<%= language %>" === "en"){
  1374. $("#transaction_sum_ie").val($("#transaction_sum_ie").val() + ".00");
  1375. } else {
  1376. $("#transaction_sum_ie").val($("#transaction_sum_ie").val() + ",00");
  1377. }
  1378.  
  1379. } else {
  1380. if ($("#transaction_sum_ie").val() === $("#transaction_sum_ie").attr('placeholder')) {
  1381.  
  1382. } else {
  1383. valid = false;
  1384. show_dialog("<%= Message.getMessage("op.ie.sum.error.msg", "op", request) %>", "<%= Message.getMessage("op.ie.sum.error.title", "op", request) %>");
  1385. //$("#transaction_sum_ie").css("border", "1px solid red");
  1386. }
  1387. }
  1388.  
  1389.  
  1390. }
  1391.  
  1392. var fiscal_val = fiscal_field.val();
  1393. if (window.attachEvent){
  1394. if (fiscal_val === fiscal_field.attr('placeholder')){
  1395. fiscal_val = '';
  1396. }
  1397. }
  1398.  
  1399. var benef_sel='';
  1400.  
  1401. if(currently_selected_benef!=undefined){
  1402.  
  1403. benef_sel=$.trim(currently_selected_benef.text());
  1404.  
  1405. var benef_name=currently_selected_benef.attr("benef");
  1406. var nbsp=String.fromCharCode(160);
  1407. var separator=nbsp+nbsp+nbsp+nbsp;
  1408.  
  1409. if (valid){
  1410.  
  1411. return {
  1412. benefAccount: benef_sel.split(separator)[1],
  1413. //benefName: $.trim($("#selectare_benef option:selected").text().trim().split('RO')[0].trim()),
  1414. benefName: benef_name,
  1415. benefId: currently_selected_benef.val(),
  1416.  
  1417. accountId: account_field.val(),
  1418. description: description_field.val(),
  1419. transactionAmount: amount_field.val(),
  1420. userHasApprovedOrder: -1,
  1421. isJustForApprove: "",
  1422. poNumber: number_field.val(),
  1423. fiscalId: fiscal_val,
  1424. urgent: urgent === true ? 1 : 0
  1425. //duplicate: $(".duplicate:checked").val() === "yes" ? true : false,
  1426. //verify: $(".verify:checked").val() === "yes" ? true : false
  1427.  
  1428. }
  1429.  
  1430. } else {
  1431. $("#save_button").removeAttr("disabled");
  1432. $("#approve_button").removeAttr("disabled");
  1433. return false;
  1434.  
  1435. }
  1436.  
  1437.  
  1438. }
  1439.  
  1440.  
  1441. }
  1442.  
  1443.  
  1444. function post_save(){
  1445. var res = validateFields();
  1446. if (!res){
  1447. $("#save_button").removeAttr("disabled");
  1448. $("#approve_button").removeAttr("disabled");
  1449.  
  1450.  
  1451. return;
  1452. }
  1453.  
  1454. res.userHasApprovedOrder = 1;
  1455. res.isJustForApprove = "false";
  1456.  
  1457. <% if (request.getParameter("view") != null) { %>
  1458.  
  1459. res.edit = "<%= request.getParameter("view") %>";
  1460. <% } else { %>
  1461.  
  1462. res.create = ""; //daca e plata noua, daca e editata se pune res.edit
  1463. <% } %>
  1464.  
  1465. $.post('/iBankWeb/op/createOPNew.do', res).done(function(data) {
  1466. //console.log(data);
  1467. if (data.indexOf("Success") === 0){
  1468. var po_id = data.trim().split("_")[1];
  1469. show_dialog("<%= Message.getMessage("op.error.trans.saved", "op", request) %>", "<%= Message.getMessage("op.success.title", "op", request) %>");
  1470. setTimeout(function () {
  1471. window.location = "<%= cpath %>/op/listOP.do?preview_completed="+po_id;
  1472. $(location).attr('href', "<%= cpath %>/op/listOP.do?preview_completed="+po_id);
  1473.  
  1474. }, 1000);
  1475. } else if (data.indexOf("Failure") === 0){
  1476. $("#save_button").removeAttr("disabled");
  1477. $("#approve_button").removeAttr("disabled");
  1478.  
  1479. var reason = data.split('_')[1];
  1480. if (reason.indexOf('-')>-1){
  1481. reason = reason.replace('-', '_');
  1482. }
  1483.  
  1484.  
  1485. show_dialog(reason, "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1486.  
  1487. } else {
  1488. show_dialog("<%= Message.getMessage("op.error.trans.failed", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1489. $("#save_button").removeAttr("disabled");
  1490. $("#approve_button").removeAttr("disabled");
  1491.  
  1492. }
  1493.  
  1494.  
  1495.  
  1496. });
  1497.  
  1498.  
  1499. }
  1500.  
  1501. function askConfirm(){
  1502. $.post("/iBankWeb/op/createOPNew.do",
  1503. {
  1504. check: "check"
  1505. }
  1506. ).done(function (data){
  1507. if (data.indexOf("window.location.reload(true)") > -1){
  1508. //initial doar show_dialog_2 era in aceasta functie
  1509. show_dialog_2("<%= Message.getMessage("dpv.dialog.confirm.msg.p1", "dpv", request) %>" + getProcessDate() + "<%= Message.getMessage("dpv.dialog.confirm.msg.p2", "dpv", request) %>", "<%= Message.getMessage("dpv.dialog.confirm", "dpv", request) %>");
  1510.  
  1511. } else {
  1512. show_dialog("<%= Message.getMessage("dpv.session.expired.msg", "dpv", request) %>", "<%= Message.getMessage("dpv.session.expired.title", "dpv", request) %>");
  1513.  
  1514. setTimeout(function () {
  1515. window.location = "<%= cpath %>/login.jsp";
  1516. $(location).attr('href', "<%= cpath %>/login.jsp");
  1517.  
  1518. }, 2000);
  1519. }
  1520. });
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526. }
  1527.  
  1528. function post_approve(){
  1529. var res = validateFields();
  1530. if (!res){
  1531. $("#save_button").removeAttr("disabled");
  1532. $("#approve_button").removeAttr("disabled");
  1533.  
  1534. return;
  1535. }
  1536.  
  1537. res.userHasApprovedOrder = 2;
  1538. res.isJustForApprove = "false";
  1539.  
  1540. <% if (request.getParameter("view") != null) { %>
  1541.  
  1542. res.edit = "<%= request.getParameter("view") %>";
  1543. <% } else { %>
  1544.  
  1545. res.create = ""; //daca e plata noua, daca e editata se pune res.edit
  1546. <% } %>
  1547. $.post('/iBankWeb/op/createOPNew.do', res).done(function(data) {
  1548. //console.log(data);
  1549. if (data.indexOf("Success") === 0){
  1550. show_dialog("<%= Message.getMessage("op.approve.success", "op", request) %>", "<%= Message.getMessage("op.success.title", "op", request) %>");
  1551. var po_id = data.trim().split("_")[1];
  1552. setTimeout(function () {
  1553. window.location = "<%= cpath %>/op/listOP.do?preview_completed="+po_id;
  1554. $(location).attr('href', "<%= cpath %>/op/listOP.do?preview_completed="+po_id);
  1555.  
  1556. }, 1000);
  1557. } else if (data.indexOf("Failure") === 0){
  1558. $("#save_button").removeAttr("disabled");
  1559. $("#approve_button").removeAttr("disabled");
  1560. var reason = data.split('_')[1];
  1561. if (reason.indexOf('-')>-1){
  1562. reason = reason.replace('-', '_');
  1563. }
  1564.  
  1565.  
  1566. show_dialog(reason, "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1567.  
  1568.  
  1569.  
  1570. } else {
  1571. show_dialog("<%= Message.getMessage("op.approve.fail", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1572. $("#save_button").removeAttr("disabled");
  1573. $("#approve_button").removeAttr("disabled");
  1574. }
  1575.  
  1576. });
  1577. }
  1578.  
  1579.  
  1580. function post_reject(){
  1581. $.post('/iBankWeb/op/createOPNew.do', { reject: "<%= request.getParameter("view") %>" }).done(function(data) {
  1582. if (data.indexOf("Success") === 0){
  1583. show_dialog("<%= Message.getMessage("op.reject.success", "op", request) %>", "<%= Message.getMessage("op.success.title", "op", request) %>");
  1584. var po_id = data.trim().split("_")[1];
  1585. setTimeout(function () {
  1586. window.location = "<%= cpath %>/op/listOP.do?preview_completed="+po_id;
  1587. $(location).attr('href', "<%= cpath %>/op/listOP.do?preview_completed="+po_id);
  1588.  
  1589. }, 1000);
  1590. } else if (data.indexOf("Failure") === 0){
  1591. var reason = data.split('_')[1];
  1592. if (reason.indexOf('-')>-1){
  1593. reason = reason.replace('-', '_');
  1594. }
  1595.  
  1596.  
  1597. show_dialog(reason, "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1598.  
  1599. } else {
  1600. show_dialog("<%= Message.getMessage("op.reject.fail", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1601. }
  1602.  
  1603. });
  1604. }
  1605.  
  1606. //function create_benef(){
  1607. //console.log("Benef is being created");
  1608. //#("#mask").hide();
  1609.  
  1610.  
  1611. //}
  1612.  
  1613.  
  1614. function close_dialog_2(){
  1615. $("#dialog_mask_2").hide();
  1616. $("body").css("overflow", "auto");
  1617. $("#save_button").removeAttr("disabled");
  1618. $("#approve_button").removeAttr("disabled");
  1619.  
  1620. }
  1621.  
  1622. function confirmOK(){
  1623. $("#dialog_mask_2").hide();
  1624. $.post("/iBankWeb/op/createOPNew.do",{
  1625. check: "check"
  1626. }).done(function (data){
  1627. if (data.indexOf("window.location.reload(true)") > -1){
  1628. //initial in afara de primul rand din functie doar asta mai era
  1629. post_approve();
  1630. } else {
  1631. show_dialog("<%= Message.getMessage("dpv.session.expired.msg", "dpv", request) %>", "<%= Message.getMessage("dpv.session.expired.title", "dpv", request) %>");
  1632.  
  1633. setTimeout(function () {
  1634. window.location = "<%= cpath %>/login.jsp";
  1635. $(location).attr('href', "<%= cpath %>/login.jsp");
  1636.  
  1637. }, 2000);
  1638. }
  1639.  
  1640. });
  1641. }
  1642.  
  1643. function validateBenef() {
  1644. var n_name = $("#nume_benef").val().trim();
  1645. var n_alias = $("#alias_benef").val().trim();
  1646. var n_account = $("#cont_benef").val().trim();
  1647. var n_bank_name = $("#benef_bank_name").val().trim();
  1648. var n_legal_id = $("#benef_legal_id").val().trim();
  1649. var n_address = $("#adresa_benef").val().trim();
  1650. var benef_mob = 2;
  1651.  
  1652. if($("#mobile_area")!=undefined){
  1653.  
  1654. benef_mob=$(".has_mob:checked").val();
  1655.  
  1656. }
  1657.  
  1658. if(window.attachEvent){
  1659.  
  1660. if (n_legal_id === $("#benef_legal_id").attr('placeholder')){
  1661. n_legal_id = '';
  1662. }
  1663. }
  1664.  
  1665.  
  1666.  
  1667. //trimit un post AJAX cu datele necesare
  1668. $.post("/iBankWeb/op/createBenef.do",
  1669. {
  1670. validate: "true",
  1671. benefName: n_name,
  1672. benefAlias: n_alias,
  1673. benefAccount: n_account,
  1674. benefBankName: n_bank_name,
  1675. benefLegalId: n_legal_id,
  1676. benefAddress: n_address,
  1677. benefBankId: bank_id,
  1678. benefMobile: benef_mob,
  1679. uid: uid,
  1680. is_ro: is_ro
  1681. }
  1682. ).done(function (data){
  1683.  
  1684. //afisez raspunsul
  1685. //console.log("aici e data"+ data);
  1686.  
  1687. if (data.trim().startsWith("Success")){
  1688. showAuth();
  1689. } else if (data.trim().startsWith("Error")) {
  1690. var reason = data.split('_')[1];
  1691. if (reason.indexOf('-')>-1){
  1692. reason = reason.replace('-', '_');
  1693. }
  1694. show_dialog(reason, "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1695. //eroare la validare
  1696. return false;
  1697. } else {
  1698. show_dialog("Eroare la validarea beneficiarului", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1699. //eroare la validare necunoscuta
  1700. return false;
  1701.  
  1702. }
  1703.  
  1704. });
  1705.  
  1706.  
  1707. }
  1708.  
  1709. //pt creare benef
  1710.  
  1711. function postScript(){
  1712. //trimit un post AJAX cu datele necesare
  1713. var n_name = $("#nume_benef").val().trim();
  1714. var n_alias = $("#alias_benef").val().trim();
  1715. var n_account = $("#cont_benef").val().trim();
  1716. var n_bank_name = $("#benef_bank_name").val().trim();
  1717. var n_legal_id = $("#benef_legal_id").val().trim();
  1718. var n_address = $("#adresa_benef").val().trim();
  1719. var benef_mob = 2;
  1720.  
  1721. if($("#mobile_area")!=undefined){
  1722.  
  1723. benef_mob=$(".has_mob:checked").val();
  1724.  
  1725. }
  1726.  
  1727.  
  1728. //ma asigur ca daca am o versiune de IE prost(pana in 8)
  1729. //pseudoplaceholder-ul este ignorat
  1730. if (window.attachEvent){
  1731.  
  1732. if (n_name === $("#nume_benef").attr('placeholder')){
  1733. n_name = '';
  1734. }
  1735. if (n_alias === $("#alias_benef").attr('placeholder')){
  1736. n_alias = '';
  1737. }
  1738. if (n_account === $("#cont_benef").attr('placeholder')){
  1739. n_account = '';
  1740. }
  1741.  
  1742. if (n_bank_name === $("#benef_bank_name").attr('placeholder')){
  1743. n_bank_name = '';
  1744. }
  1745. if (n_legal_id === $("#benef_legal_id").attr('placeholder')){
  1746. n_legal_id = '';
  1747. }
  1748.  
  1749. if (n_address === $("#adresa_benef").attr('placeholder')){
  1750. n_address = '';
  1751. }
  1752. }
  1753.  
  1754. var has_name = true;
  1755. var has_account = true;
  1756. var has_address = true;
  1757. var has_bank_name = true;
  1758.  
  1759.  
  1760. n_account = n_account.toUpperCase();
  1761.  
  1762.  
  1763. if (n_name === ''){
  1764. $("#nume_benef").css("border", "1px solid red");
  1765. has_name = false;
  1766. } else {
  1767. $("#nume_benef").css("border", "1px solid darkgrey");
  1768. }
  1769.  
  1770. if (n_account === ''){
  1771. $("#cont_benef").css("border", "1px solid red");
  1772. has_account = false;
  1773. } else {
  1774. $("#cont_benef").css("border", "1px solid darkgrey");
  1775. }
  1776.  
  1777. if (n_address === ''){
  1778. $("#adresa_benef").css("border", "1px solid red");
  1779. has_address = false;
  1780. } else {
  1781. $("#adresa_benef").css("border", "1px solid darkgrey");
  1782. }
  1783.  
  1784. if (n_bank_name === ''){
  1785. $("#benef_bank_name").css("border", "1px solid red");
  1786. has_bank_name = false;
  1787. } else {
  1788. $("#benef_bank_name").css("border", "1px solid darkgrey");
  1789. }
  1790.  
  1791.  
  1792.  
  1793.  
  1794. if (!has_name || !has_account || !has_address || !has_bank_name ){
  1795. show_dialog("<%= Message.getMessage("op.error.benef.failed.labels", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1796.  
  1797. return;
  1798. }
  1799.  
  1800.  
  1801. //trimit un post AJAX cu datele necesare
  1802. $.post("/iBankWeb/op/createBenef.do",
  1803. {
  1804.  
  1805. create: "true",
  1806. benefName: n_name,
  1807. benefAlias: n_alias,
  1808. benefAccount: n_account,
  1809. benefBankName: n_bank_name,
  1810. benefLegalId: n_legal_id,
  1811. benefAddress: n_address,
  1812. benefBankId: bank_id,
  1813. benefMobile: benef_mob,
  1814. uid: uid,
  1815. is_ro: is_ro
  1816. }
  1817. ).done(function (data){
  1818.  
  1819. //afisez raspunsul
  1820. //console.log("aici e data"+ data);
  1821.  
  1822. if (data.trim().startsWith("Success")){
  1823.  
  1824.  
  1825. //alert("Beneficiarul a fost adaugat cu succes");
  1826. show_dialog("<%= Message.getMessage("op.error.benef.success", "op", request)%>", "<%= Message.getMessage("op.error.title.success", "op", request)%>");
  1827.  
  1828. //adaug in pagina noul beneficiar si il selectez.......(noice)
  1829. var sep = "&nbsp;&nbsp;&nbsp;&nbsp;";
  1830. var new_id = data.trim().split("_")[1];
  1831. var new_opt = '<option value="'+ new_id +'" benef="' + n_name + '">';
  1832. new_opt += n_name + sep + n_account + sep +n_alias;
  1833. new_opt += '</option>';
  1834.  
  1835. $("#selectare_benef").append(new_opt);
  1836.  
  1837.  
  1838. $("#selectare_beneficiar option:selected").attr('selected',false);
  1839. $("#selectare_beneficiar option[value='"+new_id+"']").attr('selected',true);
  1840.  
  1841.  
  1842. currently_selected_benef = $("#selectare_benef option:checked");
  1843.  
  1844. //ascund sau arat urgent
  1845. var benef_sel=$.trim(currently_selected_benef.text());
  1846. var nbsp=String.fromCharCode(160);
  1847. var separator=nbsp+nbsp+nbsp+nbsp;
  1848.  
  1849. if ($("#selectare_benef").val() !== 'none'){
  1850.  
  1851. var current_iban = benef_sel.split(separator)[1];
  1852.  
  1853. if (current_iban.length > 7 && current_iban.substring(4,8).toUpperCase() === 'BPOS'){
  1854. $("#urgent_div").hide();
  1855. $("#div_preview_urgent").hide();
  1856.  
  1857. } else {
  1858. $("#urgent_div").show();
  1859. $("#div_preview_urgent").show();
  1860. $(".urgent[value='no']").prop('checked', true);
  1861. }
  1862.  
  1863.  
  1864. if (current_iban.length > 7 && current_iban.substring(4,8).toUpperCase() === 'TREZ'){
  1865. $("#fiscal_id").show();
  1866. $("#div_preview_nr_fiscal").show();
  1867. } else {
  1868. $("#fiscal_id").hide();
  1869. $("#div_preview_nr_fiscal").hide();
  1870. $("#fiscal_id").val(""); //sterg valoarea anterioara cand ascund
  1871. $("#fiscal_id").blur();
  1872. }
  1873.  
  1874. }
  1875.  
  1876.  
  1877.  
  1878.  
  1879. $("#mask").hide();
  1880.  
  1881. $("body").css("overflow-y", "auto");
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887. preview_update();
  1888. }else if(data.trim().startsWith("Error")) {
  1889.  
  1890. var failure_reason = data.trim().split('_')[1];
  1891.  
  1892. //console.log(failure_reason)
  1893. show_dialog(failure_reason, "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1894.  
  1895.  
  1896.  
  1897.  
  1898. }
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904. else {
  1905.  
  1906. show_dialog("<%= Message.getMessage("op.error.benef.failed", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  1907.  
  1908. }
  1909.  
  1910.  
  1911.  
  1912.  
  1913. });
  1914.  
  1915.  
  1916.  
  1917. }
  1918.  
  1919.  
  1920. var uid = -1;
  1921. var is_ro = 'unknown';
  1922. var bank_id;
  1923. var banks;
  1924. var is_trez=false;
  1925.  
  1926. var autocomplete = function(src){
  1927. var acc = $("#cont_benef").val();
  1928.  
  1929. if(acc.length >= 8 && acc.substring(4, 8).toUpperCase()!=null) {
  1930. var acc_sub = acc.substring(4, 8).toUpperCase();
  1931. for(var i=0; i< banks.length; i++){
  1932.  
  1933. if (banks[i].bic === acc_sub){
  1934. $("#benef_bank_name").val(banks[i].name);
  1935. bank_id=banks[i].intId;
  1936. }
  1937.  
  1938. }
  1939. }
  1940. }
  1941.  
  1942.  
  1943.  
  1944. //end creare benef
  1945.  
  1946.  
  1947.  
  1948. $(function(){
  1949.  
  1950. $("#descriere_plata").val("");
  1951.  
  1952. $("#descriere_plata").blur();
  1953.  
  1954. //conturi = $.parseJSON( $("#accounts_json").val());
  1955.  
  1956.  
  1957.  
  1958. //beneficiari = $.parseJSON( $("#benef_json").val());
  1959.  
  1960.  
  1961. //rezolv o problema de vizualizare
  1962. $("#bottomArea").css({
  1963. "position": "fixed",
  1964. "bottom": "0px",
  1965. "top": ""
  1966. });
  1967.  
  1968.  
  1969. $("#close_auth").click(function (){
  1970. hide_auth();
  1971. });
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977. $("#transaction_sum").blur(function() {
  1978. if ($(this).val() === '0,00') {
  1979. $(this).val('');
  1980. }
  1981. });
  1982.  
  1983. $("#save_button").click(function () {
  1984. $.post("/iBankWeb/op/createOPNew.do",
  1985. {
  1986. check: "check"
  1987. }
  1988. ).done(function (data){
  1989. if (data.indexOf("window.location.reload(true)") > -1){
  1990. $("#save_button").attr("disabled","disabled");
  1991. $("#approve_button").attr("disabled","disabled");
  1992.  
  1993. post_save();
  1994. } else {
  1995. //sesiunea a expirat
  1996. show_dialog("<%= Message.getMessage("dpv.session.expired.msg", "dpv", request) %>", "<%= Message.getMessage("dpv.session.expired.title", "dpv", request) %>");
  1997.  
  1998. setTimeout(function () {
  1999. window.location = "<%= cpath %>/login.jsp";
  2000. $(location).attr('href', "<%= cpath %>/login.jsp");
  2001.  
  2002. }, 2000);
  2003. }
  2004. });
  2005. });
  2006.  
  2007.  
  2008. $("#approve_button").click(function () {
  2009.  
  2010.  
  2011.  
  2012. $.post("/iBankWeb/op/createOPNew.do",
  2013. {
  2014. check: "check"
  2015. }
  2016. ).done(function (data){
  2017. if (data.indexOf("window.location.reload(true)") > -1){
  2018. $("#save_button").attr("disabled","disabled");
  2019. $("#approve_button").attr("disabled","disabled");
  2020. var res = validateFields();
  2021. if (!res){
  2022. $("#save_button").removeAttr("disabled");
  2023. $("#approve_button").removeAttr("disabled");
  2024.  
  2025. return;
  2026. } else {
  2027.  
  2028. res.validateOk="";
  2029.  
  2030. $.post('/iBankWeb/op/createOPNew.do', res ).done(function(data) {
  2031.  
  2032. if (data.indexOf("Success") === 0){
  2033.  
  2034.  
  2035. askConfirm();
  2036.  
  2037. } else if (data.indexOf("Failure") === 0){
  2038.  
  2039. var reason = data.split('_')[1];
  2040. if (reason.indexOf('-')>-1){
  2041. reason = reason.replace('-', '_');
  2042. }
  2043. show_dialog(reason, "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  2044. $("#save_button").removeAttr("disabled");
  2045. $("#approve_button").removeAttr("disabled");
  2046. } else {
  2047. show_dialog("<%= Message.getMessage("op.approve.validate.failure", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  2048. $("#save_button").removeAttr("disabled");
  2049. $("#approve_button").removeAttr("disabled");
  2050. }
  2051.  
  2052. });
  2053.  
  2054.  
  2055.  
  2056. }
  2057. }else {
  2058. //sesiunea a expirat
  2059.  
  2060. show_dialog("<%= Message.getMessage("dpv.session.expired.msg", "dpv", request) %>", "<%= Message.getMessage("dpv.session.expired.title", "dpv", request) %>");
  2061.  
  2062. setTimeout(function () {
  2063. window.location = "<%= cpath %>/login.jsp";
  2064. $(location).attr('href', "<%= cpath %>/login.jsp");
  2065.  
  2066. }, 2000);
  2067.  
  2068.  
  2069. }
  2070. });
  2071.  
  2072. });
  2073.  
  2074.  
  2075. $("#reject_button").click(function () {
  2076. post_reject();
  2077. });
  2078.  
  2079.  
  2080. $("#account_select").change(function(){
  2081. preview_update();
  2082. keepAlive();
  2083. });
  2084.  
  2085. $("#cont_benef").blur(function() {
  2086.  
  2087. keepAlive();
  2088. });
  2089.  
  2090.  
  2091. $("#selectare_benef").change(function(){
  2092. currently_selected_benef = $("#selectare_benef option:selected");
  2093.  
  2094. preview_update();
  2095.  
  2096.  
  2097.  
  2098. var benef_sel=$.trim(currently_selected_benef.text());
  2099. var nbsp=String.fromCharCode(160);
  2100. var separator=nbsp+nbsp+nbsp+nbsp;
  2101.  
  2102. if ($("#selectare_benef").val() !== 'none'){
  2103.  
  2104. var current_iban = benef_sel.split(separator)[1];
  2105.  
  2106. if (current_iban.length > 7 && current_iban.substring(4,8).toUpperCase() === 'BPOS'){
  2107. $("#urgent_div").hide();
  2108. $("#div_preview_urgent").hide();
  2109.  
  2110. } else{
  2111. $("#urgent_div").show();
  2112. $("#div_preview_urgent").show();
  2113. }
  2114.  
  2115. if (current_iban.length > 7 && current_iban.substring(4,8).toUpperCase() === 'TREZ'){
  2116. $("#fiscal_id").show();
  2117. $("#div_preview_nr_fiscal").show();
  2118. } else {
  2119. $("#fiscal_id").hide();
  2120. $("#div_preview_nr_fiscal").hide();
  2121. $("#fiscal_id").val(""); //sterg valoarea anterioara cand ascund
  2122. $("#fiscal_id").blur();
  2123. }
  2124. } else {
  2125. $("#fiscal_id").hide();
  2126. $("#div_preview_nr_fiscal").hide();
  2127. }
  2128. keepAlive();
  2129. });
  2130.  
  2131. $("#transaction_sum").keyup(function(){
  2132. preview_update();
  2133. });
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139. $("#order_no").change(function(){
  2140. preview_update();
  2141. });
  2142.  
  2143. $("#fiscal_id").change(function(){
  2144. preview_update();
  2145. });
  2146.  
  2147. $(".urgent").change(function(){
  2148. preview_update();
  2149. keepAlive();
  2150. });
  2151.  
  2152. if (window.attachEvent){
  2153. $("#descriere_plata").change(function(){
  2154. preview_update();
  2155. });
  2156. } else {
  2157. $("#descriere_plata").keyup(function(){
  2158. preview_update();
  2159. });
  2160. }
  2161.  
  2162.  
  2163. $("#add_new_benef_toggle").click(function () {
  2164. $("#mask").show();
  2165.  
  2166. $("body").scrollTop(0);
  2167.  
  2168. //pt ie8
  2169. if (document.querySelectorAll){
  2170. document.documentElement.scrollTop = 0
  2171. }
  2172.  
  2173. $("body").css("overflow-y", "hidden");
  2174.  
  2175.  
  2176. $("#nume_benef").val("");
  2177. $("#alias_benef").val("");
  2178. $("#cont_benef").val("");
  2179. $("#benef_bank_name").val("");
  2180. $("#benef_legal_id").val("");
  2181. $("#adresa_benef").val("");
  2182.  
  2183. $(".has_mob[value='2']").prop('checked',true);
  2184.  
  2185. $("#nume_benef").blur();
  2186. $("#alias_benef").blur();
  2187. $("#cont_benef").blur();
  2188. $("#benef_bank_name").blur();
  2189. $("#benef_legal_id").blur();
  2190. $("#adresa_benef").blur();
  2191.  
  2192. keepAlive();
  2193.  
  2194. });
  2195.  
  2196. // $("#create_new_benef").click(function () {
  2197. // create_benef();
  2198.  
  2199. // })
  2200.  
  2201. $("#close_create_new_benef").click(function () {
  2202. $("#mask").hide();
  2203. $("body").css("overflow-y", "auto");
  2204. keepAlive();
  2205. });
  2206.  
  2207. $("#ok_2").click(function(){
  2208. confirmOK();
  2209. });
  2210.  
  2211.  
  2212.  
  2213. //pt creare benef
  2214. $("#cont_benef").keyup(function(){
  2215.  
  2216. autocomplete();
  2217.  
  2218. });
  2219.  
  2220. $("#cont_benef").keydown(function(){
  2221.  
  2222. autocomplete();
  2223.  
  2224. });
  2225.  
  2226. $("#cont_benef").change(function(){
  2227.  
  2228. autocomplete();
  2229.  
  2230. });
  2231.  
  2232.  
  2233. $("#cont_benef").select(function(){
  2234.  
  2235. autocomplete();
  2236.  
  2237. });
  2238.  
  2239. $("#cont_benef").bind('paste', function(){
  2240.  
  2241. autocomplete();
  2242.  
  2243. });
  2244.  
  2245.  
  2246. $("#create_new_benef").click(function(){
  2247.  
  2248. var n_name = $("#nume_benef").val().trim();
  2249. var n_alias = $("#alias_benef").val().trim();
  2250. var n_account = $("#cont_benef").val().trim();
  2251. var n_bank_name = $("#benef_bank_name").val().trim();
  2252. var n_legal_id = $("#benef_legal_id").val().trim();
  2253. var n_address = $("#adresa_benef").val().trim();
  2254. var benef_mob = 2;
  2255.  
  2256. if($("#mobile_area")!=undefined){
  2257.  
  2258. benef_mob=$(".has_mob:checked").val();
  2259.  
  2260. }
  2261.  
  2262.  
  2263. //ma asigur ca daca am o versiune de IE prost(pana in 8)
  2264. //pseudoplaceholder-ul este ignorat
  2265. if (window.attachEvent){
  2266.  
  2267. if (n_name === $("#nume_benef").attr('placeholder')){
  2268. n_name = '';
  2269. }
  2270. if (n_alias === $("#alias_benef").attr('placeholder')){
  2271. n_alias = '';
  2272. }
  2273. if (n_account === $("#cont_benef").attr('placeholder')){
  2274. n_account = '';
  2275. }
  2276.  
  2277. if (n_bank_name === $("#benef_bank_name").attr('placeholder')){
  2278. n_bank_name = '';
  2279. }
  2280. if (n_legal_id === $("#benef_legal_id").attr('placeholder')){
  2281. n_legal_id = '';
  2282. }
  2283.  
  2284. if (n_address === $("#adresa_benef").attr('placeholder')){
  2285. n_address = '';
  2286. }
  2287. }
  2288.  
  2289. var has_name = true;
  2290. var has_account = true;
  2291. var has_address = true;
  2292. var has_bank_name = true;
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298. if (n_name === ''){
  2299. $("#nume_benef").css("border", "1px solid red");
  2300. has_name = false;
  2301. } else {
  2302. $("#nume_benef").css("border", "1px solid darkgrey");
  2303. }
  2304.  
  2305. if (n_account === ''){
  2306. $("#cont_benef").css("border", "1px solid red");
  2307. has_account = false;
  2308. } else {
  2309. $("#cont_benef").css("border", "1px solid darkgrey");
  2310. }
  2311.  
  2312. if (n_address === ''){
  2313. $("#adresa_benef").css("border", "1px solid red");
  2314. has_address = false;
  2315. } else {
  2316. $("#adresa_benef").css("border", "1px solid darkgrey");
  2317. }
  2318.  
  2319. if (n_bank_name === ''){
  2320. $("#benef_bank_name").css("border", "1px solid red");
  2321. has_bank_name = false;
  2322. } else {
  2323. $("#benef_bank_name").css("border", "1px solid darkgrey");
  2324. }
  2325.  
  2326.  
  2327.  
  2328.  
  2329. if (!has_name || !has_account || !has_address || !has_bank_name ){
  2330. show_dialog("<%= Message.getMessage("op.error.benef.failed.labels", "op", request) %>", "<%= Message.getMessage("op.error.exception.title", "op", request) %>");
  2331.  
  2332. return;
  2333. }
  2334.  
  2335. validateBenef();
  2336.  
  2337. //keepAlive();
  2338. });
  2339.  
  2340. banks = $.parseJSON($("#bankList").val());
  2341. //end creare benef
  2342.  
  2343. ifView(); //daca se vizualizeaza un PO existent
  2344.  
  2345. ifGenerate(); //daca se creeaza un PO dintr-un template
  2346.  
  2347. ifBenef(); //daca se creeaza un PO din pagina de beneficiari cu beneficiar preselectat
  2348.  
  2349.  
  2350. if (window.attachEvent){
  2351. $("#transaction_sum").hide();
  2352. $("#transaction_sum_ie").show();
  2353. $("#transaction_sum_ie").blur();
  2354. }
  2355.  
  2356. });
  2357.  
  2358.  
  2359. function validateSum(){
  2360. if (!sum_test.test($("#transaction_sum_ie").val()) && !sum_test_2.test($("#transaction_sum_ie").val()) ){
  2361. //suma invalida
  2362.  
  2363. show_dialog("<%= Message.getMessage("op.ie.sum.error.msg", "op", request) %>", "<%= Message.getMessage("op.ie.sum.error.title", "op", request) %>");
  2364. $("#transaction_sum_ie").css("border", "1px solid red");
  2365.  
  2366. } else {
  2367. $("#transaction_sum_ie").css("border", "1px solid darkgray");
  2368. }
  2369.  
  2370. //update de preview
  2371. preview_update();
  2372. }
  2373.  
  2374.  
  2375. function showAuth() {
  2376. var sec = true;
  2377.  
  2378. <% if (request.getAttribute("noSec") != null) { %>
  2379. sec = false;
  2380. <% } %>
  2381.  
  2382. if (sec) {
  2383. uid = Math.random() * 1000000 + "";
  2384. uid = uid.split(".")[0];
  2385.  
  2386. $("iframe").attr('src', "/iBankWeb/auth/tokenlist.do?redirect=jBdXLBMwUmhe0Eks5aubMpEVc1ZB%7BV0F64wcqamb7Ax%7Bi5qHKOd/uQ%3D%3D");
  2387.  
  2388.  
  2389.  
  2390.  
  2391. $(auth_area_mask).show();
  2392.  
  2393. } else {
  2394. postScript();
  2395. }
  2396.  
  2397.  
  2398. }
  2399.  
  2400. function hide_auth(){
  2401. $("#auth_area_mask").hide();
  2402. $('html').css('overflow', 'auto');
  2403. }
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413. function reverse(s) {
  2414. var o = '';
  2415. for (var i = s.length - 1; i >= 0; i--)
  2416. o += s[i];
  2417. return o;
  2418. }
  2419.  
  2420.  
  2421.  
  2422.  
  2423. var model = "";
  2424. //face formatarea
  2425.  
  2426. function format_num(num){
  2427. model = num + "";
  2428. model = model.replace(/\D/g,''); //elimin caracterele care nu sunt numerice
  2429.  
  2430.  
  2431.  
  2432. new_model = "";
  2433. index = 2;
  2434. //adaug separatori
  2435. for (var i = model.length; i > 0; i--){
  2436. new_model += model[i - 1];
  2437.  
  2438. if (index % 3 == 0 && i > 1){
  2439. if (index == 3){
  2440. new_model += separator_digit;
  2441. } else{
  2442. new_model += separator_pack;
  2443. }
  2444.  
  2445. }
  2446. index++;
  2447. }
  2448.  
  2449. new_model = reverse(new_model);
  2450. //ma asigur ca afisez ce trebuie in cazul in care incepem cu zero un numar supraunitar
  2451. if (new_model.length > 4 && new_model[0] ==='0'){
  2452. new_model = new_model.substring(1);
  2453. } else if (new_model.length === 2){ //cazurile in care numarul e subunitar
  2454. new_model = '0' + separator_digit + new_model;
  2455. } else if (new_model.length === 1){
  2456. new_model = '0' + separator_digit + '0' + new_model;
  2457. }
  2458.  
  2459. return new_model;
  2460.  
  2461. }
  2462.  
  2463.  
  2464. var do_autoformat = function(param){
  2465. if (!window.attachEvent) {
  2466. var target = document.getElementById("transaction_sum");
  2467. model = param == null ? target.value : model;
  2468. model = model.replace(/\D/g,''); //elimin caracterele care nu sunt numerice
  2469.  
  2470.  
  2471.  
  2472. new_model = "";
  2473. index = 2;
  2474. //adaug separatori
  2475. for (var i = model.length; i > 0; i--){
  2476. new_model += model[i - 1];
  2477.  
  2478. if (index % 3 == 0 && i > 1){
  2479. if (index == 3){
  2480. new_model += separator_digit;
  2481. } else{
  2482. new_model += separator_pack;
  2483. }
  2484.  
  2485. }
  2486. index++;
  2487. }
  2488.  
  2489. new_model = reverse(new_model);
  2490. //ma asigur ca afisez ce trebuie in cazul in care incepem cu zero un numar supraunitar
  2491. if (new_model.length > 4 && new_model[0] ==='0'){
  2492. new_model = new_model.substring(1);
  2493. } else if (new_model.length === 2){ //cazurile in care numarul e subunitar
  2494. new_model = '0' + separator_digit + new_model;
  2495. } else if (new_model.length === 1){
  2496. new_model = '0' + separator_digit + '0' + new_model;
  2497. }
  2498. if (new_model.length > 4){
  2499. if (new_model.substring(0,2) === '.0'){
  2500. new_model = new_model.substring(2);
  2501. } else if (new_model.substring(0,2) === '0.') {
  2502. new_model = new_model.substring(2);
  2503. } else if (new_model.substring(0,1) === '0'){
  2504. new_model = new_model.substring(1);
  2505. } else if (new_model.substring(0,1) === '.'){
  2506. new_model = new_model.substring(1);
  2507. }
  2508.  
  2509.  
  2510.  
  2511. }
  2512.  
  2513. var three = new_model.replace(/\D/g,'');
  2514. var s = 0;
  2515. for (i = 0; i < three.length; i++){
  2516. s += three[i];
  2517. }
  2518.  
  2519. if (s == 0 && three.length > 4){
  2520. new_model = '0' + separator_digit + '00';
  2521. }
  2522.  
  2523. target.value = new_model;
  2524. model = new_model;
  2525. }
  2526. }
  2527.  
  2528.  
  2529.  
  2530. function prepare_for_IE8(){
  2531.  
  2532. }
  2533.  
  2534. //asigura inserarea caracterelor oriunde in textul din inputul cu suma tranzactiei
  2535. function keyHandler(){
  2536. if (!window.attachEvent) {
  2537. var elem = document.getElementById("transaction_sum");
  2538. var before;
  2539. var after;
  2540. event.cancelBubble = true;
  2541. if ( elem === document.activeElement){
  2542. var key = event.keyCode || event.charCode;
  2543. if (key >= 48 && key <= 57){
  2544. before = model.slice(0, elem.selectionStart);
  2545. after = model.slice(elem.selectionStart, model.length)
  2546. model = before + ""+ (key-48) + after;
  2547. }
  2548. }
  2549.  
  2550.  
  2551. do_autoformat("p");
  2552.  
  2553. }
  2554.  
  2555. }
  2556.  
  2557. </SCRIPT>
  2558. <!--[if lte IE 8]>
  2559. <script>
  2560. function prepare_for_IE8() {
  2561.  
  2562. }
  2563.  
  2564.  
  2565.  
  2566. var do_autoformat = function(){
  2567. /* var target = document.getElementById("transaction_sum");
  2568. model = target.value;
  2569. model = model.replace(/\D/g,''); //elimin caracterele care nu sunt numerice
  2570.  
  2571.  
  2572.  
  2573. new_model = "";
  2574. index = 2;
  2575. //adaug separatori
  2576. for (var i = model.length; i > 0; i--){
  2577. new_model += model[i - 1];
  2578.  
  2579. if (index % 3 == 0 && i > 1){
  2580. if (index == 3){
  2581. new_model += separator_digit;
  2582. } else{
  2583. new_model += separator_pack;
  2584. }
  2585.  
  2586. }
  2587. index++;
  2588. }
  2589.  
  2590. new_model = reverse(new_model);
  2591. //ma asigur ca afisez ce trebuie in cazul in care incepem cu zero un numar supraunitar
  2592. if (new_model.length > 4 && new_model[0] ==='0'){
  2593. new_model = new_model.substring(1);
  2594. } else if (new_model.length === 2){ //cazurile in care numarul e subunitar
  2595. new_model = '0' + separator_digit + new_model;
  2596. } else if (new_model.length === 1){
  2597. new_model = '0' + separator_digit + '0' + new_model;
  2598. }
  2599.  
  2600.  
  2601.  
  2602. target.value = new_model; */
  2603. }
  2604. /*
  2605. function makeAutoformatWork(){
  2606. $("#transaction_sum").attr("onkeyup", "do_autoformat();");
  2607. $("#transaction_sum").attr("onkeydown", "do_autoformat();");
  2608. $("#transaction_sum").attr("onkeypress", "do_autoformat();");
  2609.  
  2610. }
  2611.  
  2612. $(function (){
  2613. makeAutoformatWork();
  2614. });
  2615. */
  2616. </script>
  2617. <style>
  2618.  
  2619. </style>
  2620. <![endif]-->
  2621.  
  2622.  
  2623. <SCRIPT TYPE="text/javascript" SRC="../javascript/tooltip.js"></SCRIPT>
  2624. <DIV id=dHTMLToolTip style="LEFT: 0px; POSITION: absolute; TOP: 0px; Z-INDEX: 1000; padding: right; font-size: 13px"></DIV>
  2625. <div id="preview_dpv_content">
  2626. <div id = "div_preview_client_iban" class = "previewDivField"><b class="dpv_preview_title"><bean:message key="op.create.preview.ord_account"/>:</b> <div id = "preview_client_iban" class = "previewDivFieldValue">-</div></div>
  2627. <div id = "div_preview_benef_nume" class = "previewDivField"><b class="dpv_preview_title"><bean:message key="op.create.preview.ben_name"/>:</b><div id = "preview_benef_nume" class = "previewDivFieldValue">-</div></div>
  2628. <div id = "div_preview_benef_cont" class = "previewDivField"><b class="dpv_preview_title"><bean:message key="op.create.preview.ben_account"/>:</b> <div id = "preview_benef_cont" class = "previewDivFieldValue">-</div></div>
  2629. <div id = "div_preview_suma" class = "previewDivField"><b class="dpv_preview_title"><bean:message key="op.create.preview.suma"/>:</b> <div id = "preview_suma" class = "previewDivFieldValue">-</div></div>
  2630. <div id = "div_preview_nr_ording" class = "previewDivField"><b class="dpv_preview_title"><bean:message key="op.create.preview.nr_ordin"/>:</b> <div id = "preview_nr_ordin" class = "previewDivFieldValue">-</div></div>
  2631. <div id = "div_preview_nr_fiscal" class = "previewDivField"><b class="dpv_preview_title"><bean:message key="op.create.preview.nr_fiscal"/>:</b> <div id = "preview_nr_fiscal" class = "previewDivFieldValue">-</div></div>
  2632. <div id = "div_preview_urgent" class = "previewDivField"><b class="dpv_preview_title"><bean:message key="op.create.preview.urgent"/>:</b> <div id = "preview_urgent" class = "previewDivFieldValue">-</div></div>
  2633. <div id = "div_preview_descriere" class = "previewDivField" style="overflow: auto"><b class="dpv_preview_title"><bean:message key="op.create.preview.descriere"/>:</b> <div id = "preview_descriere" class = "previewDivFieldValue">-</div></div>
  2634. </div>
  2635. <div id="create_dpv_content">
  2636.  
  2637.  
  2638. <div id="selectare_cont">
  2639.  
  2640. <!-- aici afisez conturile clientului -->
  2641.  
  2642.  
  2643. <b class="dpv_subtitle" style="display: block; margin-top: 10px"><bean:message key="op.create.account_sel_title"/><span style="color:#BD3826"> * </span></b>
  2644. <select id="account_select">
  2645. <option value="none" checked><bean:message key="op.create.account_sel"/></option>
  2646. <!-- aici pun fiecare cont -->
  2647. <%
  2648. AccountData accData = null;
  2649. String iban_account = "";
  2650.  
  2651. for (Object account : accounts.getData()){
  2652. accData = (AccountData) account;
  2653. iban_account = ((accData.getIban() == null) ? "-" : accData.getIban());
  2654. %>
  2655.  
  2656. <option value="<%= accData.getIdEbank() %>">
  2657. <%= iban_account + "&nbsp;&nbsp;&nbsp;&nbsp;RON&nbsp;&nbsp;&nbsp;&nbsp" + ro.sdc.common.web.format.NumberFormat.toViewNumber(accData.getBalance(),request) + "&nbsp;&nbsp;&nbsp;&nbsp;" + ((accData.getAlias() == null) ? "-" : accData.getAlias()) %>
  2658.  
  2659. </option>
  2660.  
  2661. <%
  2662. }
  2663.  
  2664. %>
  2665.  
  2666. </select>
  2667.  
  2668. </div>
  2669.  
  2670. <div class="delimit_bar"></div>
  2671. <div id="selectare_beneficiar">
  2672. <b class="dpv_subtitle" style="display: block; margin-top: 10px"><bean:message key="op.create.benef_sel_title"/><span style="color:#BD3826"> * </span></b>
  2673.  
  2674.  
  2675. <!-- aici selectez beneficiarul -->
  2676.  
  2677. <select id="selectare_benef">
  2678. <option value="none" checked><bean:message key="op.create.benef_sel"/> </option>
  2679. <% BenefRolData benef = null;
  2680. for (int i = 0; i<benefs.getData().size(); i++) {
  2681. benef = (BenefRolData)benefs.getData().get(i);
  2682.  
  2683. %>
  2684. <option value="<%= benef.getBenefId() %>" benef="<%= benef.getBenefName() %>">
  2685.  
  2686. <%= benef.getBenefName() + "&nbsp;&nbsp;&nbsp;&nbsp;" + benef.getBenefAccount() + "&nbsp;&nbsp;&nbsp;&nbsp;" + benef.getBenefAlias() %>
  2687.  
  2688. </option>
  2689.  
  2690.  
  2691. <% } %>
  2692.  
  2693. </select>
  2694.  
  2695. <!-- de aici voi putea sa si creez un beneficiar -->
  2696. <button id="add_new_benef_toggle" class="button" style="margin-left: 5px"><bean:message key="op.create.add_benef_button"/></button>
  2697.  
  2698.  
  2699. <div id = "mask" style="display: none; overflow: auto">
  2700. <div id="benef_adder_div">
  2701. <div id="add_new_benef">
  2702. <div id="inner_new_benef">
  2703. <div style=" width:290px; text-align: center; margin-bottom: 5px;"><b class="dpv_subtitle" ><bean:message key="op.create.benef.title"/></b>
  2704. <div id="new_benef" >
  2705. <input type="text" id="nume_benef" name="benefName" placeholder="<bean:message key="op.create.benef.name"/>" style="width: 260px" maxlength="50">&nbsp;&nbsp;<span class="star">*</span><br>
  2706. <input type="text" id="alias_benef" name="benefAlias" placeholder="<bean:message key="op.create.benef.alias"/>" style="width: 260px" maxlength="40">&nbsp;&nbsp;&nbsp;&nbsp;<br>
  2707. </div>
  2708. <div id="new_benef_bank">
  2709. <input type="text" id="cont_benef" name="benefAccount" placeholder="<bean:message key="op.create.benef.ben_account"/>" style="width: 260px" maxlength="40">&nbsp;&nbsp;<span class="star">*</span><br>
  2710. <input type="hidden" id="bankList" value='<%= bank_json %>'></input>
  2711. <input type="text" id="benef_bank_name" name="benefBankName" placeholder="<bean:message key="op.create.benef.bank_name"/>" style="width: 260px"maxlength="40" readonly>&nbsp;&nbsp;<span class="star">*</span><br>
  2712. <input type="text" id="benef_legal_id" name="benefLegalId" placeholder="<bean:message key="op.create.benef.cnp"/>" style="width: 260px" maxlength="40">&nbsp;&nbsp;&nbsp;&nbsp;<br>
  2713. <div><textarea id="adresa_benef" placeholder="<bean:message key="op.create.benef.address"/>" cols="30" rows="6" style="margin-left: 9px;display: block; float: left;resize:none; margin-top: 5px; margin-bottom: 10px;width: 256px"></textarea>
  2714. <div><span class="star">*</span></div>
  2715.  
  2716. </div><br>
  2717. </div>
  2718. <% if(hasMobileBanking){ %>
  2719. <div id="mobile_area">
  2720. <bean:message key="op.create.benef.mobile.avaliable"/> <input type="radio" name="mobile" class="has_mob" value="1"><bean:message key="op.urgent.preview.yes"/> &nbsp
  2721. <input type="radio" name="mobile" class="has_mob" value="2" checked=true><bean:message key="op.urgent.preview.no"/>
  2722. </div>
  2723. <% } %>
  2724.  
  2725.  
  2726. <div id="new_benef_buttons">
  2727. <button id="create_new_benef" class="button" style="float: left ; width: 40%;">
  2728. <bean:message key="op.create.benef.add_button"/>
  2729. </button>
  2730. <button id="close_create_new_benef" class="button" style="float: right; width: 40%">
  2731. <bean:message key="file.import.back"/>
  2732. </button>
  2733. </div>
  2734. </div>
  2735.  
  2736.  
  2737. </div>
  2738. </div>
  2739. </div>
  2740. </div>
  2741.  
  2742.  
  2743.  
  2744.  
  2745. </div>
  2746.  
  2747. <br>
  2748. <div class="delimit_bar"></div>
  2749. <b class="dpv_subtitle" style="display: block; margin-top: 10px"><bean:message key="op.create.trans.details"/><span style="color:#BD3826"> * </span></b>
  2750.  
  2751.  
  2752.  
  2753.  
  2754. <input type="text" placeholder="<bean:message key="op.create.trans.sum"/>" id="transaction_sum"
  2755. style="width: 260px; margin-right: 25px;text-align:right; padding-right: 5px"
  2756. value="" maxlength="40"
  2757. onchange="do_autoformat();"
  2758. onkeypress="keyHandler(); return false;"
  2759. onpaste="this.onchange();" oninput="this.onchange();">
  2760.  
  2761.  
  2762. <input type="text" placeholder="<bean:message key="op.create.trans.sum"/>" id="transaction_sum_ie"
  2763. style="width: 260px; margin-right: 25px;text-align:right; padding-right: 5px; display: none"
  2764. value="" maxlength="40"
  2765. onchange="validateSum();"
  2766. onpaste="validateSum();" >
  2767.  
  2768.  
  2769.  
  2770.  
  2771. <input type="text" min="1" placeholder="<bean:message key="op.create.trans.order_no"/>" id="order_no"
  2772. style="width: 100px; margin-right: 25px;text-align:right; padding-right: 5px"
  2773. value="" maxlength="40"
  2774. >
  2775.  
  2776. <br>
  2777.  
  2778.  
  2779. <div>
  2780. <div style="display: block" id="urgent_div">
  2781. <div style="float: left; width: 230px">Urgent: </div>
  2782. <div style="margin-left: 100px; display: inline">
  2783. <input type="radio" class="urgent" name="urgent" value="yes"> <bean:message key="op.label.yes"/>
  2784. <input type="radio" class="urgent" name="urgent" value="no" checked><bean:message key="op.label.no"/>
  2785. </div>
  2786. <div id="tax">
  2787. <p><bean:message key="op.create.alert.urgent.pay"/></p>
  2788. </div>
  2789. </div>
  2790. <!-- <div style="display: block">
  2791. <div style="float: left; width: 230px"><bean:message key="op.label.verifyBalance"/> </div>
  2792. <div style="margin-left: 100px; display: inline">
  2793. <input type="radio" class="verify" name="verify" value="yes"> <bean:message key="op.label.yes"/>
  2794. <input type="radio" class="verify" name="verify" value="no" checked><bean:message key="op.label.no"/>
  2795. </div>
  2796. </div>
  2797. <div style="display: block" id="lastRadioDiv">
  2798. <div style="float: left; width: 230px"><bean:message key="op.label.verifyDuplicate"/> </div>
  2799. <div style="margin-left: 100px; display: inline">
  2800. <input type="radio" class="duplicate" name="duplicate" value="yes"> <bean:message key="op.label.yes"/>
  2801. <input type="radio" class="duplicate" name="duplicate" value="no" checked><bean:message key="op.label.no"/>
  2802. </div>
  2803. </div> -->
  2804. <div>
  2805. <input type="text" min="0" placeholder="<bean:message key="op.create.trans.fiscal_id"/>" id="fiscal_id"
  2806. style="width: 224px; margin-right: 25px; text-align:right; padding-right: 5px; display: none"
  2807. value="" maxlength="40"
  2808. >
  2809. </div>
  2810. </div>
  2811.  
  2812.  
  2813. <div class="delimit_bar"></div>
  2814.  
  2815.  
  2816.  
  2817.  
  2818. <div id="div_descriere_plata">
  2819. <b class="dpv_subtitle" style="display: block; margin-top: 10px"><bean:message key="op.create.benef_msg"/><span style="color:#BD3826"> * </span></b>
  2820. <!-- formular pentru mesaj beneficiar -->
  2821. <textarea id="descriere_plata" placeholder="<bean:message key="op.create.benef_msg_placeholder"/>" cols="40" rows="6" style="resize:none"></textarea>
  2822. </div>
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829. <div class="delimit_bar"></div>
  2830. <br>
  2831. <div id="button_description">
  2832. <p><bean:message key="op.create.description.save"/></p>
  2833. <p><bean:message key="op.create.description.approve"/></p>
  2834. </div>
  2835. <div id="incheiere" style="bottom: 10px; display: block; height: 40px">
  2836. <button id="save_button" class="button"> <bean:message key="op.create.save_button"/> </button>
  2837. <% if (((Byte)request.getAttribute("appRights")).byteValue() != Constants.OPERATOR ) { %>
  2838. <button id="approve_button" class="button"> <bean:message key="op.create.approve_button"/> </button>
  2839. <% if (request.getParameter("view") != null) { %>
  2840. <button id="reject_button" class="button"> <%=Message.getMessageBundle("button.reject",org.apache.struts.Globals.MESSAGES_KEY,request)%> </button>
  2841. <% } %>
  2842. <% } %>
  2843. </div>
  2844. <br>
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850. </div>
  2851. <div id="spin_mask">
  2852. <img id="loading_img" src="../images/loading.gif" style="display:none;position:absolute;top:50%;left:50%;right:50%;bottom:50%">
  2853. </div>
  2854. <div id="auth_area_mask">
  2855. <div id="auth_area">
  2856. <div style="display: block; width: 5px; float: right; margin-top: 5px; margin-right: 10px" id="close_auth" class="dialog_close">X </div>
  2857. <div id="auth_content" style="width: 99%; height: 150%; display: block; margin: 0 auto;">
  2858. <iframe src="/iBankWeb/auth/tokenlist.do?redirect=jBdXLBMwUmhe0Eks5aubMpEVc1ZB%7BV0F64wcqamb7Ax%7Bi5qHKOd/uQ%3D%3D" onLoad="removeTop();" style="width: 90%; height: 90%; margin-top: 25px; border: white; margin-left: 70px;">
  2859.  
  2860.  
  2861. </iframe>
  2862. </div>
  2863. </div>
  2864. </div>
  2865.  
  2866.  
  2867. <%@ include file="../commonjspf/i.bottom.jspf" %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement