whoami7 - Manager
:
/
proc
/
self
/
root
/
home
/
papecmvm
/
public_html
/
application
/
controllers
/
webapp
/
Upload File:
files >> //proc/self/root/home/papecmvm/public_html/application/controllers/webapp/Leader.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Leader extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); } public function index() { //$this->load->view("webapp/customer/view"); } public function fromStatus($sts='NULL', $id='NULL'){ if($sts!='NULL'){ $where = array('fid' => $id); $data = array('approve_status' => 'approved'); $this->model->UpdateData('tbl_form', $data, $where); }else{ $fid = $this->input->post('fid'); $note = $this->input->post('note'); //print_r($note); die; $where = array('fid' => $fid); $form = $this->model->DetailData('tbl_form', $where); $get_note = $form[0]['note']; if(empty($get_note)){ $new_note = $note[0]; }else{ $get_note = explode('|', $get_note); $merge = array_merge($get_note, $note); $new_note = implode('|', $merge); } $data = array('release_status' => 'error', 'approve_status' => 'panding', 'note' => $new_note, 'o_noti' => 'unseen'); $this->model->UpdateData('tbl_form', $data, $where); } $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Status Updated. </div>'); redirect('webapp/office/form_grid'); } public function allStatus(){ $ses = $this->session->get_userdata(); $rid = $ses['reg_info'][0]['rid']; $fid = $this->input->post('check_approve'); $count = count($fid); header("content-type: application/xml; charset=ISO-8859-15"); // "Create" the document. $xml = new DOMDocument("1.0", "ISO-8859-15"); $xml->preserveWhiteSpace = FALSE; // Create some elements. $xml_ENVELOPE = $xml->createElement("ENVELOPE", ""); $xml_HEADER = $xml->createElement("HEADER", " "); $xml_HEADER_TALLYREQUEST = $xml->createElement("TALLYREQUEST", "Import Data"); $xml_BODY = $xml->createElement("BODY", " "); $xml_BODY_IMPORTDATA = $xml->createElement("IMPORTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDESC = $xml->createElement("REQUESTDESC", " "); $xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME = $xml->createElement("REPORTNAME", " Vouchers "); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES = $xml->createElement("STATICVARIABLES", " "); $xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY = $xml->createElement("SVCURRENTCOMPANY", " SANDIP COMPANY "); $xml_BODY_IMPORTDATA_REQUESTDATA = $xml->createElement("REQUESTDATA", " "); for ($i=0; $i < $count; $i++) { $where = array('fid' => $fid[$i]); $ins = array('approve_status' => 'approved'); $this->model->UpdateData('tbl_form', $ins, $where); $eight_randnum = rand(11111111,99999999); $form = $this->model->DetailData('tbl_form', $where); $stage = $form[0]['stage']; if($stage == 'contra'){ //$where = array('fid' => $fid); $form = $this->model->xml_contra($fid[$i]); //echo "<pre>"; print_r($form); die; $stage = $form[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form[0]['voucher_type']; }else{ $stage = $stage; } $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $m_ledger_name = $form[0]['party_ledger']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; $check_no = $form[0]['check_no']; $check_date = $form[0]['check_date']; $trans_type = $form[0]['trans_type']; $ms_ledger = $form[0]['sub_ledger']; $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start //$s_ledger_name = $form_info[$i]['s_ledger_name']; for ($le=0; $le < 2; $le++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); //if($trans_type == 'fund_transfer'){ if($le == 0){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); } /* }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); }*/ $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); if($le == 0){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); } //start If bill allocation is available if($trans_type == 'withdrawal'){ //if trans type is withdrawal if($le == 0){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); } //if trans type is withdrawal }elseif($trans_type == 'diposit'){ //if trans type is diposit if($le == 0){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //if trans type is deposit } }else{ //For fund transfer $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); if($le == 0){ $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); }else{ $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); } $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //For fund transfer } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } //if contra end elseif($stage == 'sales'){ $sales_form = $this->model->sm($fid[$i]); $note = $sales_form[0]['note_two']; if($note == 'form_two'){ //$this->xml_sales_two($fid[$i], $eight_randnum); $sales_form_two = $this->model->sales_two_model($fid[$i]); $cgst = $sales_form_two[0]['cgst']; $c_aot = $sales_form_two[0]['c_aot']; $sgst = $sales_form_two[0]['sgst']; $s_aot = $sales_form_two[0]['s_aot']; $ugst = $sales_form_two[0]['ugst']; $u_aot = $sales_form_two[0]['u_aot']; $igst = $sales_form_two[0]['igst']; $i_aot = $sales_form_two[0]['i_aot']; //echo "<pre>"; print_r($sales_form_two); die; $stage = $sales_form_two[0]['stage']; $date = $sales_form_two[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($sales_form_two[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $sales_form_two[0]['voucher_no']; $dr_ledger = $sales_form_two[0]['dr_ledger']; $narration = $sales_form_two[0]['narration']; $amt_gross = $sales_form_two[0]['amt_gross']; $cr_ledger = $sales_form_two[0]['cr_ledger']; $cr_amount = $sales_form_two[0]['amt_taxable']; $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $OLDAUDITENTRYIDS_list = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_list->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $DATE = $xml->createElement("DATE", "".$m_date.""); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); //$PARTYNAME = $xml->createElement("PARTYNAME", "".$dr_ledger.""); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $REFERENCE = $xml->createElement("REFERENCE", "".$voucher_no.""); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$dr_ledger.""); $BASICBASEPARTYNAME = $xml->createElement("BASICBASEPARTYNAME", "".$dr_ledger.""); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); //$PLACEOFSUPPLY = $xml->createElement("PLACEOFSUPPLY", "Gujarat"); $BASICBUYERNAME = $xml->createElement("BASICBUYERNAME", "".$dr_ledger.""); $BASICDATETIMEOFINVOICE = $xml->createElement("BASICDATETIMEOFINVOICE", "".$basic_date_time.""); $BASICDATETIMEOFREMOVAL = $xml->createElement("BASICDATETIMEOFREMOVAL", "".$basic_date_time.""); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $ENTEREDBY = $xml->createElement("ENTEREDBY", "Admin"); //$CONSIGNEESTATENAME = $xml->createElement("CONSIGNEESTATENAME", "Gujarat"); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $AUDITED = $xml->createElement("AUDITED", "No"); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $ISVOID = $xml->createElement("ISVOID", "No"); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $ISDELETED = $xml->createElement("ISDELETED", "No"); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $ALTERID = $xml->createElement("ALTERID", "29"); $MASTERID = $xml->createElement("MASTERID", "14"); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066560"); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); /*$VOUCHER->appendChild($adrs_list); $adrs_list->appendChild($adrs); $VOUCHER->appendChild($basic_buy_list); $basic_buy_list->appendChild($basic_buy_adrs); */ $VOUCHER->appendChild($OLDAUDITENTRYIDS_list); $OLDAUDITENTRYIDS_list->appendChild($OLDAUDITENTRYIDS); $VOUCHER->appendChild($DATE); $VOUCHER->appendChild($GUID); $VOUCHER->appendChild($STATENAME); $VOUCHER->appendChild($NARRATION); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); //$VOUCHER->appendChild($PARTYNAME); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHER->appendChild($REFERENCE); $VOUCHER->appendChild($VOUCHERNUMBER); $VOUCHER->appendChild($PARTYLEDGERNAME); $VOUCHER->appendChild($BASICBASEPARTYNAME); $VOUCHER->appendChild($CSTFORMISSUETYPE); $VOUCHER->appendChild($CSTFORMRECVTYPE); $VOUCHER->appendChild($FBTPAYMENTTYPE); $VOUCHER->appendChild($PERSISTEDVIEW); //$VOUCHER->appendChild($PLACEOFSUPPLY); $VOUCHER->appendChild($BASICBUYERNAME); $VOUCHER->appendChild($BASICDATETIMEOFINVOICE); $VOUCHER->appendChild($BASICDATETIMEOFREMOVAL); $VOUCHER->appendChild($VCHGSTCLASS); $VOUCHER->appendChild($ENTEREDBY); //$VOUCHER->appendChild($CONSIGNEESTATENAME); $VOUCHER->appendChild($DIFFACTUALQTY); $VOUCHER->appendChild($ISMSTFROMSYNC); $VOUCHER->appendChild($ASORIGINAL); $VOUCHER->appendChild($AUDITED); $VOUCHER->appendChild($FORJOBCOSTING); $VOUCHER->appendChild($ISOPTIONAL); $VOUCHER->appendChild($EFFECTIVEDATE); $VOUCHER->appendChild($USEFOREXCISE); $VOUCHER->appendChild($ISFORJOBWORKIN); $VOUCHER->appendChild($ALLOWCONSUMPTION); $VOUCHER->appendChild($USEFORINTEREST); $VOUCHER->appendChild($USEFORGAINLOSS); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $VOUCHER->appendChild($USEFORCOMPOUND); $VOUCHER->appendChild($USEFORSERVICETAX); $VOUCHER->appendChild($ISEXCISEVOUCHER); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $VOUCHER->appendChild($EXCISEOPENING); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $VOUCHER->appendChild($ISVATOVERRIDDEN); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $VOUCHER->appendChild($ISISDVOUCHER); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $VOUCHER->appendChild($GSTNOTEXPORTED); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $VOUCHER->appendChild($ISCANCELLED); $VOUCHER->appendChild($HASCASHFLOW); $VOUCHER->appendChild($ISPOSTDATED); $VOUCHER->appendChild($USETRACKINGNUMBER); $VOUCHER->appendChild($ISINVOICE); $VOUCHER->appendChild($MFGJOURNAL); $VOUCHER->appendChild($HASDISCOUNTS); $VOUCHER->appendChild($ASPAYSLIP); $VOUCHER->appendChild($ISCOSTCENTRE); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $VOUCHER->appendChild($ISBLANKCHEQUE); $VOUCHER->appendChild($ISVOID); $VOUCHER->appendChild($ISONHOLD); $VOUCHER->appendChild($ORDERLINESTATUS); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VOUCHER->appendChild($VATISPURCEXEMPTED); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $VOUCHER->appendChild($ISVATDUTYPAID); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $VOUCHER->appendChild($ISDELETED); $VOUCHER->appendChild($CHANGEVCHMODE); $VOUCHER->appendChild($ALTERID); $VOUCHER->appendChild($MASTERID); $VOUCHER->appendChild($VOUCHERKEY); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $VOUCHER->appendChild($AUDITENTRIES_LIST); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //star for debit ledger $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$dr_ledger.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "Yes"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$amt_gross.""); $VATEXPAMOUNT_DR = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $bill_name = $xml->createElement("NAME", "".$voucher_no.""); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "-".$amt_gross.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_DR); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for debit ledger //star for credit ledger $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$cr_ledger.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$cr_amount.""); $VATEXPAMOUNT_CR = $xml->createElement("VATEXPAMOUNT", "".$cr_amount.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$bill_name = $xml->createElement("NAME", "vouchr no"); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "".$cr_amount.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); */ $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_CR); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for credit ledger //star for CGST ledger if($cgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); //$ROUNDTYPE_Ca = $xml->createElement("ROUNDTYPE", ""); $GSTCLASS_c = $xml->createElement("GSTCLASS", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "CGST"); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$c_aot.""); $VATEXPAMOUNT_C = $xml->createElement("VATEXPAMOUNT", "".$c_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); //$LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_Ca); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_c); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_C); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for CGST ledger //star for SGST ledger if($sgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); //$ROUNDTYPE_S = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "SGST"); $GSTCLASS_s = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$s_aot.""); $AMOUNT_S = $xml->createElement("VATEXPAMOUNT", "".$s_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); //$LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_S); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_s); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_S); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for SGST ledger //star for UGST ledger if($ugst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_U = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "UGST"); $GSTCLASS_u = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$u_aot.""); $AMOUNT_U = $xml->createElement("VATEXPAMOUNT", "".$u_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_U); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_u); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_U); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for UGST ledger //star for IGST ledger if($igst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_I = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "IGST"); $GSTCLASS_i = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$taot.""); $AMOUNT_I = $xml->createElement("VATEXPAMOUNT", "".$taot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_I); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_i); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_I); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for IGST ledger $PAYROLLMODEOFPAYMENT_LIST_v = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $ATTDRECORDS_LIST_v = $xml->createElement("ATTDRECORDS.LIST", " "); $GSTEWAYCONSIGNORADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $GSTEWAYCONSIGNEEADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $TEMPGSTRATEDETAILS_LIST_v = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST_v); $VOUCHER->appendChild($ATTDRECORDS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST_v); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST_v); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY2 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO2 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO2->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME2 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE2 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_NAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPNAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPSTATE2); $COMPANY2->appendChild($REMOTECMPINFO2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY3 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO3 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO3->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME3 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME3 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE3 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_NAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPNAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPSTATE3); $COMPANY3->appendChild($REMOTECMPINFO3); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->appendChild($COMPANY3); $test = $xml->createElement("TALLYMESSAGE", " "); $test->setAttribute("xmlns:UDF", "TallyUDF"); } // end of form two else{ $form2 = $this->model->salesModel($fid[$i]); $form3 = $this->model->salesExpenseModel($fid[$i]); $info_cnt = count($form2); $info_cnt2 = count($form3); $tot_g_sgst = 0; $tot_g_cgst = 0; $tot_g_ugst = 0; $tot_g_igst = 0; for ($g=0; $g < $info_cnt2; $g++) { //foreach ($form3 as $gst => $g) { $gamt = $form3[$g]['ex_amount']; $g_sgst = $form3[$g]['sgst']; $g_cgst = $form3[$g]['cgst']; $g_ugst = $form3[$g]['ugst']; $g_igst = $form3[$g]['igst']; if($g_sgst != '0.00'){ $g_sgst_payble = $gamt*$g_sgst/100; //echo "--payble sgst<br>"; $tot_g_sgst += $g_sgst_payble; } if($g_cgst != '0.00'){ $g_cgst_payble = $gamt*$g_cgst/100; //echo "--payble cgst<br>"; $tot_g_cgst += $g_cgst_payble; } if($g_ugst != '0.00'){ $g_ugst_payble = $gamt*$g_ugst/100; //echo "--payble ugst<br>"; $tot_g_ugst += $g_ugst_payble; } if($g_igst != '0.00'){ $g_igst_payble = $gamt*$g_igst/100; //echo "--payble cgst<br>"; $tot_g_igst += $g_igst_payble; } } $tot_g_sgst; $tot_g_cgst; $tot_g_ugst; $tot_g_igst; $all_gst_tot = $tot_g_sgst+$tot_g_cgst+$tot_g_ugst+$tot_g_igst; // sum of same other expenses $result = array(); foreach($form3 as $k => $v) { $id = $v['ex_name']; $result[$id][] = $v['ex_amount']; } $other_expense = array(); foreach($result as $key => $value) { $where_exp = array('eid' => $key); $i_name = $this->model->DetailData('tbl_expense', $where_exp); $in = $i_name[0]['ename']; $other_expense[] = array('ex_name' => $key, 'ex_amount' => array_sum($value), 'iname' => $in); } $oecnt = count($other_expense); //die; $tsgst = 0; $tcgst = 0; $tugst = 0; $tigst = 0; foreach ($form2 as $total => $tot) { $sgst = $tot['s_aot']; $cgst = $tot['c_aot']; $ugst = $tot['u_aot']; $igst = $tot['i_aot']; $tsgst+=$sgst; $tcgst+=$cgst; $tugst+=$ugst; $tigst+=$igst; } $frm = $this->model->sales_form_data($fid[$i]); $amt_gross = $frm[0]['amt_gross']; $new_tot_expns = 0; $amt_tax = 0; foreach ($frm as $key => $tot) { $expns = $tot['expenses']; $amt_taxable = $tot['amt_taxable']; $tot_expns = 0; if($expns != ''){ foreach ($expns as $tt => $t) { $newtt = $t['ex_amount']; $tot_expns+=$newtt; } }else{ $tot_expns = 0; } $new_tot_expns+=$tot_expns; $amt_tax+=$amt_taxable; } $new_tot_expns; $amt_tax; $tot_tax = $tsgst+$tcgst+$tugst+$tigst; $totcredit = $new_tot_expns+$tot_tax+$amt_tax+$all_gst_tot; /*echo $amt_gross."<br>"; echo $totcredit; die; */ $diff_amt = round(abs($amt_gross - $totcredit),2); $stage = $sales_form[0]['stage']; $date = $sales_form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($sales_form[0]['date_time'])); $basic_time = date("h:i", strtotime($sales_form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $sales_form[0]['voucher_no']; $m_ledger_name = $sales_form[0]['l_name']; $narration = $sales_form[0]['narration']; $amt_gross = $sales_form[0]['amt_gross']; if($amt_gross < $totcredit){ $amt_gross = $amt_gross + $diff_amt; }else{ $amt_gross = $amt_gross; } $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Invoice Voucher View"); $adrs_list = $xml->createElement("ADDRESS.LIST", " "); $adrs_list->setAttribute("TYPE", "String"); $adrs = $xml->createElement("ADDRESS", "Gujarat, India"); $basic_buy_list = $xml->createElement("BASICBUYERADDRESS.LIST", " "); $basic_buy_list->setAttribute("TYPE", "String"); $basic_buy_adrs = $xml->createElement("BASICBUYERADDRESS", "Gujarat, India"); $OLDAUDITENTRYIDS_list = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_list->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $DATE = $xml->createElement("DATE", "".$m_date.""); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); $PARTYNAME = $xml->createElement("PARTYNAME", "".$m_ledger_name.""); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $BASICBASEPARTYNAME = $xml->createElement("BASICBASEPARTYNAME", "".$m_ledger_name.""); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Invoice Voucher View"); $PLACEOFSUPPLY = $xml->createElement("PLACEOFSUPPLY", "Gujarat"); $BASICBUYERNAME = $xml->createElement("BASICBUYERNAME", "".$m_ledger_name.""); $BASICDATETIMEOFINVOICE = $xml->createElement("BASICDATETIMEOFINVOICE", "".$basic_date_time.""); $BASICDATETIMEOFREMOVAL = $xml->createElement("BASICDATETIMEOFREMOVAL", "".$basic_date_time.""); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $CONSIGNEESTATENAME = $xml->createElement("CONSIGNEESTATENAME", "Gujarat"); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $AUDITED = $xml->createElement("AUDITED", "No"); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $ISINVOICE = $xml->createElement("ISINVOICE", "Yes"); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "Yes"); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $ISVOID = $xml->createElement("ISVOID", "No"); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $ISDELETED = $xml->createElement("ISDELETED", "No"); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $ALTERID = $xml->createElement("ALTERID", "29"); $MASTERID = $xml->createElement("MASTERID", "14"); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066560"); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $VOUCHER->appendChild($adrs_list); $adrs_list->appendChild($adrs); $VOUCHER->appendChild($basic_buy_list); $basic_buy_list->appendChild($basic_buy_adrs); $VOUCHER->appendChild($OLDAUDITENTRYIDS_list); $OLDAUDITENTRYIDS_list->appendChild($OLDAUDITENTRYIDS); $VOUCHER->appendChild($DATE); $VOUCHER->appendChild($GUID); $VOUCHER->appendChild($STATENAME); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); $VOUCHER->appendChild($PARTYNAME); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHER->appendChild($VOUCHERNUMBER); $VOUCHER->appendChild($PARTYLEDGERNAME); $VOUCHER->appendChild($BASICBASEPARTYNAME); $VOUCHER->appendChild($CSTFORMISSUETYPE); $VOUCHER->appendChild($CSTFORMRECVTYPE); $VOUCHER->appendChild($FBTPAYMENTTYPE); $VOUCHER->appendChild($PERSISTEDVIEW); $VOUCHER->appendChild($PLACEOFSUPPLY); $VOUCHER->appendChild($BASICBUYERNAME); $VOUCHER->appendChild($BASICDATETIMEOFINVOICE); $VOUCHER->appendChild($BASICDATETIMEOFREMOVAL); $VOUCHER->appendChild($VCHGSTCLASS); $VOUCHER->appendChild($CONSIGNEESTATENAME); $VOUCHER->appendChild($DIFFACTUALQTY); $VOUCHER->appendChild($ISMSTFROMSYNC); $VOUCHER->appendChild($ASORIGINAL); $VOUCHER->appendChild($AUDITED); $VOUCHER->appendChild($FORJOBCOSTING); $VOUCHER->appendChild($ISOPTIONAL); $VOUCHER->appendChild($EFFECTIVEDATE); $VOUCHER->appendChild($USEFOREXCISE); $VOUCHER->appendChild($ISFORJOBWORKIN); $VOUCHER->appendChild($ALLOWCONSUMPTION); $VOUCHER->appendChild($USEFORINTEREST); $VOUCHER->appendChild($USEFORGAINLOSS); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $VOUCHER->appendChild($USEFORCOMPOUND); $VOUCHER->appendChild($USEFORSERVICETAX); $VOUCHER->appendChild($ISEXCISEVOUCHER); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $VOUCHER->appendChild($EXCISEOPENING); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $VOUCHER->appendChild($ISVATOVERRIDDEN); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $VOUCHER->appendChild($ISISDVOUCHER); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $VOUCHER->appendChild($GSTNOTEXPORTED); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $VOUCHER->appendChild($ISCANCELLED); $VOUCHER->appendChild($HASCASHFLOW); $VOUCHER->appendChild($ISPOSTDATED); $VOUCHER->appendChild($USETRACKINGNUMBER); $VOUCHER->appendChild($ISINVOICE); $VOUCHER->appendChild($MFGJOURNAL); $VOUCHER->appendChild($HASDISCOUNTS); $VOUCHER->appendChild($ASPAYSLIP); $VOUCHER->appendChild($ISCOSTCENTRE); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $VOUCHER->appendChild($ISBLANKCHEQUE); $VOUCHER->appendChild($ISVOID); $VOUCHER->appendChild($ISONHOLD); $VOUCHER->appendChild($ORDERLINESTATUS); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VOUCHER->appendChild($VATISPURCEXEMPTED); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $VOUCHER->appendChild($ISVATDUTYPAID); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $VOUCHER->appendChild($ISDELETED); $VOUCHER->appendChild($CHANGEVCHMODE); $VOUCHER->appendChild($ALTERID); $VOUCHER->appendChild($MASTERID); $VOUCHER->appendChild($VOUCHERKEY); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $VOUCHER->appendChild($AUDITENTRIES_LIST); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //star for debit ledger $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "Yes"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$amt_gross.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $bill_name = $xml->createElement("NAME", "".$voucher_no.""); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "-".$amt_gross.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for debit ledger //star for other expenses ledger for ($oe=0; $oe < $oecnt; $oe++) { $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$other_expense[$oe]['iname'].""); $GSTCLASS_oe = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$other_expense[$oe]['ex_amount'].""); $VATEXPAMOUNT_LE = $xml->createElement("VATEXPAMOUNT", "".$other_expense[$oe]['ex_amount'].""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_oe); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for other expenses ledger if($amt_gross > $totcredit){ // Start of Round of $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "Round Amount"); $GSTCLASS_oe = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$diff_amt.""); $VATEXPAMOUNT_LE = $xml->createElement("VATEXPAMOUNT", "".$diff_amt.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_oe); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); // End of Round of } //star for CGST ledger if($tcgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_Ca = $xml->createElement("ROUNDTYPE", ""); $GSTCLASS_c = $xml->createElement("GSTCLASS", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "CGST"); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$tcgst+$tot_g_cgst.""); $VATEXPAMOUNT_C = $xml->createElement("VATEXPAMOUNT", "".$tcgst+$tot_g_cgst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_Ca); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_c); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_C); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for CGST ledger //star for SGST ledger if($tsgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_S = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "SGST"); $GSTCLASS_s = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$tsgst+$tot_g_sgst.""); $AMOUNT_S = $xml->createElement("VATEXPAMOUNT", "".$tsgst+$tot_g_sgst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_S); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_s); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_S); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for SGST ledger //star for UGST ledger if($tugst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_U = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "UGST"); $GSTCLASS_u = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$tugst+$tot_g_ugst.""); $AMOUNT_U = $xml->createElement("VATEXPAMOUNT", "".$tugst+$tot_g_ugst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_U); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_u); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_U); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for UGST ledger //star for IGST ledger if($tigst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_I = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "IGST"); $GSTCLASS_i = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$tigst+$tot_g_igst.""); $AMOUNT_I = $xml->createElement("VATEXPAMOUNT", "".$tigst+$tot_g_igst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_I); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_i); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_I); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for IGST ledger for ($inv=0; $inv < $info_cnt; $inv++) { $item_name = $form2[$inv]['item']; $rate = $form2[$inv]['rate']; $discount = $form2[$inv]['discount_two']; $amount = $form2[$inv]['amt_taxable']; $qty = $form2[$inv]['qty']; $s_ledger_name = $form2[$inv]['l_name']; $ALLINVENTORYENTRIES_LIST = $xml->createElement("ALLINVENTORYENTRIES.LIST", " "); $STOCKITEMNAME = $xml->createElement("STOCKITEMNAME", "".$item_name.""); $ISDEEMEDPOSITIVE_LE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ISLASTDEEMEDPOSITIVE_LE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISAUTONEGATE = $xml->createElement("ISAUTONEGATE", "No"); $ISCUSTOMSCLEARANCE = $xml->createElement("ISCUSTOMSCLEARANCE", "No"); $ISTRACKCOMPONENT = $xml->createElement("ISTRACKCOMPONENT", "No"); $ISTRACKPRODUCTION = $xml->createElement("ISTRACKPRODUCTION", "No"); $ISPRIMARYITEM = $xml->createElement("ISPRIMARYITEM", "No"); $ISSCRAP = $xml->createElement("ISSCRAP", "No"); $RATE = $xml->createElement("RATE", "".$rate.""); $DISCOUNT = $xml->createElement("DISCOUNT", "".$discount.""); $AMOUNT = $xml->createElement("AMOUNT", "".$amount.""); $ACTUALQTY_AE = $xml->createElement("ACTUALQTY", "".$qty.""); $BILLEDQTY_AE = $xml->createElement("BILLEDQTY", "".$qty.""); $BATCHALLOCATIONS_LIST = $xml->createElement("BATCHALLOCATIONS.LIST", " "); $GODOWNNAME = $xml->createElement("GODOWNNAME", "Main Location"); $BATCHNAME = $xml->createElement("BATCHNAME", "Primary Batch"); $INDENTNO = $xml->createElement("INDENTNO", ""); $ORDERNO = $xml->createElement("ORDERNO", ""); $TRACKINGNUMBER = $xml->createElement("TRACKINGNUMBER", ""); $DYNAMICCSTISCLEARED = $xml->createElement("DYNAMICCSTISCLEARED", "No"); $AMOUNT_ba = $xml->createElement("AMOUNT", "".$amount.""); $ACTUALQTY = $xml->createElement("ACTUALQTY", "".$qty.""); $BILLEDQTY = $xml->createElement("BILLEDQTY", "".$qty.""); $ADDITIONALDETAILS_LIST = $xml->createElement("ADDITIONALDETAILS.LIST", " "); $VOUCHERCOMPONENTLIST_LIST = $xml->createElement("VOUCHERCOMPONENTLIST.LIST", " "); $ACCOUNTINGALLOCATIONS_LIST = $xml->createElement("ACCOUNTINGALLOCATIONS.LIST", " "); $OLDAUDITENTRYIDS_LIST_AIE = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_AIE->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_AIE = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME_AIE = $xml->createElement("LEDGERNAME", "".$s_ledger_name.""); $GSTCLASS_AIE = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE_AIE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM_AIE = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES_AIE = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER_AIE = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE_AIE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED_AIE = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED_AIE = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_AIE = $xml->createElement("AMOUNT", "".$amount.""); $SERVICETAXDETAILS_LIST_AIE = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_AIE = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST_AIE = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST_AIE = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AIE = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AIE = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AIE = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AIE = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_AIE1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST_AIE = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST_AL = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST_AIE = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST_AIE = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST_AIE = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST_AIE = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST_AIE1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST_AIE = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST_AIE = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST_AIE = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST_AIE1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST_AIE = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_AIE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST_AIE = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $DUTYHEADDETAILS_LIST_AIE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST_AIE = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST_AIE = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST_AIE = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $EXCISEALLOCATIONS_LIST_AIE = $xml->createElement("EXCISEALLOCATIONS.LIST", " "); $EXPENSEALLOCATIONS_LIST_AIE = $xml->createElement("EXPENSEALLOCATIONS.LIST", " "); $VOUCHER->appendChild($ALLINVENTORYENTRIES_LIST); $ALLINVENTORYENTRIES_LIST->appendChild($STOCKITEMNAME); $ALLINVENTORYENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE_LE); $ALLINVENTORYENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE_LE); $ALLINVENTORYENTRIES_LIST->appendChild($ISAUTONEGATE); $ALLINVENTORYENTRIES_LIST->appendChild($ISCUSTOMSCLEARANCE); $ALLINVENTORYENTRIES_LIST->appendChild($ISTRACKCOMPONENT); $ALLINVENTORYENTRIES_LIST->appendChild($ISTRACKPRODUCTION); $ALLINVENTORYENTRIES_LIST->appendChild($ISPRIMARYITEM); $ALLINVENTORYENTRIES_LIST->appendChild($ISSCRAP); $ALLINVENTORYENTRIES_LIST->appendChild($RATE); $ALLINVENTORYENTRIES_LIST->appendChild($DISCOUNT); $ALLINVENTORYENTRIES_LIST->appendChild($AMOUNT); $ALLINVENTORYENTRIES_LIST->appendChild($ACTUALQTY_AE); $ALLINVENTORYENTRIES_LIST->appendChild($BILLEDQTY_AE); $ALLINVENTORYENTRIES_LIST->appendChild($BATCHALLOCATIONS_LIST); $BATCHALLOCATIONS_LIST->appendChild($GODOWNNAME); $BATCHALLOCATIONS_LIST->appendChild($BATCHNAME); $BATCHALLOCATIONS_LIST->appendChild($INDENTNO); $BATCHALLOCATIONS_LIST->appendChild($ORDERNO); $BATCHALLOCATIONS_LIST->appendChild($TRACKINGNUMBER); $BATCHALLOCATIONS_LIST->appendChild($DYNAMICCSTISCLEARED); $BATCHALLOCATIONS_LIST->appendChild($AMOUNT_ba); $BATCHALLOCATIONS_LIST->appendChild($ACTUALQTY); $BATCHALLOCATIONS_LIST->appendChild($BILLEDQTY); $BATCHALLOCATIONS_LIST->appendChild($ADDITIONALDETAILS_LIST); $BATCHALLOCATIONS_LIST->appendChild($VOUCHERCOMPONENTLIST_LIST); $ALLINVENTORYENTRIES_LIST->appendChild($ACCOUNTINGALLOCATIONS_LIST); $ACCOUNTINGALLOCATIONS_LIST->appendChild($OLDAUDITENTRYIDS_LIST_AIE); $OLDAUDITENTRYIDS_LIST_AIE->appendChild($OLDAUDITENTRYIDS_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($LEDGERNAME_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($GSTCLASS_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISDEEMEDPOSITIVE_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($LEDGERFROMITEM_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($REMOVEZEROENTRIES_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISPARTYLEDGER_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISLASTDEEMEDPOSITIVE_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISCAPVATTAXALTERED_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISCAPVATNOTCLAIMED_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($AMOUNT_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($SERVICETAXDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($BANKALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($BILLALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INTERESTCOLLECTION_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($OLDAUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($AUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INPUTCRALLOCS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($DUTYHEADDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($RATEDETAILS_LIST_AL); $ACCOUNTINGALLOCATIONS_LIST->appendChild($SUMMARYALLOCS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($STPYMTDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TAXBILLALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($VATSTATUTORYDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($COSTTRACKALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($REFVOUCHERDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INVOICEWISEDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($VATITCDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ADVANCETAXDETAILS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($EXCISEALLOCATIONS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($EXPENSEALLOCATIONS_LIST_AIE); } $PAYROLLMODEOFPAYMENT_LIST_v = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $ATTDRECORDS_LIST_v = $xml->createElement("ATTDRECORDS.LIST", " "); $GSTEWAYCONSIGNORADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $GSTEWAYCONSIGNEEADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $TEMPGSTRATEDETAILS_LIST_v = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST_v); $VOUCHER->appendChild($ATTDRECORDS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST_v); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST_v); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY2 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO2 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO2->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME2 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE2 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_NAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPNAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPSTATE2); $COMPANY2->appendChild($REMOTECMPINFO2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY3 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO3 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO3->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME3 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME3 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE3 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_NAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPNAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPSTATE3); $COMPANY3->appendChild($REMOTECMPINFO3); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->appendChild($COMPANY3); $test = $xml->createElement("TALLYMESSAGE", " "); $test->setAttribute("xmlns:UDF", "TallyUDF"); } } //end of sales elseif($stage == 'receipt'){ $form_receipt = $this->model->office_form_receipt($fid[$i]); $stage = $form_receipt[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form_receipt[0]['voucher_type']; }else{ $b = $stage; } $date = $form_receipt[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_receipt[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_receipt[0]['voucher_no']; $m_ledger_name = $form_receipt[0]['party_ledger']; $ms_ledger = $form_receipt[0]['cr_ledger']; $ms_ledger_two = $form_receipt[0]['dr_ledger']; $narration = $form_receipt[0]['narration']; $amt_gross = $form_receipt[0]['amt_gross']; $trans_type = $form_receipt[0]['trans_type']; $check_no = $form_receipt[0]['check_no']; $check_date = $form_receipt[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($a=0; $a < 2; $a++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($a == '0'){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); if($a == '0'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form_receipt[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form_receipt[0]['amt_gross'].""); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form_receipt[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form_receipt[0]['amt_gross'].""); } $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank' && $a == '1'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end } //end of receipt elseif($stage == 'journal'){ $form_journal = $this->model->xml_journal($fid[$i]); //echo "<pre>"; print_r($form); die; $stage = $form_journal[0]['stage']; $date = $form_journal[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_journal[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_journal[0]['voucher_no']; $m_ledger_name = $form_journal[0]['l_name']; $ms_ledger = $form_journal[0]['l_name_one']; $ms_ledger_two = $form_journal[0]['l_name_two']; $narration = $form_journal[0]['narration']; $amt_gross = $form_journal[0]['amt_gross']; $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($b=0; $b < 2; $b++) { if($b == 0){ $s_ledger_name = $ms_ledger; }else{ $s_ledger_name = $ms_ledger_two; } $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$s_ledger_name.""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); if($b == 0){ $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); }else{ $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); } $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); if($b == 0){ $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); }else{ $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); } $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED); if($b == 0){ $m_effect = $form_journal[0]['m_effect']; if($m_effect == 'cr'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } }else{ $ms_effect = $form_journal[0]['ms_effect']; if($ms_effect == 'cr'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } } $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); /* $DATE_BA_1 = $xml->createElement("DATE", "20180815"); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "20180815"); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "000340"); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "10000.00"); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1);*/ //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } //end of journal elseif($stage == 'payment'){ $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $where = array('fid' => $fid[$i]); //$form = $this->model->DetailData('tbl_form', $where); $form_payment = $this->model->office_form_paymet($fid[$i]); $form_info = $this->model->DetailData('tbl_form_info', $where); $fi_count = count($form_info); $stage = $form_payment[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form_payment[0]['voucher_type']; }else{ $stage = $stage; } $date = $form_payment[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_payment[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_payment[0]['voucher_no']; $m_ledger_name = $form_payment[0]['party_ledger']; $ms_ledger = $form_payment[0]['debit_ledger']; $ms_ledger_two = $form_payment[0]['credit_ledger']; $narration = $form_payment[0]['narration']; $amt_gross = $form_payment[0]['amt_gross']; $trans_type = $form_payment[0]['trans_type']; $check_no = $form_payment[0]['check_no']; $check_date = $form_payment[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-0000aa05:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($c=0; $c < 2; $c++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($c == 0){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_1 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_1); $ISCAPVATNOTCLAIMED_1 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_1); if($c == 0){ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available if($trans_type == 'cash'){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); }else{ if($c == 1){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $BANKPARTYNAME_BA_1 = $xml->createElement("BANKPARTYNAME", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($BANKPARTYNAME_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //end If bill allocation is available }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); } } $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $GSTEWAYCONSIGNORADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST); $GSTEWAYCONSIGNEEADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } // end of payment elseif($stage == 'credit'){ $where = array('fid' => $fid[$i]); $form_credit = $this->model->xml_credit_one($fid[$i]); //echo "<pre>"; print_r($form); die; $form_info = $this->model->xml_credit_two($fid[$i]); $fi_count = count($form_info); //echo "<pre>"; print_r($form_info); die; $stage = $form_credit[0]['stage']; $date = $form_credit[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_credit[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_credit[0]['voucher_no']; $m_ledger_name = $form_credit[0]['l_name']; $ms_ledger = $form_credit[0]['l_name_one']; //$debit_ledger = $form[0]['debit_ledger']; $narration = $form_credit[0]['narration']; $amt_gross = $form_credit[0]['amt_gross']; $trans_type = $form_credit[0]['trans_type']; $check_no = $form_credit[0]['check_no']; $check_date = $form_credit[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "Credit Note"); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $BASICBUYERADDRESS_LIST = $xml->createElement("BASICBUYERADDRESS.LIST", " "); $BASICBUYERADDRESS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($BASICBUYERADDRESS_LIST); $BASICBUYERADDRESS = $xml->createElement("BASICBUYERADDRESS", "Gandhinagar"); $BASICBUYERADDRESS_LIST->appendChild($BASICBUYERADDRESS); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $REFERENCEDATE = $xml->createElement("REFERENCEDATE", "".$m_date.""); $VOUCHER->appendChild($REFERENCEDATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $VOUCHER->appendChild($STATENAME); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "Credit Note"); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form_credit[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form_credit[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end for ($j=0; $j < $fi_count; $j++){ //ALLLEDGERENTRIES.LIST block start $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$form_info[$j]['debit_ledger'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form_info[$j]['amt_taxable'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form_info[$j]['amt_taxable'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available /* $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); }*/ //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end }// for loop ends $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } //end of credit elseif($stage == 'debit'){ $form_debit = $this->model->xml_debit_one($fid[$i]); $form_info = $this->model->xml_debit_two($fid[$i]); $fi_count = count($form_info); //echo "<pre>"; print_r($form_info); die; $stage = $form_debit[0]['stage']; $date = $form_debit[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_debit[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_debit[0]['voucher_no']; $m_ledger_name = $form_debit[0]['l_name']; $ms_ledger = $form_debit[0]['l_name_one']; $ms_ledger_two = $form_debit[0]['ms_ledger_two']; $narration = $form_debit[0]['narration']; $amt_gross = $form_debit[0]['amt_gross']; $trans_type = $form_debit[0]['trans_type']; $check_no = $form_debit[0]['check_no']; $check_date = $form_debit[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "Debit Note"); $VOUCHER->setAttribute("ACTION", "Debit"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $BASICBUYERADDRESS_LIST = $xml->createElement("BASICBUYERADDRESS.LIST", " "); $BASICBUYERADDRESS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($BASICBUYERADDRESS_LIST); $BASICBUYERADDRESS = $xml->createElement("BASICBUYERADDRESS", " "); $BASICBUYERADDRESS_LIST->appendChild($BASICBUYERADDRESS); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $REFERENCEDATE = $xml->createElement("REFERENCEDATE", "".$m_date.""); $VOUCHER->appendChild($REFERENCEDATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $STATENAME = $xml->createElement("STATENAME", " "); $VOUCHER->appendChild($STATENAME); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", " "); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "Debit Note"); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_1 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_1); $ISCAPVATNOTCLAIMED_1 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_1); $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form_debit[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form_debit[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end for ($j=0; $j < $fi_count; $j++){ //ALLLEDGERENTRIES.LIST block start $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$form_info[$j]['credit_ledger'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_2 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_2); $ISCAPVATNOTCLAIMED_2 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_2); $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form_info[$j]['amt_taxable'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form_info[$j]['amt_taxable'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end }// for loop ends $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } // end of debit elseif($stage == 'purchase'){ $form_pr = $this->model->sm($fid[$i]); $note = $form_pr[0]['note_two']; if($note == 'form_two'){ $form_pr_two = $this->model->sales_two_model($fid[$i]); $cgst = $form_pr_two[0]['cgst']; $c_aot = $form_pr_two[0]['c_aot']; $sgst = $form_pr_two[0]['sgst']; $s_aot = $form_pr_two[0]['s_aot']; $ugst = $form_pr_two[0]['ugst']; $u_aot = $form_pr_two[0]['u_aot']; $igst = $form_pr_two[0]['igst']; $i_aot = $form_pr_two[0]['i_aot']; //echo "<pre>"; print_r($form); die; $stage = $form_pr_two[0]['stage']; $date = $form_pr_two[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_pr_two[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_pr_two[0]['voucher_no']; $dr_ledger = $form_pr_two[0]['dr_ledger']; $narration = $form_pr_two[0]['narration']; $amt_gross = $form_pr_two[0]['amt_gross']; $cr_ledger = $form_pr_two[0]['cr_ledger']; $cr_amount = $form_pr_two[0]['amt_taxable']; $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); // $adrs_list = $xml->createElement("ADDRESS.LIST", " "); // $adrs_list->setAttribute("TYPE", "String"); // $adrs = $xml->createElement("ADDRESS", "Gujarat, India"); // $basic_buy_list = $xml->createElement("BASICBUYERADDRESS.LIST", " "); // $basic_buy_list->setAttribute("TYPE", "String"); // $basic_buy_adrs = $xml->createElement("BASICBUYERADDRESS", "Gujarat, India"); $OLDAUDITENTRYIDS_list = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_list->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $DATE = $xml->createElement("DATE", "".$m_date.""); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); //$PARTYNAME = $xml->createElement("PARTYNAME", "".$dr_ledger.""); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $REFERENCE = $xml->createElement("REFERENCE", "".$voucher_no.""); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$dr_ledger.""); $BASICBASEPARTYNAME = $xml->createElement("BASICBASEPARTYNAME", "".$dr_ledger.""); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); //$PLACEOFSUPPLY = $xml->createElement("PLACEOFSUPPLY", "Gujarat"); $BASICBUYERNAME = $xml->createElement("BASICBUYERNAME", "".$dr_ledger.""); $BASICDATETIMEOFINVOICE = $xml->createElement("BASICDATETIMEOFINVOICE", "".$basic_date_time.""); $BASICDATETIMEOFREMOVAL = $xml->createElement("BASICDATETIMEOFREMOVAL", "".$basic_date_time.""); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $ENTEREDBY = $xml->createElement("ENTEREDBY", "Admin"); //$CONSIGNEESTATENAME = $xml->createElement("CONSIGNEESTATENAME", "Gujarat"); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $AUDITED = $xml->createElement("AUDITED", "No"); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $ISVOID = $xml->createElement("ISVOID", "No"); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $ISDELETED = $xml->createElement("ISDELETED", "No"); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $ALTERID = $xml->createElement("ALTERID", "29"); $MASTERID = $xml->createElement("MASTERID", "14"); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066560"); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); /*$VOUCHER->appendChild($adrs_list); $adrs_list->appendChild($adrs); $VOUCHER->appendChild($basic_buy_list); $basic_buy_list->appendChild($basic_buy_adrs); */ $VOUCHER->appendChild($OLDAUDITENTRYIDS_list); $OLDAUDITENTRYIDS_list->appendChild($OLDAUDITENTRYIDS); $VOUCHER->appendChild($DATE); $VOUCHER->appendChild($GUID); $VOUCHER->appendChild($STATENAME); $VOUCHER->appendChild($NARRATION); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); //$VOUCHER->appendChild($PARTYNAME); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHER->appendChild($REFERENCE); $VOUCHER->appendChild($VOUCHERNUMBER); $VOUCHER->appendChild($PARTYLEDGERNAME); $VOUCHER->appendChild($BASICBASEPARTYNAME); $VOUCHER->appendChild($CSTFORMISSUETYPE); $VOUCHER->appendChild($CSTFORMRECVTYPE); $VOUCHER->appendChild($FBTPAYMENTTYPE); $VOUCHER->appendChild($PERSISTEDVIEW); //$VOUCHER->appendChild($PLACEOFSUPPLY); $VOUCHER->appendChild($BASICBUYERNAME); $VOUCHER->appendChild($BASICDATETIMEOFINVOICE); $VOUCHER->appendChild($BASICDATETIMEOFREMOVAL); $VOUCHER->appendChild($VCHGSTCLASS); $VOUCHER->appendChild($ENTEREDBY); //$VOUCHER->appendChild($CONSIGNEESTATENAME); $VOUCHER->appendChild($DIFFACTUALQTY); $VOUCHER->appendChild($ISMSTFROMSYNC); $VOUCHER->appendChild($ASORIGINAL); $VOUCHER->appendChild($AUDITED); $VOUCHER->appendChild($FORJOBCOSTING); $VOUCHER->appendChild($ISOPTIONAL); $VOUCHER->appendChild($EFFECTIVEDATE); $VOUCHER->appendChild($USEFOREXCISE); $VOUCHER->appendChild($ISFORJOBWORKIN); $VOUCHER->appendChild($ALLOWCONSUMPTION); $VOUCHER->appendChild($USEFORINTEREST); $VOUCHER->appendChild($USEFORGAINLOSS); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $VOUCHER->appendChild($USEFORCOMPOUND); $VOUCHER->appendChild($USEFORSERVICETAX); $VOUCHER->appendChild($ISEXCISEVOUCHER); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $VOUCHER->appendChild($EXCISEOPENING); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $VOUCHER->appendChild($ISVATOVERRIDDEN); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $VOUCHER->appendChild($ISISDVOUCHER); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $VOUCHER->appendChild($GSTNOTEXPORTED); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $VOUCHER->appendChild($ISCANCELLED); $VOUCHER->appendChild($HASCASHFLOW); $VOUCHER->appendChild($ISPOSTDATED); $VOUCHER->appendChild($USETRACKINGNUMBER); $VOUCHER->appendChild($ISINVOICE); $VOUCHER->appendChild($MFGJOURNAL); $VOUCHER->appendChild($HASDISCOUNTS); $VOUCHER->appendChild($ASPAYSLIP); $VOUCHER->appendChild($ISCOSTCENTRE); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $VOUCHER->appendChild($ISBLANKCHEQUE); $VOUCHER->appendChild($ISVOID); $VOUCHER->appendChild($ISONHOLD); $VOUCHER->appendChild($ORDERLINESTATUS); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VOUCHER->appendChild($VATISPURCEXEMPTED); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $VOUCHER->appendChild($ISVATDUTYPAID); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $VOUCHER->appendChild($ISDELETED); $VOUCHER->appendChild($CHANGEVCHMODE); $VOUCHER->appendChild($ALTERID); $VOUCHER->appendChild($MASTERID); $VOUCHER->appendChild($VOUCHERKEY); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $VOUCHER->appendChild($AUDITENTRIES_LIST); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //star for debit ledger $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$dr_ledger.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "Yes"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$amt_gross.""); $VATEXPAMOUNT_DR = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $bill_name = $xml->createElement("NAME", "".$voucher_no.""); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "".$amt_gross.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_DR); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for debit ledger //star for credit ledger $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$cr_ledger.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$cr_amount.""); $VATEXPAMOUNT_CR = $xml->createElement("VATEXPAMOUNT", "-".$cr_amount.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$bill_name = $xml->createElement("NAME", "vouchr no"); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "".$cr_amount.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); */ $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_CR); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for credit ledger //star for CGST ledger if($cgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); //$ROUNDTYPE_Ca = $xml->createElement("ROUNDTYPE", ""); $GSTCLASS_c = $xml->createElement("GSTCLASS", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "CGST"); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$c_aot.""); $VATEXPAMOUNT_C = $xml->createElement("VATEXPAMOUNT", "-".$c_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); //$LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_Ca); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_c); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_C); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for CGST ledger //star for SGST ledger if($sgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); //$ROUNDTYPE_S = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "SGST"); $GSTCLASS_s = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$s_aot.""); $AMOUNT_S = $xml->createElement("VATEXPAMOUNT", "-".$s_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); //$LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_S); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_s); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_S); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for SGST ledger //star for UGST ledger if($ugst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_U = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "UGST"); $GSTCLASS_u = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$u_aot.""); $AMOUNT_U = $xml->createElement("VATEXPAMOUNT", "-".$u_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_U); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_u); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_U); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for UGST ledger //star for IGST ledger if($igst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_I = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "IGST"); $GSTCLASS_i = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$taot.""); $AMOUNT_I = $xml->createElement("VATEXPAMOUNT", "-".$taot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_I); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_i); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_I); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for IGST ledger $PAYROLLMODEOFPAYMENT_LIST_v = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $ATTDRECORDS_LIST_v = $xml->createElement("ATTDRECORDS.LIST", " "); $GSTEWAYCONSIGNORADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $GSTEWAYCONSIGNEEADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $TEMPGSTRATEDETAILS_LIST_v = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST_v); $VOUCHER->appendChild($ATTDRECORDS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST_v); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST_v); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY2 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO2 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO2->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME2 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE2 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_NAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPNAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPSTATE2); $COMPANY2->appendChild($REMOTECMPINFO2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY3 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO3 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO3->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME3 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME3 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE3 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_NAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPNAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPSTATE3); $COMPANY3->appendChild($REMOTECMPINFO3); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->appendChild($COMPANY3); $test = $xml->createElement("TALLYMESSAGE", " "); $test->setAttribute("xmlns:UDF", "TallyUDF"); } // end of purchase form two else{ $pr_form2 = $this->model->salesModel($fid[$i]); $pr_form3 = $this->model->salesExpenseModel($fid[$i]); $info_cnt = count($pr_form2); $info_cnt2 = count($pr_form3); //echo "<pre>"; print_r($pr_form2); die; $tot_g_sgst = 0; $tot_g_cgst = 0; $tot_g_ugst = 0; $tot_g_igst = 0; for ($g=0; $g < $info_cnt2; $g++) { //foreach ($form3 as $gst => $g) { $gamt = $pr_form3[$g]['ex_amount']; $g_sgst = $pr_form3[$g]['sgst']; $g_cgst = $pr_form3[$g]['cgst']; $g_ugst = $pr_form3[$g]['ugst']; $g_igst = $pr_form3[$g]['igst']; if($g_sgst != '0.00'){ $g_sgst_payble = $gamt*$g_sgst/100; //echo "--payble sgst<br>"; $tot_g_sgst += $g_sgst_payble; } if($g_cgst != '0.00'){ $g_cgst_payble = $gamt*$g_cgst/100; //echo "--payble cgst<br>"; $tot_g_cgst += $g_cgst_payble; } if($g_ugst != '0.00'){ $g_ugst_payble = $gamt*$g_ugst/100; //echo "--payble ugst<br>"; $tot_g_ugst += $g_ugst_payble; } if($g_igst != '0.00'){ $g_igst_payble = $gamt*$g_igst/100; //echo "--payble cgst<br>"; $tot_g_igst += $g_igst_payble; } } $tot_g_sgst; $tot_g_cgst; $tot_g_ugst; $tot_g_igst; $all_gst_tot = $tot_g_sgst+$tot_g_cgst+$tot_g_ugst+$tot_g_igst; // sum of same other expenses $result = array(); foreach($pr_form3 as $k => $v) { $id = $v['ex_name']; $result[$id][] = $v['ex_amount']; } $other_expense = array(); foreach($result as $key => $value) { $where_exp = array('eid' => $key); $i_name = $this->model->DetailData('tbl_expense', $where_exp); $in = $i_name[0]['ename']; $other_expense[] = array('ex_name' => $key, 'ex_amount' => array_sum($value), 'iname' => $in); } //echo '<pre>'; print_r($other_expense); // sum of same other expenses $oecnt = count($other_expense); //die; $tsgst = 0; $tcgst = 0; $tugst = 0; $tigst = 0; foreach ($pr_form2 as $total => $tot) { $sgst = $tot['s_aot']; $cgst = $tot['c_aot']; $ugst = $tot['u_aot']; $igst = $tot['i_aot']; $tsgst+=$sgst; $tcgst+=$cgst; $tugst+=$ugst; $tigst+=$igst; } /*echo $tsgst."s<br>"; echo $tcgst."c<br>"; echo $tugst."u<br>"; echo $tigst; die; */ $frm = $this->model->sales_form_data($fid[$i]); $amt_gross = $frm[0]['amt_gross']; $new_tot_expns = 0; $amt_tax = 0; foreach ($frm as $key => $tot) { $expns = $tot['expenses']; $amt_taxable = $tot['amt_taxable']; $tot_expns = 0; if($expns != ''){ foreach ($expns as $tt => $t) { $newtt = $t['ex_amount']; $tot_expns+=$newtt; } }else{ $tot_expns = 0; } $new_tot_expns+=$tot_expns; $amt_tax+=$amt_taxable; } $new_tot_expns; $amt_tax; $tot_tax = $tsgst+$tcgst+$tugst+$tigst; $totdebit = $new_tot_expns+$tot_tax+$amt_tax+$all_gst_tot; /*echo $amt_gross."<br>"; echo $totdebit; die; */ $diff_amt = round(abs($amt_gross - $totdebit),2); $stage = $form_pr[0]['stage']; $date = $form_pr[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_pr[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_pr[0]['voucher_no']; $m_ledger_name = $form_pr[0]['l_name']; $narration = $form_pr[0]['narration']; $amt_gross = $form_pr[0]['amt_gross']; if($amt_gross < $totdebit){ $amt_gross = $amt_gross + $diff_amt; }else{ $amt_gross = $amt_gross; } $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Invoice Voucher View"); $adrs_list = $xml->createElement("ADDRESS.LIST", " "); $adrs_list->setAttribute("TYPE", "String"); $adrs = $xml->createElement("ADDRESS", "Gujarat, India"); $basic_buy_list = $xml->createElement("BASICBUYERADDRESS.LIST", " "); $basic_buy_list->setAttribute("TYPE", "String"); $basic_buy_adrs = $xml->createElement("BASICBUYERADDRESS", "Gujarat, India"); $OLDAUDITENTRYIDS_list = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_list->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $DATE = $xml->createElement("DATE", "".$m_date.""); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); $PARTYNAME = $xml->createElement("PARTYNAME", "".$m_ledger_name.""); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $BASICBASEPARTYNAME = $xml->createElement("BASICBASEPARTYNAME", "".$m_ledger_name.""); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Invoice Voucher View"); $PLACEOFSUPPLY = $xml->createElement("PLACEOFSUPPLY", "Gujarat"); $BASICBUYERNAME = $xml->createElement("BASICBUYERNAME", "".$m_ledger_name.""); $BASICDATETIMEOFINVOICE = $xml->createElement("BASICDATETIMEOFINVOICE", "".$basic_date_time.""); $BASICDATETIMEOFREMOVAL = $xml->createElement("BASICDATETIMEOFREMOVAL", "".$basic_date_time.""); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $CONSIGNEESTATENAME = $xml->createElement("CONSIGNEESTATENAME", "Gujarat"); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $AUDITED = $xml->createElement("AUDITED", "No"); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $ISINVOICE = $xml->createElement("ISINVOICE", "Yes"); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "Yes"); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $ISVOID = $xml->createElement("ISVOID", "No"); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $ISDELETED = $xml->createElement("ISDELETED", "No"); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $ALTERID = $xml->createElement("ALTERID", "29"); $MASTERID = $xml->createElement("MASTERID", "14"); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066560"); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $VOUCHER->appendChild($adrs_list); $adrs_list->appendChild($adrs); $VOUCHER->appendChild($basic_buy_list); $basic_buy_list->appendChild($basic_buy_adrs); $VOUCHER->appendChild($OLDAUDITENTRYIDS_list); $OLDAUDITENTRYIDS_list->appendChild($OLDAUDITENTRYIDS); $VOUCHER->appendChild($DATE); $VOUCHER->appendChild($GUID); $VOUCHER->appendChild($STATENAME); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); $VOUCHER->appendChild($PARTYNAME); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHER->appendChild($VOUCHERNUMBER); $VOUCHER->appendChild($PARTYLEDGERNAME); $VOUCHER->appendChild($BASICBASEPARTYNAME); $VOUCHER->appendChild($CSTFORMISSUETYPE); $VOUCHER->appendChild($CSTFORMRECVTYPE); $VOUCHER->appendChild($FBTPAYMENTTYPE); $VOUCHER->appendChild($PERSISTEDVIEW); $VOUCHER->appendChild($PLACEOFSUPPLY); $VOUCHER->appendChild($BASICBUYERNAME); $VOUCHER->appendChild($BASICDATETIMEOFINVOICE); $VOUCHER->appendChild($BASICDATETIMEOFREMOVAL); $VOUCHER->appendChild($VCHGSTCLASS); $VOUCHER->appendChild($CONSIGNEESTATENAME); $VOUCHER->appendChild($DIFFACTUALQTY); $VOUCHER->appendChild($ISMSTFROMSYNC); $VOUCHER->appendChild($ASORIGINAL); $VOUCHER->appendChild($AUDITED); $VOUCHER->appendChild($FORJOBCOSTING); $VOUCHER->appendChild($ISOPTIONAL); $VOUCHER->appendChild($EFFECTIVEDATE); $VOUCHER->appendChild($USEFOREXCISE); $VOUCHER->appendChild($ISFORJOBWORKIN); $VOUCHER->appendChild($ALLOWCONSUMPTION); $VOUCHER->appendChild($USEFORINTEREST); $VOUCHER->appendChild($USEFORGAINLOSS); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $VOUCHER->appendChild($USEFORCOMPOUND); $VOUCHER->appendChild($USEFORSERVICETAX); $VOUCHER->appendChild($ISEXCISEVOUCHER); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $VOUCHER->appendChild($EXCISEOPENING); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $VOUCHER->appendChild($ISVATOVERRIDDEN); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $VOUCHER->appendChild($ISISDVOUCHER); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $VOUCHER->appendChild($GSTNOTEXPORTED); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $VOUCHER->appendChild($ISCANCELLED); $VOUCHER->appendChild($HASCASHFLOW); $VOUCHER->appendChild($ISPOSTDATED); $VOUCHER->appendChild($USETRACKINGNUMBER); $VOUCHER->appendChild($ISINVOICE); $VOUCHER->appendChild($MFGJOURNAL); $VOUCHER->appendChild($HASDISCOUNTS); $VOUCHER->appendChild($ASPAYSLIP); $VOUCHER->appendChild($ISCOSTCENTRE); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $VOUCHER->appendChild($ISBLANKCHEQUE); $VOUCHER->appendChild($ISVOID); $VOUCHER->appendChild($ISONHOLD); $VOUCHER->appendChild($ORDERLINESTATUS); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VOUCHER->appendChild($VATISPURCEXEMPTED); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $VOUCHER->appendChild($ISVATDUTYPAID); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $VOUCHER->appendChild($ISDELETED); $VOUCHER->appendChild($CHANGEVCHMODE); $VOUCHER->appendChild($ALTERID); $VOUCHER->appendChild($MASTERID); $VOUCHER->appendChild($VOUCHERKEY); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $VOUCHER->appendChild($AUDITENTRIES_LIST); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //star for credit ledger $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "Yes"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$amt_gross.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $bill_name = $xml->createElement("NAME", "".$voucher_no.""); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "".$amt_gross.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for debit ledger if($amt_gross > $totdebit){ // Start of Round of $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "Round Amount"); $GSTCLASS_oe = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$diff_amt.""); $VATEXPAMOUNT_LE = $xml->createElement("VATEXPAMOUNT", "".$diff_amt.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_oe); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); // End of Round of } //star for other expenses ledger for ($oe=0; $oe < $oecnt; $oe++) { $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$other_expense[$oe]['iname'].""); $GSTCLASS_oe = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$other_expense[$oe]['ex_amount'].""); $VATEXPAMOUNT_LE = $xml->createElement("VATEXPAMOUNT", "-".$other_expense[$oe]['ex_amount'].""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_oe); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for other expenses ledger //star for CGST ledger if($tcgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_Ca = $xml->createElement("ROUNDTYPE", ""); $GSTCLASS_c = $xml->createElement("GSTCLASS", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "CGST"); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $forcgst = $tcgst+$tot_g_cgst; $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$forcgst.""); $VATEXPAMOUNT_C = $xml->createElement("VATEXPAMOUNT", "-".$forcgst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_Ca); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_c); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_C); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for CGST ledger //star for SGST ledger if($tsgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_S = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "SGST"); $GSTCLASS_s = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $forsgst = $tsgst+$tot_g_sgst; $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$forsgst.""); $AMOUNT_S = $xml->createElement("VATEXPAMOUNT", "-".$forsgst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_S); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_s); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_S); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for SGST ledger //star for UGST ledger if($tugst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_U = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "UGST"); $GSTCLASS_u = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $forugst = $tugst+$tot_g_ugst; $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$forugst.""); $AMOUNT_U = $xml->createElement("VATEXPAMOUNT", "-".$forugst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_U); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_u); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_U); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for UGST ledger //star for IGST ledger if($tigst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_I = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "IGST"); $GSTCLASS_i = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $forigst = $tigst+$tot_g_igst; $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$forigst.""); $AMOUNT_I = $xml->createElement("VATEXPAMOUNT", "-".$forigst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_I); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_i); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_I); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for IGST ledger for ($inv=0; $inv < $info_cnt; $inv++) { $item_name = $pr_form2[$inv]['item']; $rate = $pr_form2[$inv]['rate']; $discount = $pr_form2[$inv]['discount_two']; $amount = $pr_form2[$inv]['amt_taxable']; $qty = $pr_form2[$inv]['qty']; $s_ledger_name = $pr_form2[$inv]['l_name']; $ALLINVENTORYENTRIES_LIST = $xml->createElement("ALLINVENTORYENTRIES.LIST", " "); $STOCKITEMNAME = $xml->createElement("STOCKITEMNAME", "".$item_name.""); $ISDEEMEDPOSITIVE_LE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ISLASTDEEMEDPOSITIVE_LE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISAUTONEGATE = $xml->createElement("ISAUTONEGATE", "No"); $ISCUSTOMSCLEARANCE = $xml->createElement("ISCUSTOMSCLEARANCE", "No"); $ISTRACKCOMPONENT = $xml->createElement("ISTRACKCOMPONENT", "No"); $ISTRACKPRODUCTION = $xml->createElement("ISTRACKPRODUCTION", "No"); $ISPRIMARYITEM = $xml->createElement("ISPRIMARYITEM", "No"); $ISSCRAP = $xml->createElement("ISSCRAP", "No"); $RATE = $xml->createElement("RATE", "".$rate.""); $DISCOUNT = $xml->createElement("DISCOUNT", "".$discount.""); $AMOUNT = $xml->createElement("AMOUNT", "-".$amount.""); $ACTUALQTY_AE = $xml->createElement("ACTUALQTY", "".$qty.""); $BILLEDQTY_AE = $xml->createElement("BILLEDQTY", "".$qty.""); $BATCHALLOCATIONS_LIST = $xml->createElement("BATCHALLOCATIONS.LIST", " "); $GODOWNNAME = $xml->createElement("GODOWNNAME", "Main Location"); $BATCHNAME = $xml->createElement("BATCHNAME", "Primary Batch"); $INDENTNO = $xml->createElement("INDENTNO", ""); $ORDERNO = $xml->createElement("ORDERNO", ""); $TRACKINGNUMBER = $xml->createElement("TRACKINGNUMBER", ""); $DYNAMICCSTISCLEARED = $xml->createElement("DYNAMICCSTISCLEARED", "No"); $AMOUNT_ba = $xml->createElement("AMOUNT", "-".$amount.""); $ACTUALQTY = $xml->createElement("ACTUALQTY", "".$qty.""); $BILLEDQTY = $xml->createElement("BILLEDQTY", "".$qty.""); $ADDITIONALDETAILS_LIST = $xml->createElement("ADDITIONALDETAILS.LIST", " "); $VOUCHERCOMPONENTLIST_LIST = $xml->createElement("VOUCHERCOMPONENTLIST.LIST", " "); $ACCOUNTINGALLOCATIONS_LIST = $xml->createElement("ACCOUNTINGALLOCATIONS.LIST", " "); $OLDAUDITENTRYIDS_LIST_AIE = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_AIE->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_AIE = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME_AIE = $xml->createElement("LEDGERNAME", "".$s_ledger_name.""); $GSTCLASS_AIE = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE_AIE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM_AIE = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES_AIE = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER_AIE = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE_AIE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED_AIE = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED_AIE = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_AIE = $xml->createElement("AMOUNT", "-".$amount.""); $SERVICETAXDETAILS_LIST_AIE = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_AIE = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST_AIE = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST_AIE = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AIE = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AIE = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AIE = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AIE = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_AIE1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST_AIE = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST_AL = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST_AIE = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST_AIE = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST_AIE = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST_AIE = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST_AIE1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST_AIE = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST_AIE = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST_AIE = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST_AIE1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST_AIE = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_AIE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST_AIE = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $DUTYHEADDETAILS_LIST_AIE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST_AIE = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST_AIE = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST_AIE = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $EXCISEALLOCATIONS_LIST_AIE = $xml->createElement("EXCISEALLOCATIONS.LIST", " "); $EXPENSEALLOCATIONS_LIST_AIE = $xml->createElement("EXPENSEALLOCATIONS.LIST", " "); $VOUCHER->appendChild($ALLINVENTORYENTRIES_LIST); $ALLINVENTORYENTRIES_LIST->appendChild($STOCKITEMNAME); $ALLINVENTORYENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE_LE); $ALLINVENTORYENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE_LE); $ALLINVENTORYENTRIES_LIST->appendChild($ISAUTONEGATE); $ALLINVENTORYENTRIES_LIST->appendChild($ISCUSTOMSCLEARANCE); $ALLINVENTORYENTRIES_LIST->appendChild($ISTRACKCOMPONENT); $ALLINVENTORYENTRIES_LIST->appendChild($ISTRACKPRODUCTION); $ALLINVENTORYENTRIES_LIST->appendChild($ISPRIMARYITEM); $ALLINVENTORYENTRIES_LIST->appendChild($ISSCRAP); $ALLINVENTORYENTRIES_LIST->appendChild($RATE); $ALLINVENTORYENTRIES_LIST->appendChild($DISCOUNT); $ALLINVENTORYENTRIES_LIST->appendChild($AMOUNT); $ALLINVENTORYENTRIES_LIST->appendChild($ACTUALQTY_AE); $ALLINVENTORYENTRIES_LIST->appendChild($BILLEDQTY_AE); $ALLINVENTORYENTRIES_LIST->appendChild($BATCHALLOCATIONS_LIST); $BATCHALLOCATIONS_LIST->appendChild($GODOWNNAME); $BATCHALLOCATIONS_LIST->appendChild($BATCHNAME); $BATCHALLOCATIONS_LIST->appendChild($INDENTNO); $BATCHALLOCATIONS_LIST->appendChild($ORDERNO); $BATCHALLOCATIONS_LIST->appendChild($TRACKINGNUMBER); $BATCHALLOCATIONS_LIST->appendChild($DYNAMICCSTISCLEARED); $BATCHALLOCATIONS_LIST->appendChild($AMOUNT_ba); $BATCHALLOCATIONS_LIST->appendChild($ACTUALQTY); $BATCHALLOCATIONS_LIST->appendChild($BILLEDQTY); $BATCHALLOCATIONS_LIST->appendChild($ADDITIONALDETAILS_LIST); $BATCHALLOCATIONS_LIST->appendChild($VOUCHERCOMPONENTLIST_LIST); $ALLINVENTORYENTRIES_LIST->appendChild($ACCOUNTINGALLOCATIONS_LIST); $ACCOUNTINGALLOCATIONS_LIST->appendChild($OLDAUDITENTRYIDS_LIST_AIE); $OLDAUDITENTRYIDS_LIST_AIE->appendChild($OLDAUDITENTRYIDS_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($LEDGERNAME_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($GSTCLASS_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISDEEMEDPOSITIVE_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($LEDGERFROMITEM_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($REMOVEZEROENTRIES_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISPARTYLEDGER_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISLASTDEEMEDPOSITIVE_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISCAPVATTAXALTERED_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISCAPVATNOTCLAIMED_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($AMOUNT_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($SERVICETAXDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($BANKALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($BILLALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INTERESTCOLLECTION_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($OLDAUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($AUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INPUTCRALLOCS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($DUTYHEADDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($RATEDETAILS_LIST_AL); $ACCOUNTINGALLOCATIONS_LIST->appendChild($SUMMARYALLOCS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($STPYMTDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TAXBILLALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($VATSTATUTORYDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($COSTTRACKALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($REFVOUCHERDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INVOICEWISEDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($VATITCDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ADVANCETAXDETAILS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($EXCISEALLOCATIONS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($EXPENSEALLOCATIONS_LIST_AIE); } $PAYROLLMODEOFPAYMENT_LIST_v = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $ATTDRECORDS_LIST_v = $xml->createElement("ATTDRECORDS.LIST", " "); $GSTEWAYCONSIGNORADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $GSTEWAYCONSIGNEEADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $TEMPGSTRATEDETAILS_LIST_v = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST_v); $VOUCHER->appendChild($ATTDRECORDS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST_v); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST_v); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY2 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO2 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO2->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME2 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE2 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_NAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPNAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPSTATE2); $COMPANY2->appendChild($REMOTECMPINFO2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY3 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO3 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO3->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME3 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME3 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE3 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_NAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPNAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPSTATE3); $COMPANY3->appendChild($REMOTECMPINFO3); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->appendChild($COMPANY3); $test = $xml->createElement("TALLYMESSAGE", " "); $test->setAttribute("xmlns:UDF", "TallyUDF"); } // end of purchase for one } // end of purchase elseif($stage == 'cheque_reg'){ $voucher_type = $form[0]['voucher_type']; if($voucher_type == 'payment'){ $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $where = array('fid' => $fid[$i]); //$form = $this->model->DetailData('tbl_form', $where); $form_payment = $this->model->office_form_paymet($fid[$i]); $form_info = $this->model->DetailData('tbl_form_info', $where); $fi_count = count($form_info); $stage = $form_payment[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form_payment[0]['voucher_type']; }else{ $stage = $stage; } $date = $form_payment[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_payment[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_payment[0]['voucher_no']; $m_ledger_name = $form_payment[0]['party_ledger']; $ms_ledger = $form_payment[0]['debit_ledger']; $ms_ledger_two = $form_payment[0]['credit_ledger']; $narration = $form_payment[0]['narration']; $amt_gross = $form_payment[0]['amt_gross']; $trans_type = $form_payment[0]['trans_type']; $check_no = $form_payment[0]['check_no']; $check_date = $form_payment[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-0000aa05:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($c=0; $c < 2; $c++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($c == 0){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_1 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_1); $ISCAPVATNOTCLAIMED_1 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_1); if($c == 0){ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available if($trans_type == 'cash'){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); }else{ if($c == 1){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $BANKPARTYNAME_BA_1 = $xml->createElement("BANKPARTYNAME", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($BANKPARTYNAME_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //end If bill allocation is available }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); } } $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $GSTEWAYCONSIGNORADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST); $GSTEWAYCONSIGNEEADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } // end of cheque_reg payment else{ $form_receipt = $this->model->office_form_receipt($fid[$i]); $stage = $form_receipt[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form_receipt[0]['voucher_type']; }else{ $b = $stage; } $date = $form_receipt[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_receipt[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_receipt[0]['voucher_no']; $m_ledger_name = $form_receipt[0]['party_ledger']; $ms_ledger = $form_receipt[0]['cr_ledger']; $ms_ledger_two = $form_receipt[0]['dr_ledger']; $narration = $form_receipt[0]['narration']; $amt_gross = $form_receipt[0]['amt_gross']; $trans_type = $form_receipt[0]['trans_type']; $check_no = $form_receipt[0]['check_no']; $check_date = $form_receipt[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($a=0; $a < 2; $a++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($a == '0'){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); if($a == '0'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form_receipt[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form_receipt[0]['amt_gross'].""); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form_receipt[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form_receipt[0]['amt_gross'].""); } $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank' && $a == '1'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end } //end of cheque_reg receipt } // end of cheque_reg elseif($stage == 'bank'){ $voucher_type = $form[0]['voucher_type']; if($voucher_type == 'payment'){ $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $where = array('fid' => $fid[$i]); //$form = $this->model->DetailData('tbl_form', $where); $form_payment = $this->model->office_form_paymet($fid[$i]); $form_info = $this->model->DetailData('tbl_form_info', $where); $fi_count = count($form_info); $stage = $form_payment[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form_payment[0]['voucher_type']; }else{ $stage = $stage; } $date = $form_payment[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_payment[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_payment[0]['voucher_no']; $m_ledger_name = $form_payment[0]['party_ledger']; $ms_ledger = $form_payment[0]['debit_ledger']; $ms_ledger_two = $form_payment[0]['credit_ledger']; $narration = $form_payment[0]['narration']; $amt_gross = $form_payment[0]['amt_gross']; $trans_type = $form_payment[0]['trans_type']; $check_no = $form_payment[0]['check_no']; $check_date = $form_payment[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-0000aa05:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($c=0; $c < 2; $c++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($c == 0){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_1 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_1); $ISCAPVATNOTCLAIMED_1 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_1); if($c == 0){ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available if($trans_type == 'cash'){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); }else{ if($c == 1){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $BANKPARTYNAME_BA_1 = $xml->createElement("BANKPARTYNAME", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($BANKPARTYNAME_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //end If bill allocation is available }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); } } $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $GSTEWAYCONSIGNORADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST); $GSTEWAYCONSIGNEEADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } // end of bank payment elseif($voucher_type == 'receipt'){ $form_receipt = $this->model->office_form_receipt($fid[$i]); $stage = $form_receipt[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form_receipt[0]['voucher_type']; }else{ $b = $stage; } $date = $form_receipt[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_receipt[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_receipt[0]['voucher_no']; $m_ledger_name = $form_receipt[0]['party_ledger']; $ms_ledger = $form_receipt[0]['cr_ledger']; $ms_ledger_two = $form_receipt[0]['dr_ledger']; $narration = $form_receipt[0]['narration']; $amt_gross = $form_receipt[0]['amt_gross']; $trans_type = $form_receipt[0]['trans_type']; $check_no = $form_receipt[0]['check_no']; $check_date = $form_receipt[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($a=0; $a < 2; $a++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($a == '0'){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); if($a == '0'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form_receipt[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form_receipt[0]['amt_gross'].""); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form_receipt[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form_receipt[0]['amt_gross'].""); } $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank' && $a == '1'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end } // end of bank receipt else{ //$where = array('fid' => $fid); $form = $this->model->xml_contra($fid[$i]); //echo "<pre>"; print_r($form); die; $stage = $form[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form[0]['voucher_type']; }else{ $stage = $stage; } $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $m_ledger_name = $form[0]['party_ledger']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; $check_no = $form[0]['check_no']; $check_date = $form[0]['check_date']; $trans_type = $form[0]['trans_type']; $ms_ledger = $form[0]['sub_ledger']; $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start //$s_ledger_name = $form_info[$i]['s_ledger_name']; for ($le=0; $le < 2; $le++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); //if($trans_type == 'fund_transfer'){ if($le == 0){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); } /* }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); }*/ $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); if($le == 0){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); } //start If bill allocation is available if($trans_type == 'withdrawal'){ //if trans type is withdrawal if($le == 0){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); } //if trans type is withdrawal }elseif($trans_type == 'diposit'){ //if trans type is diposit if($le == 0){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //if trans type is deposit } }else{ //For fund transfer $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); if($le == 0){ $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); }else{ $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); } $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //For fund transfer } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } // end of bank contra } // end of bank } // end of for $xml_HEADER->appendChild($xml_HEADER_TALLYREQUEST); $xml_ENVELOPE->appendChild($xml_HEADER); $xml_ENVELOPE->appendChild($xml_BODY); $xml_BODY->appendChild($xml_BODY_IMPORTDATA); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA); $xml->appendChild($xml_ENVELOPE); // Parse the XML. //print $xml->saveXML(); /*$xml->save('all_xml/text.xml'); die;*/ $current_year = date('Y'); $current_month = date('M'); $current_date = date('d'); $dirs = array_filter(glob('all_xml/*'), 'is_dir'); if(in_array('all_xml/'.$current_year.'', $dirs)){ //echo "year avail"; echo "<br>"; $dirs_two = array_filter(glob('all_xml/'.$current_year.'/*'), 'is_dir'); //echo 'all_xml/'.$current_year.'/'.$current_month; if(in_array('all_xml/'.$current_year.'/'.$current_month.'', $dirs_two)){ //echo "month avail"; }else{ echo "month not avail"; mkdir("./all_xml/".$current_year."/".$current_month); } }else{ echo "not avail"; mkdir("./all_xml/".$current_year); $dirs_two = array_filter(glob('all_xml/'.$current_year.'/*'), 'is_dir'); //echo 'all_xml/'.$current_year.'/'.$current_month; if(in_array('all_xml/'.$current_year.'/'.$current_month.'', $dirs_two)){ echo "month avail"; }else{ echo "month not avail"; mkdir("./all_xml/".$current_year."/".$current_month); } } //echo "<pre>"; print_r($dirs); $sdr = mt_rand(100000, 999999); $sdr = time().$sdr; $xml->save('all_xml/'.$current_year.'/'.$current_month.'/'.$current_date.'_xml_'.$sdr.'.xml'); //$xml->save('text.xml'); $xml_path = 'all_xml/'.$current_year.'/'.$current_month.'/'.$current_date.'_xml_'.$sdr.'.xml'; $insdata = array( 'x_by' => $rid, 'x_year' => $current_year, 'x_month' => $current_month, 'x_path' => $xml_path, ); $this->model->insertData('tbl_xml', $insdata); //die; $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Selectd data has been approved and XML has been generated. </div>'); redirect('webapp/office/form_grid'); } public function all_xml($offset = '0'){ $data['xml'] = $this->model->getDataModel('tbl_xml'); $cnt=count($data['xml']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/leader/all_xml'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $data['xml'] = $this->model->getGenXML($config['per_page'], $offset); $this->load->view('webapp/all_xml', $data); } } //End of controller
Copyright ©2021 || Defacer Indonesia