/************************************************************************** * NEW BOOKING * **************************************************************************/ function removeRowTrx(name,id) { const row = document.getElementById(name+"_"+id); row.style.display = 'none'; row.remove(); hitungTotalBookingPrice(); } function addRowTrx(name,prev_id) { NO_ITEM++; // var tbody = document.getElementById('formBody'); const row = document.createElement('tr'); row.id = name+"_"+NO_ITEM; txt=""; txt +=" X "; txt += ""+$("#option_price").val()+""; txt += ""; txt += ""; txt += ""; txt += ""; txt += ""; txt += ""; txt += ""; row.innerHTML = txt; //row = createRowTitle(kategori_id,prev_id, "test"); if (prev_id.length>2){ var targetRow = document.getElementById(prev_id); // Sisipkan setelah row1 if (targetRow){ targetRow.parentNode.insertBefore(row, targetRow.nextSibling); }else{ console.log("tidak ada"); } // return; } hitungTotalBookingPrice(); } var DT_PRODUCT = null; var DT_JAMAAH=[]; function pilihProduct(id){ let product_id=$("#"+id).val(); var json_dt = { product_id :product_id } let url=API_URL+"/api/product/detail"; $.ajax({ type: 'POST', url: url, headers: { "Authorization": "Bearer "+LOGIN_DT.access_token, }, data: json_dt, success: function(resp) { if (resp.rc=="000"){ NO_ITEM=0; DT_PRODUCT=resp.product; $("#div_info_product").show(); txt =""; txt +="
"; txt +="
Jadwal
"; txt +="
"+DT_PRODUCT.start_date+" s/d "+DT_PRODUCT.end_date+"
"; txt +="
"; txt +="
"; txt +=" 
"; txt +="
"; txt +="
QUAD
"; amount=getPriceProduct(DT_PRODUCT,'QUAD'); txt +="
Rp. "+formatWithDecimal.format(amount)+"
"; txt +="
"; txt +="
"; txt +="
TRIPLE
"; amount=getPriceProduct(DT_PRODUCT,'TRIPLE'); txt +="
Rp. "+formatWithDecimal.format(amount)+"
"; txt +="
"; txt +="
"; txt +="
DOUBLE
"; amount=getPriceProduct(DT_PRODUCT,'DOUBLE'); txt +="
Rp. "+formatWithDecimal.format(amount)+"
"; txt +="
"; $("#info_product").html(txt); } }, error: function(jqXHR,error, errorThrown) { // alert("RRP"+jqXHR.responseText+" -- "+error); } }); } function getPriceProduct(dt_product,option){ price=0; for (let k=0;k { arr = row.id.split('_'); stat = arr[0]? arr[0] : ""; no_item = arr[1]? arr[1] : 0; if (no_item>0){ row.remove(); } }) let option_price=$("#option_price").val()? $("#option_price").val(): ""; let amount=getPriceProduct(DT_PRODUCT,option_price); $("#amount_price").text("Rp. "+formatWithDecimal.format(amount)); $("#price").val(amount); let qty=0; if (option_price==="QUAD") { qty=4; } else if (option_price==="TRIPLE") { qty=3; } else if (option_price==="DOUBLE") { qty=2; } $("#qty").val(qty); let price=$("#price").val()? $("#price").val(): 0; let total=qty*price; $("#amount_txt").text("Rp. "+formatWithDecimal.format(total)); $("#amount").val(total); for (let k=0;k { console.log("row-id:"+row.id+""); // akan mencetak id dari masing-masing isHidden = window.getComputedStyle(row).display === 'none'; if (!isHidden){ arr = row.id.split('_'); stat = arr[0]? arr[0] : ""; no_item = arr[1]? arr[1] : 0; if (no_item>0){ qty++; price =$("#price").val()? $("#price").val() : 0; total_price +=Number(price); } console.log("Pri:"+price+" --> "+total_price); } }); $("#amount_txt").text("Rp. "+formatWithDecimal.format(total_price)); $("#amount").val(total_price); $("#qty").val(qty); } function submitTrx(){ let rows = document.querySelectorAll('tr'); let isHidden; let arr; let stat; let no_item; let total_price=0; DT_JAMAAH=[]; let option_price=$("#option_price").val()? $("#option_price").val(): ""; let product_id=$("#product_id").val()? $("#product_id").val(): "0"; let jamaah_pic=""; let qty=0; let pic = document.getElementsByName('jamaah_pic'); for (let i = 0; i < pic.length; i++) { if (pic[i].checked) { pic = pic[i].value; break; } } // jamaah_pic =$("#jamaah_name_"+pic).val()? $("#jamaah_name_"+pic).val(): ""; rows.forEach(row => { console.log("row-id:"+row.id+""); // akan mencetak id dari masing-masing isHidden = window.getComputedStyle(row).display === 'none'; if (!isHidden){ arr = row.id.split('_'); stat = arr[0]? arr[0] : ""; no_item = arr[1]? arr[1] : 0; if (no_item>0){ qty++; DT_JAMAAH.push({option:option_price, jamaah_pic : jamaah_pic, jamaah_name :$("#jamaah_name_"+no_item).val()? $("#jamaah_name_"+no_item).val(): "", jamaah_sex :$("#jamaah_sex_"+no_item).val()? $("#jamaah_sex_"+no_item).val(): "", jamaah_nik :$("#jamaah_nik_"+no_item).val()? $("#jamaah_nik_"+no_item).val(): "", jamaah_phone :$("#jamaah_phone_"+no_item).val()? $("#jamaah_phone_"+no_item).val(): "", jamaah_dob :$("#jamaah_dob_"+no_item).val()? $("#jamaah_dob_"+no_item).val(): "", }); } } }); var json_dt = { product_id :product_id, option : option_price, qty : qty, dt_jamaah : DT_JAMAAH, } console.log("SS:"+JSON.stringify(json_dt)); let url=API_URL+"/api/transaction/save"; $.ajax({ type: 'POST', url: url, headers: { "Authorization": "Bearer "+LOGIN_DT.access_token, }, data: json_dt, success: function(resp) { alert(JSON.stringify(resp)); if (resp.rc=="000"){ window.location.replace(BASE_URL+"/data-transaction"); } }, error: function(jqXHR,error, errorThrown) { // alert("RRP"+jqXHR.responseText+" -- "+error); } }); } /************************************************************************** * transaction * **************************************************************************/ function setTransactionDetail(transaction_id=0,div_id='div_info_transaction'){ $("#transaction_id").val(transaction_id); var json_dt = { transaction_id :transaction_id } let url=API_URL+"/api/transaction/detail"; $.ajax({ type: 'POST', url: url, headers: { "Authorization": "Bearer "+LOGIN_DT.access_token, }, data: json_dt, success: function(resp) { console.log("resp:"+JSON.stringify(resp)); if (resp.rc=="000"){ txt =""; txt +="
"; txt +="
"; txt +="
"; txt +="
"; txt +="
Edit Data
"; txt +=" "; txt +="
"; txt +="
"; txt +="
"; txt +="
"; txt +="
"; txt +="
"; txt +=""; txt +="
"; txt +="
"; txt +="
"; txt +=" "; txt +="
"; txt +="
"; txt +=""; txt +="
"; txt +="
"; txt +="
"; let info=""; info+=""+resp.data.reff_no+": "; txt +="
"; txt +="
No Reff
"; txt +="
"+resp.data.reff_no+"
"; txt +="
Tanggal
"; txt +="
"+resp.data.created_at+"
"; txt +="
"; txt +="
"; txt +="
Agent
"; txt +="
"+resp.data.agent+"
"; txt +="
Status
"; info+="
agent: "+resp.data.agent+"
"; txt +="
"+resp.data.status+""; if (resp.data.status.toUpperCase() == "WAITING"){ if (Number(resp.data.paid)>100000){ txt +="
"; txt +="
"; txt +="
"; txt +="
Product
"; txt +="
"+resp.data.product+"
"; txt +="
"; info+=""+resp.data.product+" "; txt +="
"; txt +="
Jadwal
"; txt +="
Berangkat: "+resp.data.start_date+"    Pulang: "+resp.data.end_date+"
"; txt +="
"; info+="("+resp.data.start_date+" - "+resp.data.end_date+") "; txt +="
"; txt +="
Opsi
"; txt +="
"+resp.data.option+"
"; txt +="
Harga
"; txt +="
"+formatWithDecimal.format(resp.data.unit_price)+"
"; txt +="
"; txt +=""; txt +="
"; txt +="
Jumlah
"; txt +="
"+resp.data.qty+"
"; txt +="
"; txt +=""; info+="

"+resp.data.qty+" "+resp.data.option+""; txt +="
"; txt +="
Total Harga
"; txt +="
"+formatWithDecimal.format(resp.data.amount_price)+"
"; txt +="
Discount
"; txt +="
"+formatWithDecimal.format(+resp.data.amount_discount)+"
"; txt +="
"; info+=" harga:"+resp.data.amount_total+" "; txt +="
"; txt +="
Amount Akhir
"; txt +="
"+formatWithDecimal.format(resp.data.amount_total)+"
"; txt +="
Biaya lain
"; txt +="
"+formatWithDecimal.format(resp.data.other_amount)+"
"; txt +="
"; txt +=""; txt +="
"; txt +="
Jumlah Bayar
"; txt +="
"+formatWithDecimal.format(resp.data.paid)+"
"; txt +="
Bayar Lain
"; txt +="
"+formatWithDecimal.format(resp.data.paid_other)+"
"; txt +="
"; txt +=""; sisa=Number(resp.data.amount_total)+Number(resp.data.other_amount) - Number(resp.data.paid) -Number(resp.data.paid_other) txt +="
"; txt +="
Sisa Bayar
"; txt +="
"+formatWithDecimal.format(sisa)+"
"; if (sisa==0){ txt +="
"; }else{ //txt +="
"; //txt +=" "; txt +="
"; } txt +="
"; txt +="
"; txt +="Catatan:"; txt +="
    "; txt +="
  • Booking/Waiting = Belum selesai DP
  • "; txt +="
  • Booked = Sudahselesai DP
  • "; txt +="
  • Lunas = Lunas
  • "; txt +="
"; txt +="
"; document.getElementById(div_id).innerHTML=txt; } }, error: function(jqXHR,error, errorThrown) { // alert("RRP"+jqXHR.responseText+" -- "+error); } }); } function updateStatusTransaction(transaction_id=0,status){ alert(transaction_id); var json_dt = { transaction_id : transaction_id, status : status } let url=API_URL+"/api/transaction/update_transaction_status"; $.ajax({ type: 'POST', url: url, headers: { "Authorization": "Bearer "+LOGIN_DT.access_token, }, data: json_dt, success: function(resp) { alert(resp.message); window.location.reload(); }, error: function(jqXHR,error, errorThrown) { // alert("RRP"+jqXHR.responseText+" -- "+error); } }); } function saveAddPayment(){ var json_dt = { transaction_id : $("#transaction_id").val(), amount : $("#amount").val(), note : $("#note").val(), } let url=API_URL+"/api/transaction/set_other_charge"; $.ajax({ type: 'POST', url: url, headers: { "Authorization": "Bearer "+LOGIN_DT.access_token, }, data: json_dt, success: function(resp) { alert(resp.message); window.location.reload(); }, error: function(jqXHR,error, errorThrown) { // alert("RRP"+jqXHR.responseText+" -- "+error); } }); } function displayAddPayment(transaction_id,info=""){ var txt=""; $("#div_form_edit").show(); $("#div_action_edit").show(); $("#div_proses_edit").hide(); $("#editModal").modal('show'); $("#exampleModalLabel_edit").text("Tambah Biaya"); var txt=""; txt +="

Tambahan Biaya

"; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +="
Transaksi:"+info+"
Jumlah Biaya Tambahan:
Catatan:
"; txt +=""; txt +="
"; document.getElementById("div_form_edit").innerHTML=txt; } var DT_JAMAAH=[]; function setTransactionOrg(transaction_id=0,div_id="div_info_jamaah"){ qty = $("#qty").val(); $("#transaction_id").val(transaction_id); var json_dt = { transaction_id :transaction_id } let url=API_URL+"/api/transaction/list_org"; console.log("REQUEST list Jamaah dr Transaksi URL["+url+"] param["+JSON.stringify(json_dt)+"]"); $.ajax({ type: 'POST', url: url, headers: { "Authorization": "Bearer "+LOGIN_DT.access_token, }, data: json_dt, success: function(resp) { k=0; txt=""; console.log("RESPONSE list Jamaah dr Transaksi URL["+url+"] param["+JSON.stringify(resp)+"]"); if (resp.rc=="000"){ for (let i=0;i"; txt +="
B."+k+"
"; txt +=""; txt +="
"; txt +="
Nama
"; txt +="
"; txt +="
Pasangan
"; txt +="
"; txt +="
"; txt +="
"; txt +="
NIK
"; txt +="
"; txt +="
L/P
"; txt +="
"; txt +="
Usia
"; txt +="
"; txt +="
"; txt +="
"; txt +="
Email
"; txt +="
"; txt +="
Phone
"; txt +="
"; txt +="
"; txt +="
"; txt +="
Address
"; txt +="
"; txt +="
"; txt +="
"; txt +=" "; txt +="
"; txt +="
 
"; txt +="
"; txt +="
Dokumen
"; txt +="
"; txt +="
"; txt +="
"; txt +="
"; } for (let i=k;i"; txt +="
B."+k+"
"; txt +=""; txt +="
"; txt +="
Nama
"; txt +="
"; txt +="
Pasangan
"; txt +="
"; txt +="
"; txt +="
"; txt +="
NIK
"; txt +="
"; txt +="
L/P
"; txt +="
"; txt +="
"; txt +="
"; txt +="
Tgl Lahir
"; txt +="
"; txt +="
Usia
"; txt +="
"; txt +="
"; txt +="
"; txt +="
Email
"; txt +="
"; txt +="
Phone
"; txt +="
"; txt +="
"; txt +="
"; txt +="
Address
"; txt +="
"; txt +="
"; txt +="
"; txt +=" "; txt +="
"; txt +="
 
"; txt +="
"; txt +="
Dokumen
"; txt +="
"; txt +="
"; txt +="
"; txt +="
"; } } document.getElementById(div_id).innerHTML=txt; for (let i=0;i"; txt += " "; txt += " "; txt += " No"; txt += " Paket"; txt += " Start"; txt += " End"; txt += " Nama"; txt += " NIK"; txt += " Phone"; txt += " Photo"; txt += " KTP"; txt += " KK"; txt += " Passport"; txt += " Akta Lahir"; txt += " Buku Nikah"; txt += " Vax Covid"; txt += " Miningitis"; txt += " Mahram"; txt += " "; txt += " "; txt += " "; $.ajax({ type: 'POST', url: url, headers: { "Authorization": "Bearer "+LOGIN_DT.access_token, }, data: json_dt, success: function(resp) { ke=0; console.log(JSON.stringify(resp)); if (resp.rc=="000"){ for (let i=0;i"; txt += " "+dt.product_name+"
"; txt += " "+dt.start_date+""; txt += " "+dt.end_date+""; txt += " "+dt.jamaah_name+""; txt += " "+dt.jamaah_nik+""; txt += " "+dt.jamaah_phone+""; txt += "
"; txt += "
"; txt += "
"; txt += "
"; txt += "
"; txt += "
"; txt += "
"; txt += "
"; txt += "
"; txt += " "; console.log(" sss doc_502_"+dt.id); } } txt += " "; txt += " "; document.getElementById(div_id).innerHTML=txt; //setDataTables(); for (let i=0;i"+dt.nama+""; txt +="
"; if (dt.doc.length>0){ for (k=0;k1){ txt +="
"; } if (dt.doc[k].doc_type ==="IMG"){ txt +="
" txt +=" X "; txt +="preview"; txt +="
"; }else if (dt.doc[k].doc_type ==="PDF"){ txt +="
" txt +=" X "; txt +="preview"; txt +="
"; }else { txt +="
" txt +=" X "; txt +="preview"; txt +="
"; } } }else{ txt +="
" txt +=""; txt +="
"; txt +="
" txt +="
"; txt +=""; txt +=""; txt +=""; } txt +="
"; } document.getElementById(div_id+"_"+transaction_org_id).innerHTML=txt; } }, error: function(jqXHR,error, errorThrown) { // alert("RRP"+jqXHR.responseText+" -- "+error); } }); } function setTransactionOrgDocument2(org_id, transaction_org_id=0,div_id="div_dokumen_"){ var json_dt = { transaction_org_id :transaction_org_id } let url=API_URL+"/api/transaction/list_org_doc"; $.ajax({ type: 'POST', url: url, headers: { "Authorization": "Bearer "+LOGIN_DT.access_token, }, data: json_dt, success: function(resp) { if (resp.rc=="000"){ for (i=0;i0){ for (k=0;k1){ txt +="
"; } if (dt.doc[k].doc_type ==="IMG"){ txt +="view"; }else if (dt.doc[k].doc_type ==="PDF"){ txt +="view"; }else { txt +="view"; } console.log("doc_"+resp.data[i].id+"_"+transaction_org_id); document.getElementById("doc_"+resp.data[i].id+"_"+transaction_org_id).innerHTML=txt; } }else{ } txt +=""; } } }, error: function(jqXHR,error, errorThrown) { // alert("RRP"+jqXHR.responseText+" -- "+error); } }); } async function simpanFile(doc_category_id=0,transaction_org_id=0) { file = document.getElementById("file_"+doc_category_id+"_"+transaction_org_id).files[0]; if (file){ return new Promise((resolve, reject) => { var reader = new FileReader(); reader.readAsBinaryString(file); reader.onload = function() { $("#doc_file_"+doc_category_id+"_"+transaction_org_id).val(btoa(reader.result)); $("#ext_file_"+doc_category_id+"_"+transaction_org_id).val(file.name.split('.').pop().toLowerCase()); $("#name_file_"+doc_category_id+"_"+transaction_org_id).val(file.name); resolve ({ "rc": "000", "message": "Success"}); } reader.onerror = function() { reject ({ "rc": "001", "message":"error on upload image. Try again"}); }; }); }else{ return { "rc": "001", "message":"File Image empty. You must upload image"}; } } function removeTransactionOrgDoc(doc_category_id=0,transaction_org_id=0,org_id=0,doc_id=0,div_id){ let text = document.getElementById(div_id).innerHTML; document.getElementById(div_id).innerHTML=loading(); var json_dt = { transaction_org_id: transaction_org_id, doc_id : doc_id, status : "DEL", } let url=API_URL+"/api/transaction/update_transaction_org_doc_status"; console.log("REQUEST remove/hapus dokumen jamaah URL["+url+"] param["+JSON.stringify(json_dt)+"]"); $.ajax({ type: 'POST', url: url, headers: { "Authorization": "Bearer "+LOGIN_DT.access_token, }, data: json_dt, success: function(resp) { console.log("RESPONSE remove/hapus dokumen jamaah URL["+url+"] param["+JSON.stringify(resp)+"]"); alert(resp.message) if (resp.rc =="000"){ k=0; txt=""; txt +="
" txt +=""; txt +="
"; txt +=""; txt +=""; txt +=""; document.getElementById(div_id).innerHTML=txt; }else{ document.getElementById(div_id).innerHTML=text; } }, error: function(jqXHR,error, errorThrown) { document.getElementById(div_id).innerHTML=text; alert("RRP"+jqXHR.responseText+" -- "+error); } }); } async function uploadTransactionOrgDoc(doc_category_id=0,transaction_org_id=0,org_id=0,div_id){ div_id="div_file_"+doc_category_id+"_"+transaction_org_id; div_loading_id="loading_"+doc_category_id+"_"+transaction_org_id; let text = document.getElementById(div_id).innerHTML; document.getElementById(div_loading_id).innerHTML=loading(); let dt_resp1; try { dt_resp1 = await simpanFile(doc_category_id,transaction_org_id); } catch (err) { alert(err.message || "Terjadi error saat upload file"); document.getElementById(div_loading_id).innerHTML=""; return false; } if (dt_resp1.rc !== '000') { alert(dt_resp1.message); document.getElementById(div_loading_id).innerHTML=""; return false; } DT_DATA["transaction_org_id"] = transaction_org_id; DT_DATA["doc_category_id"] = doc_category_id; DT_DATA["org_id"] = org_id; DT_DATA["doc_file"] = $("#doc_file_"+doc_category_id+"_"+transaction_org_id).val(); DT_DATA["ext_file"] = $("#ext_file_"+doc_category_id+"_"+transaction_org_id).val(); DT_DATA["name_file"] = $("#name_file_"+doc_category_id+"_"+transaction_org_id).val(); let url=API_URL+"/api/transaction/upload_transaction_org_doc"; temp=DT_DATA; // temp['doc_file']='base64'; console.log("REQUEST upload dokumen jamaah URL["+url+"] param["+JSON.stringify(temp)+"]"); $.ajax({ type: 'POST', url: url, headers: { "Authorization": "Bearer "+LOGIN_DT.access_token, }, data: DT_DATA, success: function(resp) { console.log("RESPONSE upload dokumen jamaah URL["+url+"] param["+JSON.stringify(resp)+"]"); document.getElementById(div_loading_id).innerHTML=""; alert(resp.message) if (resp.rc =="000"){ k=0; txt=""; // txt +="
" txt +=" X "; txt +="preview"; // txt +="
"; document.getElementById(div_id).innerHTML=txt; } }, error: function(jqXHR,error, errorThrown) { document.getElementById(div_loading_id).innerHTML=""; alert("RRP"+jqXHR.responseText+" -- "+error); } }); } function saveTransactionOrg(){ transaction_id=$("#transaction_id").val(); qty=$("#qty").val(); for (let i=0;i"; txt += " "; txt += " "; txt += " No"; txt += " Status"; txt += " Amount"; txt += " Type"; txt += " Invoice"; txt += " Payment"; txt += " "; txt += " "; txt += " No"; txt += " Date"; txt += " Due Date"; txt += " Reff"; txt += " date"; txt += " "; txt += " "; txt += " "; if (resp.rc=="000"){ for (let i=0;i"; txt += " "+dt.status+""; txt += " "+dt.amount+""; txt += " "+dt.cash_type+" "+dt.acc_bank+""; txt += " "+dt.invoice_no+""; txt += " "+dt.invoice_date+""; txt += " "+dt.invoice_due_date+""; txt += " "+dt.payment_reff+""; txt += " "+dt.payment_date+""; txt += " "; } txt += " "; txt += " "; document.getElementById(div_id).innerHTML=txt; } }, error: function(jqXHR,error, errorThrown) { // alert("RRP"+jqXHR.responseText+" -- "+error); } }); } function updatePayment(payment_id=0,status){ alert(payment_id); var json_dt = { payment_id : payment_id, status : status } let url=API_URL+"/api/payment/update_payment"; $.ajax({ type: 'POST', url: url, headers: { "Authorization": "Bearer "+LOGIN_DT.access_token, }, data: json_dt, success: function(resp) { alert(resp.message); window.location.reload(); }, error: function(jqXHR,error, errorThrown) { // alert("RRP"+jqXHR.responseText+" -- "+error); } }); } function getTransactionPayment2(transaction_id=0,div_id="div_info_payment",status=""){ qty = $("#qty").val(); $("#transaction_id").val(transaction_id); var json_dt = { status : status } let url=API_URL+"/api/payment/list_payment_transaction2"; $.ajax({ type: 'POST', url: url, headers: { "Authorization": "Bearer "+LOGIN_DT.access_token, }, data: json_dt, success: function(resp) { k=0; txt=""; txt +="

List Payment "+status+"

"; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; // txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; // txt += " "; // txt += " "; // txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; console.log(JSON.stringify(resp)); if (resp.rc=="000"){ DT_PAYMENT=resp.data; for (let i=0;i"; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; /* txt += " "; txt += " "; txt += " "; */ txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; txt += " "; } txt += " "; txt += "
NoDatetimeAgentJamaahPaketWaktuKodeAmountTypeInvoicePaymentKuitansiNote
NoDateDue DateBuktiStatusReffdate
("+dt.payment_id+") "+dt.created_at+""+dt.agent+""+dt.full_name+"
"+dt.msisdn+"
("+dt.transaction_id+") "+dt.product_name+""+dt.start_date+" sd "+dt.end_date+""+dt.reff_no+" ("+dt.option+": "+dt.qty+")"+dt.amount+" ("+dt.status+")"+dt.cash_type+" "+dt.acc_bank+""+dt.invoice_no+""+dt.invoice_date+""+dt.invoice_due_date+""; if (dt.doc_bukti_bayar.length>4) { txt +=""; } txt +=""+dt.status+""+dt.payment_reff+""+dt.payment_date+""; if (dt.doc_kuitansi.length>4) { txt +=""; } txt +=""; if (dt.status == "WAITING"){ txt +=""; txt +="   "; } txt +=""+dt.note+"
"; document.getElementById(div_id).innerHTML=txt; setDataTables(); } }, error: function(jqXHR,error, errorThrown) { // alert("RRP"+jqXHR.responseText+" -- "+error); } }); } function displayConfirmPayment(idx){ var txt=""; var dt=DT_PAYMENT[idx]; $("#div_form_edit").show(); $("#div_action_edit").show(); $("#div_proses_edit").hide(); $("#editModal").modal('show'); $("#exampleModalLabel_edit").text("Komisi"); var txt=""; txt +="

Pembayaran

"; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +="
Paket:("+dt.transaction_id+") "+dt.product_name+" ("+dt.start_date+" sd "+dt.end_date+")
Kode:"+dt.reff_no+" ("+dt.option+": "+dt.qty+")
Payment Date:"+dt.payment_date+"
Jenis Payment:"+dt.cash_type+" "+dt.acc_bank+"
Jumlah:"+dt.amount+" ("+dt.status+")
Payment Reff:"+dt.payment_reff+"
Note:"+dt.note+"
Bukti:"; txt +="
view/download
"; txt +=""; txt +="
"; document.getElementById("div_form_edit").innerHTML=txt; } var DT_PAYMENT=[]; function displayRejectPayment(idx){ var txt=""; var dt=DT_PAYMENT[idx]; $("#div_form_edit").show(); $("#div_action_edit").show(); $("#div_proses_edit").hide(); $("#editModal").modal('show'); $("#exampleModalLabel_edit").text("Komisi"); var txt=""; txt +="

Pembayaran

"; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +=""; txt +="
Paket:("+dt.transaction_id+") "+dt.product_name+" ("+dt.start_date+" sd "+dt.end_date+")
Kode:"+dt.reff_no+" ("+dt.option+": "+dt.qty+")
Payment Date:"+dt.payment_date+"
Jenis Payment:"+dt.cash_type+" "+dt.acc_bank+"
Jumlah:"+dt.amount+" ("+dt.status+")
Payment Reff:"+dt.payment_reff+"
Note:"+dt.note+"
Bukti:"; txt +="
view/download
"; txt +=""; txt +="
"; document.getElementById("div_form_edit").innerHTML=txt; }