cariModul.html 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036
  1. <html xml:lang="tr" lang="tr" xmlns="http://www.w3.org/1999/xhtml">
  2. <head>
  3. <title>CARI</title>
  4. <meta http-equiv="content-type" contentType="text/html; charset=UTF-8">
  5. <link rel="stylesheet" href="./static/css/reset.css" />
  6. <script src="../static/jquery.js"></script>
  7. <script src="../static/js/jquery-ui.js"></script>
  8. <script src="./static/js/datetimepicker.js"></script>
  9. <script type="text/javascript" src="./static/js/jquery.maskedinput.min.js"></script>
  10. <script src="../static/js/jquery.form.min.js"></script>
  11. <script src="../static/js/jquery.handsontable.full.js"></script>
  12. <script src="../static/js/hintbox.js"></script>
  13. <script src="./static/js/jquery.cookie.js"></script>
  14. <link rel="stylesheet" href="./static/css/hintbox.css" />
  15. <link rel="stylesheet" href="./static/js/themes/smoothness/jquery-ui.css" />
  16. <link rel="stylesheet" href="./static/css/jquery.handsontable.full.css" />
  17. <script src="{{url_for('static', filename='js/jquery.tablesorter.min.js')}}"></script>
  18. <script src="./static/js/jquery.blockUI.js"></script>
  19. <link rel="stylesheet" href="{{url_for('static', filename='css/table2.css')}}" type="text/css" id="" media="print, projection, screen">
  20. <style type="text/css">
  21. body {
  22. margin: 0px auto;
  23. padding: 0px 0px;
  24. font-family: tahoma;
  25. }
  26. .anasablon {
  27. width: 1556px;
  28. height: auto;
  29. }
  30. .mheader {
  31. font-family: Tahoma;
  32. text-shadow: 2px 2px 2px #ccc;
  33. display: block;
  34. float: left;
  35. padding-left: 10px;
  36. text-align: left;
  37. font-size: 15px;
  38. width: 1300px;
  39. height: 15px;
  40. }
  41. .formblock {
  42. display: block;
  43. margin-bottom: 2px;
  44. float: left;
  45. }
  46. .formblock label {
  47. margin-left: 2px;
  48. display: block;
  49. font-style: italic;
  50. font-weight: bold;
  51. font-family: Georgia, "Times New Roman", Times, serif;
  52. font-size: 12px;
  53. color: black;
  54. }
  55. .formblock select {
  56. padding: 1px 0px 1px 0px;
  57. font-size: 12px;
  58. font-family: Arial, Tahoma, sans-serif;
  59. color: #666;
  60. width: 90px;
  61. }
  62. .formblock2{
  63. float:left;
  64. width:150;
  65. height:auto;
  66. border:#CCC solid 0px;
  67. background-color: solid ;
  68. margin-right: 10px;
  69. margin-left: 4px;
  70. font-family:monospace;
  71. font-weight: bold;
  72. }
  73. .formalan{
  74. float:left;
  75. width:340px;
  76. height:700px;
  77. border:#CCC solid 1px;
  78. background-color: #3388BB;
  79. margin-right: 10px;
  80. margin-left: 5px;
  81. font-family:monospace;
  82. font-weight: bold;
  83. }
  84. .raporalan{
  85. float:right;
  86. width:1150px;
  87. height:700px;
  88. border:#Cf0 solid 1px;
  89. background-color:#3388BB;
  90. margin-right: 10px;
  91. margin-left: 4px;
  92. font-family:monospace;
  93. font-weight: bold;
  94. overflow: scroll;
  95. }
  96. .operbutonlar{
  97. width:auto;
  98. margin:10 ;
  99. font-family:monospace;
  100. font-weight: bold;
  101. }
  102. .element{
  103. width:auto;
  104. margin: 10 ;
  105. float:left;
  106. font-family:monospace;
  107. }
  108. p{
  109. margin:5px 0;
  110. }
  111. .mheader,.formalan,.raporalan{
  112. margin: 3px;
  113. padding: 10px;
  114. background: #3388bb;
  115. border: 1px solid #cccccc;
  116. -moz-border-radius: 6px;
  117. -webkit-border-radius: 6px;
  118. border-radius: 6px;
  119. -moz-box-shadow: 2px 2px 2px #cccccc;
  120. -webkit-box-shadow: 2px 2px 2px #cccccc;
  121. box-shadow: 2px 2px 2px #cccccc;
  122. }
  123. .stkHeader {
  124. font-family: Arial, Verdana;
  125. text-shadow: 2px 2px 2px #AAA;
  126. display: block;
  127. float: left;
  128. font-weight: bold;
  129. padding-left: 10px;
  130. text-align: center;
  131. font-size: 22px;
  132. width: 100%;
  133. height: 35px;
  134. }
  135. .pageContainer {
  136. width: 1556px;
  137. height: auto;
  138. }
  139. .stkHeader,.stkContainer,.stkHareket,.stkFatura, .infoCenter {
  140. margin: 1px;
  141. padding: 15px;
  142. background: #3388BB;
  143. border: 1px solid #DDDDDD;
  144. -moz-border-radius: 6px;
  145. -webkit-border-radius: 6px;
  146. border-radius: 6px;
  147. -moz-box-shadow: 2px 2px 2px #DDDDDD;
  148. -webkit-box-shadow: 2px 2px 2px #DDDDDD;
  149. box-shadow: 4px 4px 4px #DDDDDD;
  150. }
  151. .button {
  152. display: inline-block;
  153. zoom: 1; /* zoom and *display = ie7 hack for display:inline-block */
  154. *display: inline;
  155. vertical-align: baseline;
  156. margin: 0 2px;
  157. outline: none;
  158. cursor: pointer;
  159. text-align: center;
  160. text-decoration: none;
  161. font: 14px/100% Arial, Helvetica, sans-serif;
  162. padding: .5em 2em .55em;
  163. text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
  164. -webkit-border-radius: 7px;
  165. -moz-border-radius: 7px;
  166. border-radius: 7px;
  167. -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  168. -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  169. box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  170. }
  171. .button:hover {
  172. text-decoration: none;
  173. }
  174. .button:active {
  175. position: relative;
  176. top: 1px;
  177. }
  178. .medium {
  179. font-size: 12px;
  180. padding: .32em 1.1em .32em;
  181. }
  182. .small {
  183. font-size: 11px;
  184. padding: .3em 1em .3em;
  185. }
  186. /* gray */
  187. .gray {
  188. color:black;
  189. font-weight: bold;
  190. border: solid 1px #999;
  191. background: #6e6e6e;
  192. background: -webkit-gradient(linear, left top, left bottom, from(#888),
  193. to(#575757));
  194. background: -moz-linear-gradient(top, #888, #575757);
  195. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#888888',
  196. endColorstr='#575757');
  197. }
  198. .gray:hover {
  199. background: #616161;
  200. background: -webkit-gradient(linear, left top, left bottom, from(#757575),
  201. to(#4b4b4b));
  202. background: -moz-linear-gradient(top, #757575, #4b4b4b);
  203. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#757575',
  204. endColorstr='#4b4b4b');
  205. }
  206. .gray:active {
  207. color: #afafaf;
  208. background: -webkit-gradient(linear, left top, left bottom, from(#575757),
  209. to(#888));
  210. background: -moz-linear-gradient(top, #575757, #888);
  211. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#575757',
  212. endColorstr='#888888');
  213. }
  214. </style>
  215. <script>
  216. var sigc = 0;
  217. $(document).ready(function() {
  218. var d = new Date();
  219. var month = d.getMonth()+1;
  220. var day = d.getDate();
  221. var output = (day<10 ? '0' : '') + day + '-' +(month<10 ? '0' : '') + month + '-' + d.getFullYear() ;
  222. var outputbas=('1-1-' + d.getFullYear()) ;
  223. $('#cariYasTrh').val(output);
  224. $('#hrkSonTrh').val(output);
  225. $('#hrkBasTrh').val(outputbas);
  226. //cari adindan arama
  227. $("#ad").autocomplete({
  228. source : "/cariBul",
  229. type: "POST",
  230. minLength : 3,
  231. remoteDataType : 'json',
  232. autoFill : true,
  233. //select : secilenCariGetir
  234. });
  235. $('#kod').keypress(function(event){return event.keyCode != 13;});
  236. $('#ad').keypress(function(event){return event.keyCode != 13;});
  237. /*
  238. $('#ad').on('blur', function(event){
  239. var opcgozlem = {
  240. url: "/cHareketGozlem",
  241. target:"#bilgi",
  242. DataType : 'json',
  243. type: "POST",
  244. success: hareketGozlemDonus
  245. };
  246. $('#cariModulform').ajaxSubmit(opcgozlem);
  247. });
  248. */
  249. $('#kod').keypress(function(event){
  250. if(event.keyCode ==13 || event.keyCode ==9){
  251. $.ajax({
  252. url : "/cariNesneGetir?kriter=kod&kod=" + $('#kod').val(),
  253. }).done(function(data) {
  254. if(data !=""){
  255. $('#bilgi').html("");
  256. cariBilgiDoldur(data);
  257. }else{
  258. errorHandler("Cari Bulunamadı!");
  259. cariBilgiBosalt();
  260. }
  261. });
  262. }
  263. });
  264. $('#ad').keypress(function(event){
  265. if(event.keyCode ==13 || event.keyCode ==9){
  266. $.ajax({
  267. url : "/cariNesneGetir?kriter=ad&ad=" + $('#ad').val(),
  268. }).done(function(data) {
  269. if(data && data !=""){
  270. $('#bilgi').html("");
  271. cariBilgiDoldur(data);
  272. }else{
  273. errorHandler("Cari Bulunamadı!");
  274. cariBilgiBosalt();
  275. }
  276. });
  277. }
  278. });
  279. $('#cariYasTrh').on('blur', function(event){
  280. var opcgozlem = {
  281. url: "/cariYaslandir",
  282. //target:"#hareketGozlem",
  283. target:"#bilgi",
  284. DataType : 'json',
  285. type: "POST",
  286. success: hareketGozlemDonus
  287. };
  288. $('#cariModulform').ajaxSubmit(opcgozlem);
  289. });
  290. $('#hrkSonTrh').on('blur', function(event){
  291. var opcgozlem = {
  292. url: "/cHareketGozlem2",
  293. //target:"#hareketGozlem",
  294. target:"#bilgi",
  295. DataType : 'json',
  296. type: "POST",
  297. success: function (data,status){
  298. var win=window.open('about:blank');
  299. with(win.document)
  300. {
  301. open();
  302. write(data);
  303. close();
  304. }
  305. }
  306. };
  307. $('#cariModulform').ajaxSubmit(opcgozlem);
  308. });
  309. $('#cariGozlem').on('click', function(event){
  310. event.preventDefault();
  311. $('#chgun').val('-1');
  312. chGozlem();
  313. });
  314. $('#cariGozlemH').on('click', function(event){
  315. event.preventDefault();
  316. $('#chgun').val('7');
  317. chGozlem();
  318. });
  319. $('#cariGozlemAy').on('click', function(event){
  320. event.preventDefault();
  321. $('#chgun').val('0');
  322. chGozlem();
  323. });
  324. $('#cariGozlemAy2').on('click', function(event){
  325. event.preventDefault();
  326. $('#chgun').val('30');
  327. chGozlem();
  328. });
  329. $('#cariKaydet').on('click', function(event){
  330. event.preventDefault();
  331. var opcarikaydet = {
  332. url: "/cariKaydet",
  333. type: "POST",
  334. DataType : 'json',
  335. //cari icin sahalarin kontrolu
  336. beforeSubmit : cariKayitKontrol,
  337. //success : fatuKayitDonus
  338. success: function (data, status) {
  339. succesHandler(data);
  340. }
  341. };
  342. $('#cariModulform').ajaxSubmit(opcarikaydet);
  343. });
  344. $('#cariSil').on('click', function(event){
  345. event.preventDefault();
  346. $.ajax({
  347. url : "/cariSil?kod=" + $('#kod').val(),
  348. }).done(function(data) {
  349. succesHandler(data);
  350. });
  351. });
  352. $('#chTarih').datepicker({
  353. dateFormat: 'dd-mm-yy',
  354. dayNamesMin: [ "Pz", "Pt", "Sa", "Ca", "Pe", "Cu", "Ct" ],
  355. monthNames: [ "Ocak", "Subat", "Mart", "Nisan", "Mayis", "Haziran", "Temmuz", "Agustos", "Eylul", "Ekim", "Kasim", "Aralik" ],
  356. duration: 1,
  357. firstDay: 1,
  358. defaultDate: +7,
  359. minDate: new Date(2018, 0, 1),
  360. maxDate: new Date(2019, 11, 31),
  361. }).mask('99-99-9999');
  362. $('#chvdTarih').datepicker({
  363. dateFormat: 'dd-mm-yy',
  364. dayNamesMin: [ "Pz", "Pt", "Sa", "Ca", "Pe", "Cu", "Ct" ],
  365. monthNames: [ "Ocak", "Subat", "Mart", "Nisan", "Mayis", "Haziran", "Temmuz", "Agustos", "Eylul", "Ekim", "Kasim", "Aralik" ],
  366. duration: 1,
  367. firstDay: 1,
  368. defaultDate: +7,
  369. minDate: new Date(2018, 0, 1),
  370. maxDate: new Date(2019, 11, 31),
  371. }).mask('99-99-9999');
  372. //guncel tarih ayarlama
  373. var d = new Date();
  374. var month = d.getMonth()+1;
  375. var day = d.getDate();
  376. var output = (day<10 ? '0' : '') + day + '-' +(month<10 ? '0' : '') + month + '-' + d.getFullYear() ;
  377. $('#chTarih').val(output);
  378. $('#chvdTarih').val(output);
  379. $('#chTutar').on('blur', function(event){
  380. if( $("#kod").val() && $("#chTutar").val() && $("#chTarih").val() && $("#chvdTarih").val() && $("#chFisno").val() ) {
  381. var opch = {
  382. url: "/chEkle",
  383. type: "post",
  384. target:"#bilgi",
  385. dataType: "json",
  386. success : hareketGozlem
  387. };
  388. $('#cariModulform').ajaxSubmit(opch);
  389. $("#ad").focus();
  390. } else {
  391. errorHandler("boş sahalar var!");
  392. }
  393. });
  394. $('#caharGonder').on('click', function(event){
  395. event.preventDefault();
  396. var opcgozlem = {
  397. url: "/caharGonder",
  398. //target:"#hareketGozlem",
  399. //target:"#bilgi",
  400. DataType : 'json',
  401. type: "POST",
  402. success: function (data,status){
  403. var win=window.open('about:blank');
  404. with(win.document)
  405. {
  406. open();
  407. write(data);
  408. close();
  409. }
  410. }
  411. };
  412. $('#cariModulform').ajaxSubmit(opcgozlem);
  413. });
  414. $('#ileri').on('click', function(event){
  415. event.preventDefault();
  416. sigc=parseInt($.cookie('sigc'));
  417. console.log(sigc);
  418. $.cookie('sigc',sigc+1);
  419. diziCariGetir(sigc+1);
  420. });
  421. $('#geri').on('click', function(event){
  422. event.preventDefault();
  423. sigc=parseInt($.cookie('sigc'));
  424. console.log(sigc);
  425. $.cookie('sigc',sigc-1);
  426. diziCariGetir(sigc-1);
  427. });
  428. $('#reset').on('click', function(event){
  429. event.preventDefault();
  430. $.cookie('sigc',-1);
  431. });
  432. $("#chfkod").click(function(event){
  433. event.preventDefault();
  434. $("#chfkod").val("yeni");
  435. });
  436. $("#bilgi").click(function(event){
  437. var tar;
  438. if (event.target) targ = event.target;
  439. else if (event.srcElement) targ = event.srcElement;
  440. if (targ.nodeType == 3) // defeat Safari bug
  441. targ = targ.parentNode;
  442. //console.log(targ.id);
  443. var islem=targ.id.split("@");
  444. var olay=islem[0];
  445. var islem_no=islem[1];
  446. if(olay == "cahar_yukle"){
  447. caharYukle(islem_no);
  448. }
  449. if(olay == "cahar_sil"){
  450. if( confirm("Faturayı silmek İstediğinizden Emin misiniz?") ) {
  451. $.ajax({
  452. url : "/fatuSil?fkod="+islem_no,
  453. }).done(function(data) {
  454. hareketGozlem();
  455. succesHandler(data);
  456. });
  457. }
  458. }
  459. if(olay == "pano_kopya"){
  460. console.log("yapimda");
  461. }
  462. });
  463. $('#cariSorgu').on('click', function(event){
  464. event.preventDefault();
  465. var opgetir = {
  466. url: "/cariSorgu",
  467. //target:"#hareketGozlem",
  468. target:"#bilgi",
  469. DataType : 'json',
  470. type: "POST",
  471. success: hareketGozlemDonus
  472. };
  473. $('#cariModulform').ajaxSubmit(opgetir);
  474. });
  475. $('#carilerAl').on('click', function(event){
  476. event.preventDefault();
  477. var opgetir = {
  478. url: "/cariSorgu2",
  479. DataType : 'json',
  480. type: "POST",
  481. success: sorguDonus
  482. };
  483. $('#cariModulform').ajaxSubmit(opgetir);
  484. });
  485. $('#ckoddeg').on('click', function(event){
  486. event.preventDefault();
  487. var opgetir = {
  488. url: "/carikodDegis",
  489. DataType : 'json',
  490. type: "POST",
  491. success: hareketGozlemDonus
  492. };
  493. $('#cariModulform').ajaxSubmit(opgetir);
  494. });
  495. $("#test").click(function(event){
  496. event.preventDefault();
  497. //"<div class='dialog' title='" + "Fatura Kayıt Onayı" + "'><p>" + "ss" + "</p></div>"
  498. return $( "#dialog-form" )
  499. .dialog({
  500. hide: "hide",
  501. resizable: true,
  502. height:250,
  503. width:500,
  504. modal: true,
  505. buttons: {
  506. "onayla": function() {
  507. $( this ).dialog( "close" );
  508. },
  509. "iptal": function() {
  510. $( this ).dialog( "close" );
  511. }
  512. }
  513. });
  514. });
  515. });
  516. function cariKayitKontrol(formData, jqForm, options) {
  517. var bosKontrol=true;
  518. var hata="";
  519. if($('#kod').val() == ""){
  520. bosKontrol=false;
  521. hata="cari kodu bos olamaz!";
  522. }
  523. if($('#ad').val() == ""){
  524. bosKontrol=false;
  525. hata="cari adi bos olamaz!";
  526. }
  527. if(bosKontrol==false){
  528. errorHandler(hata);
  529. return false;
  530. }
  531. };
  532. function secilenCariGetir() {
  533. $.ajax({
  534. url : "/cariNesneGetir?kriter=ad&ad=" + $('#ad').val(),
  535. }).done(function(data) {
  536. cariBilgiDoldur(data);
  537. //$("#stkMiktar").focus();
  538. });
  539. }
  540. function hareketGozlem(){
  541. var opcgozlem = {
  542. url: "/cHareketGozlem",
  543. //target:"#hareketGozlem",
  544. target:"#bilgi",
  545. DataType : 'json',
  546. type: "POST",
  547. success: hareketGozlemDonus
  548. };
  549. $('#cariModulform').ajaxSubmit(opcgozlem);
  550. }
  551. function cariBilgiDoldur(data){
  552. $("#kod").val(data.kod);
  553. $("#ad").val(data.isim);
  554. $("#adres").val(data.adres);
  555. $("#tel").val(data.tel);
  556. $("#tel2").val(data.tel2);
  557. $("#vergino").val(data.vergino);
  558. $("#vergiyer").val(data.vergiyer);
  559. //$("#muhkod").val(data.muhkod);
  560. $("#eposta").val(data.eposta);
  561. //$("#tip").val(data.tip);
  562. //$("#iskoran").val(data.iskoran);
  563. $("#vadegunu").val(data.vadegunu);
  564. $("#ctip").val(data.cari_tip);
  565. $("#grupkod").val(data.grupkod);
  566. $("#iban").val(data.iban);
  567. $("#kod1").val(data.kod1);
  568. //$("#kod2").val(data.kod2);
  569. }
  570. function cariBilgiBosalt(){
  571. $("#kod").val("");
  572. $("#ad").val("");
  573. $("#adres").val("");
  574. $("#tel").val("");
  575. $("#tel2").val("");
  576. $("#vergino").val("");
  577. $("#vergiyer").val("");
  578. $("#eposta").val("");
  579. //$("#iskoran").val("");
  580. $("#vadegunu").val("");
  581. $("#cari_tip").val("");
  582. $("#grupkod").val("");
  583. $("#iban").val("");
  584. $("#kod1").val("");
  585. //$("#kod2").val("");
  586. }
  587. function hareketGozlemDonus(res,statusText,xhr,$form){
  588. if(res!='None'){
  589. $("#bilgi").html(res);
  590. $("#hareketrapor").tablesorter();
  591. }else{
  592. errorHandler("GÖRÜNTÜLENECEK RAPOR YOK");
  593. }
  594. }
  595. function chGozlem(){
  596. var opcgozlem = {
  597. url: "/cHareketGozlem",
  598. target:"#bilgi",
  599. DataType : 'json',
  600. type: "POST",
  601. success: hareketGozlemDonus
  602. };
  603. $('#cariModulform').ajaxSubmit(opcgozlem);
  604. }
  605. function caharYukle(fkod){
  606. $.ajax({
  607. url : "/faturaUstbilgi?fkod=" + fkod,
  608. }).done(function(data) {
  609. console.log(data);
  610. var islem=data[2];
  611. var chfkod=data[24];
  612. if(islem=='F'){
  613. $("#chfkod").val(chfkod);
  614. }else{
  615. $("#chfkod").val("yeni");
  616. }
  617. $("#chTarih").val(data[3]);
  618. $("#chvdTarih").val(data[4]);
  619. var fisno=data[0];
  620. if(islem=='A' || islem=='F'){
  621. if(fisno=='MUTABAKAT'){
  622. //$('#hartip option:eq(0)').attr('selected','selected');
  623. $('#chFisno').empty();
  624. gecopt = new Option(fisno);
  625. $(gecopt).attr("selected", true);
  626. $("#chFisno").append(gecopt);
  627. opt2 = new Option("DÜZELTME");
  628. $("#chFisno").append(opt2);
  629. opt3 = new Option("DEVİR");
  630. $("#chFisno").append(opt3);
  631. }if(fisno=='DÜZELTME'){
  632. $('#chFisno').empty();
  633. gecopt = new Option(fisno);
  634. $(gecopt).attr("selected", true);
  635. $("#chFisno").append(gecopt);
  636. opt2 = new Option("MUTABAKAT");
  637. $("#chFisno").append(opt2);
  638. opt3 = new Option("DEVİR");
  639. $("#chFisno").append(opt3);
  640. }if(fisno=='DEVİR'){
  641. $('#chFisno').empty();
  642. gecopt = new Option(fisno);
  643. $(gecopt).attr("selected", true);
  644. $("#chFisno").append(gecopt);
  645. opt2 = new Option("MUTABAKAT");
  646. $("#chFisno").append(opt2);
  647. opt3 = new Option("DÜZELTME");
  648. $("#chFisno").append(opt3);
  649. }else{
  650. $('#chFisno').empty();
  651. gecopt = new Option(fisno);
  652. $(gecopt).attr("selected", true);
  653. $("#chFisno").append(gecopt);
  654. }
  655. ack=data[5];
  656. $("#chAck").val(ack);
  657. var ftip=data[1];
  658. var tutar=data[9];
  659. if (ftip=='C'){
  660. tutar=-1*tutar;
  661. }
  662. $("#chTutar").val(tutar);
  663. }
  664. });
  665. }
  666. function sorguDonus(res,statusText,xhr,$form){
  667. cariListHazirla(res);
  668. }
  669. function cariListHazirla(dizi){
  670. //console.log(dizi);
  671. if(dizi!='None'){
  672. var sorgu=[];
  673. sorgu=dizi;
  674. var durma=true;
  675. var say=0;
  676. var carikod="";
  677. $.cookie('sigc',-1 );
  678. cariler=new Array;
  679. while(sorgu[say]){
  680. carikod=sorgu[say];
  681. cariler.push(carikod);
  682. say=say+1;
  683. $.cookie('cariler',cariler );
  684. }
  685. console.log("gelen cari sayi:"+say);
  686. }
  687. }
  688. function diziCariGetir(sigc){
  689. var carikodlar=$.cookie('cariler').split(',')
  690. //var stokod=stokodlar[$.cookie('stix')];
  691. var carikod=carikodlar[sigc];
  692. $.ajax({
  693. url : "/cariNesneGetir?kriter=kod&kod=" + carikod,
  694. }).done(function(data) {
  695. if(data !=""){
  696. $('#bilgi').html("");
  697. cariBilgiDoldur(data);
  698. }else{
  699. errorHandler("Cari Bulunamadı!");
  700. cariBilgiBosalt();
  701. }
  702. });
  703. }
  704. function errorHandler(message) {
  705. // TODO: hata mesajı dön
  706. console.log("HATA:" + message);
  707. $.blockUI({
  708. message: message,
  709. fadeIn: 500,
  710. fadeOut: 500,
  711. timeout: 2000,
  712. showOverlay: false,
  713. centerY: false,
  714. css: {
  715. width: '550px',
  716. top: '6px',
  717. left: '',
  718. right: '100px',
  719. border: 'none',
  720. padding: '10px',
  721. backgroundColor: '#900',
  722. '-webkit-border-radius': '6px',
  723. '-moz-border-radius': '6px',
  724. 'border-radius': '6px',
  725. opacity: .6,
  726. 'font-style': 'italic',
  727. 'font-weight': 'normal',
  728. 'font-family': 'Georgia, "Times New Roman", Times, serif',
  729. 'font-size': '16px',
  730. color: '#000066',
  731. }
  732. });
  733. }
  734. function succesHandler(message) {
  735. // TODO: hata mesajı dön
  736. $.blockUI({
  737. message: message,
  738. fadeIn: 500,
  739. fadeOut: 500,
  740. timeout: 2000,
  741. showOverlay: false,
  742. centerY: false,
  743. css: {
  744. width: '550px',
  745. top: '6px',
  746. left: '',
  747. right: '100px',
  748. border: 'none',
  749. padding: '10px',
  750. backgroundColor: '#ccffff',
  751. '-webkit-border-radius': '6px',
  752. '-moz-border-radius': '6px',
  753. 'border-radius': '6px',
  754. opacity: .6,
  755. 'font-style': 'italic',
  756. 'font-weight': 'normal',
  757. 'font-family': 'Georgia, "Times New Roman", Times, serif',
  758. 'font-size': '16px',
  759. color: '#996600'
  760. }
  761. });
  762. }
  763. </script>
  764. </head>
  765. <body bgcolor='silver' >
  766. <div class=anasablon>
  767. <div class="stkHeader" tabindex="-1" >
  768. <div class="formblock">
  769. <a href="/cariModul"><img src="cari.png" class="hover" hinttext="Cari" style="margin-right:120px;"></a>
  770. </div>
  771. <div class="formblock">
  772. <a href="/faturaModul"><img src="fatura.png" class="hover" hinttext="Fatura" style="margin-right:20px;"></a>
  773. </div>
  774. <div class="formblock">
  775. <a href="/stokModul"><img src="stok.png" class="hover" hinttext="Stok" style="margin-right:20px;"></a>
  776. </div>
  777. <div class="formblock">
  778. <a href="/siparisModul"><img src="spr.png" class="hover" hinttext="Sipariş" style="margin-right:20px;"></a>
  779. </div>
  780. <div class="formblock">
  781. <a href="/sayimModul"><img src="pencil.png" class="hover" hinttext="Sayım" style="margin-right:20px;"></a>
  782. </div>
  783. <div class="formblock">
  784. <a href="/raporModul"><img src="rapor.png" class="hover" hinttext="Rapor" style="margin-right:20px;"></a>
  785. </div>
  786. <div class="formblock">
  787. <a href="/veriModul"><img src="veri.png" class="hover" hinttext="Veri" style="margin-right:20px;"></a>
  788. </div>
  789. <div class="formblock">
  790. <a href="/altyapiModul"><img src="altyapi.png" class="hover" hinttext="Altyapı" style="margin-right:20px;"></a>
  791. </div>
  792. <div class="formblock">
  793. <a href="/logModul"><img src="log.png" class="hover" hinttext="Log" style="margin-right:20px;"></a>
  794. </div>
  795. <div class="formblock">
  796. <a href="/yetkiliModul"><img src="config.png" class="hover" hinttext="Yetkili" style="margin-right:20px;"></a>
  797. </div>
  798. <div class="formblock">
  799. <a href="/exit"><img src="cikis.png" class="hover" hinttext="ÇIKIŞ" style="margin-left:40px;"></a>
  800. </div>
  801. <div class="kulblok">{{kullanici}}</div>
  802. </div>
  803. <br>
  804. <div class=formalan>
  805. <table border=1 align=left>
  806. <form id=cariModulform name=cariModul action="{{ url_for('cariModul') }}" method=post>
  807. <tr>
  808. <td>CARİ KODU:</td>
  809. <td><input type=text id=kod name=kod value="{{cari.kod}}" ondblclick=this.value='' style="width: 55px">
  810. <input type="submit" name="cariGozlem" id="cariGozlem" value="Tüm Har" style="width: 70px">
  811. <input type="submit" name="cariGozlemH" id="cariGozlemH" value="1Hf" style="width: 30px">
  812. <input type="submit" name="cariGozlemAy" id="cariGozlemAy" value="1Ay" style="width: 30px">
  813. <input type="submit" name="cariGozlemAy2" id="cariGozlemAy2" value="2Ay" style="width: 30px"></td>
  814. </tr>
  815. <tr>
  816. <td>CARİ İSMİ:</td>
  817. <td><textarea name=ad id=ad value="{{cari.isim}}" cols="29" rows="3" ondblclick=this.value=''></textarea></td>
  818. </tr>
  819. <tr>
  820. <td>ADRES:</td>
  821. <td><textarea name=adres id=adres value="{{cari.adres}}" cols="29" rows="3"></textarea></td>
  822. </tr>
  823. <tr>
  824. <td>VERGİ D.:</td>
  825. <td><input type=text id=vergiyer name=vergiyer value="{{cari.vergiyer}}"></td>
  826. </tr>
  827. <tr>
  828. <td>VERGİ NO:</td>
  829. <td><input type=text id=vergino name=vergino value="{{cari.vergino}}"></td>
  830. </tr>
  831. <tr>
  832. <td>TELEFON:</td>
  833. <td><input type=text id=tel name=tel value="{{cari.tel}}"></td>
  834. </tr>
  835. <tr>
  836. <td>TELEFON-2:</td>
  837. <td><input type=text id=tel2 name=tel2 value="{{cari.tel2}}"></td>
  838. </tr>
  839. <tr>
  840. <td>E-POSTA:</td>
  841. <td><input type=text id=eposta name=eposta value="{{cari.eposta}}"></td>
  842. </tr>
  843. <tr>
  844. <td>CARİ TİP:</td>
  845. <td><input type=text id=ctip name=ctip value="{{cari.tip}}"></td>
  846. </tr>
  847. <tr>
  848. <td>VADE GÜNÜ:</td>
  849. <td><input type=text id=vadegunu name=vadegunu value="{{cari.vade_gunu}}"></td>
  850. </tr>
  851. <tr>
  852. <td>GRUP KODU:</td>
  853. <td><input type=text id=grupkod name=grupkod value="{{cari.grupkod}}"></td>
  854. </tr>
  855. <tr>
  856. <td>KOD_1:</td>
  857. <td><input type=text id=kod1 name=kod1 value="{{cari.kod1}}"></td>
  858. </tr>
  859. <tr>
  860. <td>IBAN NO:</td>
  861. <td><input type=text id=iban name=iban value="{{cari.iban}}" width="250" style="width: 250px"></td>
  862. </tr>
  863. <tr>
  864. <td><br></td>
  865. </tr>
  866. </table>
  867. <div class=operbutonlar>
  868. <div class=element>
  869. <input type="submit" name="cariKaydet" id="cariKaydet" value="kaydet" />
  870. </div>
  871. <div class=element>
  872. <input type="submit" name="cariSil" id="cariSil" value="sil" />
  873. </div>
  874. <div class=element>
  875. <p>
  876. </div>
  877. <div class=element>
  878. <input type="submit" name="caharGonder" id="caharGonder" value="dokum Gönder" />
  879. </div>
  880. <div class=element>
  881. Cari Yaşlandırma
  882. <input type=text id=cariYasTrh name=cariYasTrh>
  883. </div>
  884. <div class=element>
  885. Cari Döküm Rapor
  886. <input type=text id=hrkBasTrh name=hrkBasTrh width="70" style="width: 70px">-
  887. <input type=text id=hrkSonTrh name=hrkSonTrh width="70" style="width: 70px">
  888. </div>
  889. <div class=element>
  890. Yeni Cari kod:
  891. <input type=text id=cariYkod name=cariYkod width="70" style="width: 70px">
  892. <input type="submit" name="ckoddeg" id="ckoddeg" value="kod değiştir" />
  893. </div>
  894. <div class=element>
  895. <input type="submit" name="test" id="test" value="test" />
  896. </div>
  897. </div>
  898. </div>
  899. <div id="hintbox"></div>
  900. <div class=raporalan>
  901. <div class=operbutonlar>
  902. <hr noshade size="1">
  903. <label>merkez şube<label>
  904. <input type=text id=kod2 name=kod2 value="{{mkod}}" width="100" style="width: 100px" ondblclick=this.value='' />
  905. <label>merkez cari<label>
  906. <input type=text id=kod_mcari name=kod_mcari value="{{mcari}}" width="100" style="width: 100px" ondblclick=this.value='' />
  907. </div>
  908. <div class=operbutonlar>
  909. <dl>
  910. <dt>kriter:<select type=text id=kriter name=kriter value="{{kriter}}" >
  911. <option>{{kriter}}</option>
  912. <option>cari_kod</option>
  913. <option>cari_isim</option>
  914. <option>cari_adres</option>
  915. <option>vergi_numarasi</option>
  916. <option>vergi_dairesi</option>
  917. <option>grup_kodu</option>
  918. <option>rapor_kodu1</option>
  919. </select>
  920. <input type=text id=arama name=arama value="{{arama}}" >
  921. <input type=submit id="cariSorgu" name="cariSorgu" value="cari sorgulama" >
  922. <input type=submit id="carilerAl" name="carilerAl" value="cari liste al" >
  923. <input type=submit id="reset" name="reset" value="başa dön" >
  924. <input type=submit id="geri" name="geri" value="geri" >
  925. <input type=submit id="ileri" name="ileri" value="ileri" >
  926. </dl>
  927. <hr noshade size="1">
  928. <label>TARİH:</label>
  929. <input type="text" class="txt"name="chTarih" id="chTarih" style="margin-right: 5px; width: 120px;"/>
  930. <input type="text" class="txt"name="chvdTarih" id="chvdTarih" style="margin-right: 5px; width: 120px;"/>
  931. <label>FİŞ NO:</label>
  932. <select type=text id=chFisno name=chFisno value="DÜZELTME" >
  933. <option>DÜZELTME</option>
  934. <option>MUTABAKAT</option>
  935. <option>DEVİR</option>
  936. </select>
  937. <label>Not:</label>
  938. <input type="text" class="txt"name="chAck" id="chAck" style="margin-right: 5px; width: 200px;"/>
  939. <label>Tutar:</label>
  940. <input type="text" class="txt"name="chTutar" id="chTutar" style="margin-right: 5px; width: 70px;"/>
  941. <hr noshade size="1">
  942. <div id="bilgi"></div>
  943. <input type="text" class="txt"name="chfkod" id="chfkod" hidden value='yeni' style="margin-right: 5px; width: 70px;"/>
  944. <input type="text" class="txt"name="chgun" id="chgun" hidden value='0' style="margin-right: 5px; width: 70px;"/>
  945. </div>
  946. </div>
  947. </form>
  948. </div>
  949. </body>
  950. </HTML>