Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace EspertoMagent\FattEleIt\Model;${"GLOBALS"}["uvqblukdbkj"]="natura";${"GLOB..

Decoded Output download

<?php namespace EspertoMagent\FattEleIt\Model;${"GLOBALS"}["uvqblukdbkj"]="natura";${"GLOBALS"}["jhlqmkfsvpz"]="ship15";${"GLOBALS"}["mpkvltgpj"]="cod10";${"GLOBALS"}["uhuheioo"]="ship10";${"GLOBALS"}["ynbmgbzjdcy"]="cod5";${"GLOBALS"}["limekwohmh"]="price5t";${"GLOBALS"}["hlguib"]="cod4";${"GLOBALS"}["bogzdiuw"]="xml_invoices_datibeni_riep";${"GLOBALS"}["fidvkdjni"]="ship22";${"GLOBALS"}["jmfshbduyrh"]="ship";${"GLOBALS"}["xahlllqu"]="cod22";${"GLOBALS"}["dafynerkyxvn"]="cod15";${"GLOBALS"}["kolsweif"]="price15t";${"GLOBALS"}["hnoowlfbt"]="ship5";${"GLOBALS"}["reehehxgl"]="tax_shipping_vat";${"GLOBALS"}["hlwtskbbljm"]="vat5";${"GLOBALS"}["wqmgtdcfe"]="count";${"GLOBALS"}["mpktpyvoh"]="xml_invoices_datibeni_linee";${"GLOBALS"}["oaabotdigik"]="vat15";${"GLOBALS"}["ynaeworqe"]="price0t";${"GLOBALS"}["jmdtopf"]="imponibile";${"GLOBALS"}["zynjnvfst"]="formatted_product_name";${"GLOBALS"}["txxyiuone"]="product_name_tmp";${"GLOBALS"}["ecsljullmr"]="rowtotal";${"GLOBALS"}["fwsgewkkvav"]="tax_vat";${"GLOBALS"}["nqxtbidnj"]="total_tax";${"GLOBALS"}["vhtrxopyoe"]="price_escl_tax";${"GLOBALS"}["wedetds"]="subtotal";${"GLOBALS"}["cmufbme"]="subtotal_ex_tax";${"GLOBALS"}["fhkvcie"]="price_incl_tax";${"GLOBALS"}["perdbmtlm"]="tax_algorithm";${"GLOBALS"}["avtoovm"]="discount_taxincluded";${"GLOBALS"}["mbvjvurve"]="taxcustomer";${"GLOBALS"}["ypocgfcagxln"]="discount";${"GLOBALS"}["yevpykxlvom"]="custom_discount";${"GLOBALS"}["irvmgds"]="product_name";${"GLOBALS"}["ucicpwnjwid"]="item";${"GLOBALS"}["feoyuucs"]="items";${"GLOBALS"}["omolgvcpoqgn"]="tax_amount";${"GLOBALS"}["ggxwfkg"]="price4t";${"GLOBALS"}["yxhhhittkx"]="vat4";${"GLOBALS"}["nxcziqlwt"]="price10t";${"GLOBALS"}["nawqbtx"]="vat10";${"GLOBALS"}["gfjghplgyhw"]="price22t";${"GLOBALS"}["mrbhsfarwc"]="vat22";${"GLOBALS"}["pwhqnwfproj"]="tax_cod_vat";${"GLOBALS"}["wiovhzb"]="cod";${"GLOBALS"}["gtcwvqvad"]="tax_code";${"GLOBALS"}["ydvjmtx"]="shipping_exclude_tax";${"GLOBALS"}["oslypfmcuh"]="shipping_tax";${"GLOBALS"}["lmzeqrojbpgo"]="xml_invoices_datibeni";${"GLOBALS"}["ymjfsdesnco"]="xml_invoices_datigen_ordine";${"GLOBALS"}["yfycnf"]="xml_invoices_datigen_doc_bollo";${"GLOBALS"}["zgwihyopfkg"]="grand_total_formatted";${"GLOBALS"}["xtwxdffb"]="xml_invoices_body";${"GLOBALS"}["ibdpfrwb"]="xml_invoices_sede2";${"GLOBALS"}["yynlrtnpvft"]="invoice_user_cf";${"GLOBALS"}["vstkfirelsd"]="customerId";${"GLOBALS"}["vecwiwdnwp"]="xmlidfiscale";${"GLOBALS"}["rfapccflbcdn"]="eu_countries";${"GLOBALS"}["qyjiyuj"]="nazione";${"GLOBALS"}["loisspjxycnu"]="cap";${"GLOBALS"}["guvywgbqmkd"]="indirizzo";${"GLOBALS"}["ecfoklnavw"]="xml_invoices_sede";${"GLOBALS"}["gxsjfvezqd"]="xml_invoices_ana";${"GLOBALS"}["sxdsfrvmd"]="id_codice";${"GLOBALS"}["xgprwq"]="xml_invoices_iva";${"GLOBALS"}["ppcpfiwquhe"]="invoice_user_country";${"GLOBALS"}["ciligcum"]="cap_liv_camp";${"GLOBALS"}["jdiqvtxxds"]="invoice_id";${"GLOBALS"}["uoukkbqfgms"]="xml_invoices";${"GLOBALS"}["dxkfhv"]="denominazione";${"GLOBALS"}["khnpbnoykdh"]="invoice_user_zip";${"GLOBALS"}["clwirkbijh"]="invoice_user_via";${"GLOBALS"}["khitdoztjoo"]="invoice_user_fn";${"GLOBALS"}["xjrykqjvn"]="invoice_user_pec";${"GLOBALS"}["ijshaos"]="invoice_user_cod_dest";${"GLOBALS"}["ibhbdbyhpb"]="vat_id";${"GLOBALS"}["yhxptiurxcd"]="invoice_user_region";${"GLOBALS"}["pxbcmjvp"]="connection";${"GLOBALS"}["mohsbkipre"]="invoice_user_address";${"GLOBALS"}["resleqemd"]="regionId";${"GLOBALS"}["rjwiejfqxv"]="invoice_num";${"GLOBALS"}["kbqcpcsnihi"]="em_cf";${"GLOBALS"}["cbbqry"]="sdi";${"GLOBALS"}["hhjkgvbffwkx"]="pec";${"GLOBALS"}["zrkxgpvnugl"]="causale";${"GLOBALS"}["ggwtmt"]="num_fatt";${"GLOBALS"}["idjbrlejyle"]="use_num_fatt";${"GLOBALS"}["jskxgfip"]="esigibilitaiva";${"GLOBALS"}["tchxbrfhx"]="id_paese_trasm";${"GLOBALS"}["jirnlqp"]="prov";${"GLOBALS"}["yixsuzopctu"]="comune";${"GLOBALS"}["roitvyn"]="reg_fisc";${"GLOBALS"}["ursyvhobb"]="azienda";${"GLOBALS"}["xczbbig"]="id_paese";${"GLOBALS"}["mgksgwgdy"]="id_codice_trasm";${"GLOBALS"}["okrfspgffg"]="bollo";${"GLOBALS"}["dxflslmujx"]="objectManager";${"GLOBALS"}["hhhxbumcuhrx"]="type";${"GLOBALS"}["reuisywpr"]="xml_att";${"GLOBALS"}["qoiszgumkkjj"]="mailto";${"GLOBALS"}["tldfvtfj"]="xml_attachments";${"GLOBALS"}["rmzyfmeyqcb"]="i";${"GLOBALS"}["eilggcg"]="invoices";${"GLOBALS"}["pegotecvao"]="mailfrom";${"GLOBALS"}["npucyuljq"]="invoice";${"GLOBALS"}["erjblyho"]="mail";${"GLOBALS"}["gtmjfjgiilw"]="sitename";${"GLOBALS"}["eloucv"]="store_id";${"GLOBALS"}["fvcbbtotdn"]="mailtobcc";${"GLOBALS"}["vdlxrpp"]="send_to_customer";${"GLOBALS"}["zhcpqnmto"]="order";${"GLOBALS"}["mephsff"]="archivia_fatt";${"GLOBALS"}["reoptick"]="file2";${"GLOBALS"}["rdeexogjoh"]="dir";${"GLOBALS"}["tlzpjzdnnku"]="download";${"GLOBALS"}["wrntolt"]="f";${"GLOBALS"}["tvrvtljw"]="filename";${"GLOBALS"}["hnhggktgyv"]="file";${"GLOBALS"}["mgmpshh"]="as_binary";${"GLOBALS"}["gwdolco"]="calcmac";${"GLOBALS"}["mjylith"]="options";${"GLOBALS"}["vzockezydl"]="original_plaintext";${"GLOBALS"}["uxxwxnmkjxa"]="ciphertext_raw";${"GLOBALS"}["uviupsvsyhmd"]="sha2len";${"GLOBALS"}["tuuvfi"]="c";${"GLOBALS"}["dutfijvee"]="iv";${"GLOBALS"}["abnmdzp"]="cipher";${"GLOBALS"}["hmvsth"]="ivlen";${"GLOBALS"}["aoerucipnv"]="ciphertext";${"GLOBALS"}["tqnuxkp"]="key";${"GLOBALS"}["xeneloky"]="directoryList";${"GLOBALS"}["zboboqvyyvx"]="io";${"GLOBALS"}["lhyrsjkgtww"]="messageManager";${"GLOBALS"}["mglwpufnooc"]="enc";${"GLOBALS"}["gohbgcxykdim"]="moduleManager";${"GLOBALS"}["xkypiuwgk"]="scopeConfig";${"GLOBALS"}["iryclcmbd"]="resource";use Magento\Framework\Model\AbstractModel;use Magento\Sales\Api\InvoiceRepositoryInterface;class Download extends AbstractModel{protected$helper;protected$invoiceRepository;protected$resource;protected$scopeConfig;protected$moduleManager;protected$enc;protected$messageManager;protected$io;protected$directoryList;protected$request;public function __construct(InvoiceRepositoryInterface$invoiceRepository,\EspertoMagent\FattEleIt\Helper\Data$helper,\Magento\Framework\App\ResourceConnection$resource,\Magento\Framework\App\Config\ScopeConfigInterface$scopeConfig,\Magento\Framework\Module\Manager$moduleManager,\Magento\Framework\Encryption\EncryptorInterface$enc,\Magento\Framework\Message\ManagerInterface$messageManager,\Magento\Framework\Filesystem\Io\File$io,\Magento\Framework\App\Filesystem\DirectoryList$directoryList,\Magento\Backend\App\Action\Context$context){${"GLOBALS"}["kcmqevqcolf"]="invoiceRepository";${"GLOBALS"}["nfpjqqsgjro"]="helper";$this->helper=${${"GLOBALS"}["nfpjqqsgjro"]};$this->invoiceRepository=${${"GLOBALS"}["kcmqevqcolf"]};$this->_resource=${${"GLOBALS"}["iryclcmbd"]};$this->_scopeConfig=${${"GLOBALS"}["xkypiuwgk"]};$this->moduleManager=${${"GLOBALS"}["gohbgcxykdim"]};$this->_enc=${${"GLOBALS"}["mglwpufnooc"]};$this->messageManager=${${"GLOBALS"}["lhyrsjkgtww"]};$this->io=${${"GLOBALS"}["zboboqvyyvx"]};$this->directoryList=${${"GLOBALS"}["xeneloky"]};$this->request=$context->getRequest();}protected function _getType(){$mfsrahnyumt="type";if($this->request->getParam("namespace")=="sales_order_creditmemo_grid"||$this->request->getParam("creditmemo_id")!=""){$euukjcqbvek="type";${$euukjcqbvek}="creditmemo";}else{${"GLOBALS"}["wekbscx"]="type";${${"GLOBALS"}["wekbscx"]}="invoice";}return${$mfsrahnyumt};}protected function decryptIt($ciphertext){$yfpwivvngpd="ciphertext";if(${$yfpwivvngpd}!=""){$tacmcdg="ivlen";${"GLOBALS"}["bmyornkiii"]="key";${${"GLOBALS"}["tqnuxkp"]}="qJB0rGtIn5UB1xG03efyCp";${"GLOBALS"}["kboyukhmovf"]="hmac";${"GLOBALS"}["xqsknppboeub"]="hmac";${"GLOBALS"}["lshstp"]="c";${"GLOBALS"}["qcifsw"]="c";${${"GLOBALS"}["lshstp"]}=base64_decode(${${"GLOBALS"}["aoerucipnv"]});${${"GLOBALS"}["hmvsth"]}=openssl_cipher_iv_length(${${"GLOBALS"}["abnmdzp"]}="AES-128-CBC");${${"GLOBALS"}["dutfijvee"]}=substr(${${"GLOBALS"}["tuuvfi"]},0,${${"GLOBALS"}["hmvsth"]});${"GLOBALS"}["epenjuwkssj"]="ciphertext_raw";${${"GLOBALS"}["xqsknppboeub"]}=substr(${${"GLOBALS"}["qcifsw"]},${${"GLOBALS"}["hmvsth"]},${${"GLOBALS"}["uviupsvsyhmd"]}=32);$lrsahrjqunh="ciphertext_raw";${${"GLOBALS"}["uxxwxnmkjxa"]}=substr(${${"GLOBALS"}["tuuvfi"]},${$tacmcdg}+${${"GLOBALS"}["uviupsvsyhmd"]});${"GLOBALS"}["lnvxmcwjsku"]="key";${${"GLOBALS"}["vzockezydl"]}=openssl_decrypt(${${"GLOBALS"}["epenjuwkssj"]},${${"GLOBALS"}["abnmdzp"]},${${"GLOBALS"}["bmyornkiii"]},${${"GLOBALS"}["mjylith"]}=OPENSSL_RAW_DATA,${${"GLOBALS"}["dutfijvee"]});${${"GLOBALS"}["gwdolco"]}=hash_hmac("sha256",${$lrsahrjqunh},${${"GLOBALS"}["lnvxmcwjsku"]},${${"GLOBALS"}["mgmpshh"]}=true);if(hash_equals(${${"GLOBALS"}["kboyukhmovf"]},${${"GLOBALS"}["gwdolco"]})){return${${"GLOBALS"}["vzockezydl"]};}}else return"";}public function getXmlDir(){return$this->directoryList->getPath("var")."/em_invoices/";}public function compressZip($file,$download=true){if(extension_loaded("zip")){${"GLOBALS"}["oltvat"]="filename";$mgygiskfzl="zip";${$mgygiskfzl}=new \ZipArchive;sort(${${"GLOBALS"}["hnhggktgyv"]});${${"GLOBALS"}["tvrvtljw"]}=str_replace(".xml","",${${"GLOBALS"}["hnhggktgyv"]}[0]).".zip";if($zip->open(${${"GLOBALS"}["oltvat"]},\ZipArchive::CREATE)===true){$ykjgoy="f";foreach(${${"GLOBALS"}["hnhggktgyv"]} as${$ykjgoy}){$dlqcbimzl="f";$zip->addFile(${${"GLOBALS"}["wrntolt"]},basename(${$dlqcbimzl}));}$ugnnpoxcvkn="file";${"GLOBALS"}["ubpcvng"]="f";$zip->close();foreach(${$ugnnpoxcvkn} as${${"GLOBALS"}["ubpcvng"]}){$jismyzg="f";if(file_exists(${$jismyzg})){unlink(${${"GLOBALS"}["wrntolt"]});}}if(${${"GLOBALS"}["tlzpjzdnnku"]}){$gmfmgexh="filename";return$this->downloadFile(${$gmfmgexh});}else{return${${"GLOBALS"}["tvrvtljw"]};}}else{$this->messageManager->addError(__("Error: cannot create ZIP Archive."));}}else{$this->messageManager->addError(__("PHP ZIP extension not loaded!"));}}public function downloadFile($file){${"GLOBALS"}["jlfjyqapop"]="dir";${"GLOBALS"}["nodykb"]="archivia_fatt";${"GLOBALS"}["ceqeihoeilq"]="file";$uhtrsbpwmr="download_rate";${"GLOBALS"}["cfelqishb"]="dir";${${"GLOBALS"}["jlfjyqapop"]}=$this->getXmlDir();${${"GLOBALS"}["hnhggktgyv"]}=${${"GLOBALS"}["cfelqishb"]}.str_replace(${${"GLOBALS"}["rdeexogjoh"]},"",${${"GLOBALS"}["ceqeihoeilq"]});${${"GLOBALS"}["hnhggktgyv"]}=strval(str_replace("","",${${"GLOBALS"}["hnhggktgyv"]}));${$uhtrsbpwmr}=20.5;${${"GLOBALS"}["nodykb"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/archivia_fattura");if(file_exists(${${"GLOBALS"}["hnhggktgyv"]})&&is_file(${${"GLOBALS"}["hnhggktgyv"]})){header("Content-Type: application/octet-stream");${"GLOBALS"}["bcsrins"]="file";$gmtruope="file2";$ykqjyfdg="file";$xefnyedjhfnj="file";${"GLOBALS"}["siucukerbxfp"]="file2";header("Content-Length: ".filesize(${$ykqjyfdg}));header("Content-Disposition: attachment; filename=".basename(${$xefnyedjhfnj}));header("Content-Transfer-Encoding: binary");${"GLOBALS"}["upmubsrn"]="file2";if(ob_get_length() > 0){ob_end_clean();}flush();${$gmtruope}=fopen(${${"GLOBALS"}["bcsrins"]},"r");while(!feof(${${"GLOBALS"}["upmubsrn"]})){$veepjylpklhk="download_rate";print_r(fread(${${"GLOBALS"}["reoptick"]},round(${$veepjylpklhk}*1024)));flush();}fclose(${${"GLOBALS"}["siucukerbxfp"]});if($this->helper->getEmFattEleItInfo("em_send_email")){${"GLOBALS"}["eqkgggjy"]="mail";${${"GLOBALS"}["eqkgggjy"]}=new \PHPMailer\PHPMailer\PHPMailer();$mail->SMTPDebug="2";${"GLOBALS"}["vvxcte"]="file";if($this->helper->getEmFattEleItInfo("em_use_smtp")){$mail->isSMTP();$mail->Host=$this->helper->getEmFattEleItInfo("em_mail_smtp_host");$mail->SMTPAuth=true;$mail->Username=$this->helper->getEmFattEleItInfo("em_mail_smtp_user");$mail->Password=$this->_enc->decrypt($this->helper->getEmFattEleItInfo("em_mail_smtp_psw"));$mail->SMTPSecure=$this->helper->getEmFattEleItInfo("em_mail_smtp_ssl");$mail->Port=$this->helper->getEmFattEleItInfo("em_mail_smtp_port");}else{$mail->isMail();}$mail->setFrom($this->helper->getEmFattEleItInfo("em_mail_from"));$mail->addAddress($this->helper->getEmFattEleItInfo("em_mail_to"));$mail->addAttachment(${${"GLOBALS"}["hnhggktgyv"]});$mail->isHTML(true);$mail->Subject="fattura elettronica nr. ".str_replace(".xml","",basename(${${"GLOBALS"}["hnhggktgyv"]}));$mail->Body=__("Salve,<br>in allegato la fattura elettronica nr. %1.<br><br>Saluti,<br><br>",str_replace(".xml","",basename(${${"GLOBALS"}["vvxcte"]})));$mail->AltBody=__("Salve, in allegato le fattura elettronica nr. %1",str_replace(".xml","",basename(${${"GLOBALS"}["hnhggktgyv"]})));try{$mail->send();}catch(Exception$e){$this->messageManager->addError(__("Message could not be sent. Mailer Error: {$mail->ErrorInfo}"));}}}else{$this->messageManager->addError(__("Error: The file ".${${"GLOBALS"}["hnhggktgyv"]}." does not exist!"));}if(!${${"GLOBALS"}["mephsff"]}){$mlcgfyft="file";unlink(${$mlcgfyft});}}public function sendFile($file,$invoice=null){$sdyiektr="objectManager";${$sdyiektr}=\Magento\Framework\App\ObjectManager::getInstance();${"GLOBALS"}["kijzecooph"]="store_id";$wjjpwki="store_id";$nnlpifkos="file";${"GLOBALS"}["utzgmvh"]="dir";${${"GLOBALS"}["zhcpqnmto"]}=$objectManager->create("Magento\Sales\Model\Order")->load($invoice->getData("order_id"));${${"GLOBALS"}["kijzecooph"]}=$order->getStoreId();$fikpab="file";$xnhqbctkat="mailfrom";${"GLOBALS"}["xqgqsfqsb"]="file";$fczptpnxwmtt="dir";${${"GLOBALS"}["utzgmvh"]}=$this->getXmlDir();${$fikpab}=${${"GLOBALS"}["rdeexogjoh"]}.str_replace(${$fczptpnxwmtt},"",${$nnlpifkos});${${"GLOBALS"}["xqgqsfqsb"]}=strval(str_replace("","",${${"GLOBALS"}["hnhggktgyv"]}));${${"GLOBALS"}["mephsff"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/archivia_fattura");${${"GLOBALS"}["vdlxrpp"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/em_send_email_customer");${$xnhqbctkat}=$this->helper->getEmFattEleItInfo("em_mail_from",${$wjjpwki});${${"GLOBALS"}["fvcbbtotdn"]}=$this->helper->getEmFattEleItInfo("em_mail_to",${${"GLOBALS"}["eloucv"]});${${"GLOBALS"}["gtmjfjgiilw"]}=$this->_scopeConfig->getValue("general/store_information/name",\Magento\Store\Model\ScopeInterface::SCOPE_STORE);if($this->helper->getEmFattEleItInfo("em_send_email",${${"GLOBALS"}["eloucv"]})){${"GLOBALS"}["vyycnkba"]="mailtobcc";if(${${"GLOBALS"}["fvcbbtotdn"]}!=""&&filter_var(${${"GLOBALS"}["vyycnkba"]},FILTER_VALIDATE_EMAIL)){${"GLOBALS"}["vupvpjgmudyu"]="file";if(file_exists(${${"GLOBALS"}["vupvpjgmudyu"]})&&is_file(${${"GLOBALS"}["hnhggktgyv"]})){${${"GLOBALS"}["erjblyho"]}=new \PHPMailer\PHPMailer\PHPMailer();${"GLOBALS"}["ltxxeqhul"]="store_id";$mail->SMTPDebug="2";$yzdjwitj="mailfrom";${"GLOBALS"}["kcnrrmit"]="archivia_fatt";if($this->helper->getEmFattEleItInfo("em_use_smtp",${${"GLOBALS"}["ltxxeqhul"]})){$sapuyilbi="store_id";$mail->isSMTP();$bxbuhgldx="store_id";$mail->Host=$this->helper->getEmFattEleItInfo("em_mail_smtp_host",${$sapuyilbi});$mail->SMTPAuth=true;$vodgysmgjw="store_id";$mail->Username=$this->helper->getEmFattEleItInfo("em_mail_smtp_user",${$bxbuhgldx});$mail->Password=$this->_enc->decrypt($this->helper->getEmFattEleItInfo("em_mail_smtp_psw",${$vodgysmgjw}));$mail->SMTPSecure=$this->helper->getEmFattEleItInfo("em_mail_smtp_ssl",${${"GLOBALS"}["eloucv"]});$mail->Port=$this->helper->getEmFattEleItInfo("em_mail_smtp_port",${${"GLOBALS"}["eloucv"]});}else{$mail->isMail();}${"GLOBALS"}["bhvxnfj"]="sitename";$mail->setFrom(${$yzdjwitj});$mail->addAttachment(${${"GLOBALS"}["hnhggktgyv"]});$mail->isHTML(true);$ojecixkywur="file";$mail->Subject=${${"GLOBALS"}["bhvxnfj"]}.__(": Xml Invoice nr. %1",str_replace(".xml","",basename(${${"GLOBALS"}["hnhggktgyv"]})));$nfqjrnqkx="file";$mail->Body=__("Hi,<br>your xml invoice nr. %1 is attached.<br><br>Greetings,<br><br>",str_replace(".xml","",basename(${$ojecixkywur})));$mail->AltBody=__("Hi, your xml invoice nr. %1 is attached.",str_replace(".xml","",basename(${$nfqjrnqkx})));try{if(${${"GLOBALS"}["vdlxrpp"]}){$cimybkpkbex="mailto";if(${${"GLOBALS"}["npucyuljq"]}){$burmhwyhazr="mailto";${$burmhwyhazr}=$invoice->getOrder()->getCustomerEmail();}else{$this->messageManager->addError(__("".$this->_getType()." does not exist."));return;}$mail->addAddress(${$cimybkpkbex});$mail->send();$mail->ClearAddresses();$mail->addAddress(${${"GLOBALS"}["fvcbbtotdn"]});$mail->send();}else{${"GLOBALS"}["egiqdmns"]="mailtobcc";$mail->addAddress(${${"GLOBALS"}["egiqdmns"]});$mail->send();}$this->messageManager->addSuccess(__("Invoice has been mailed successfully."));}catch(Exception$e){$this->messageManager->addError(__("Message could not be sent. Mailer Error: {$mail->ErrorInfo}"));}if(!${${"GLOBALS"}["kcnrrmit"]}){${"GLOBALS"}["ofyyfwdxuy"]="file";unlink(${${"GLOBALS"}["ofyyfwdxuy"]});}}else{$this->messageManager->addError(__("Error: The file ".${${"GLOBALS"}["hnhggktgyv"]}." does not exist!"));}}else{$this->messageManager->addError(__("Recipient e-mail is empty or not valid"));}}else{$this->messageManager->addError(__("E-mail sending is not enabled"));}}public function sendMassFile($file,$invoices=null){$ccmgozs="file";$qgvxcb="file";$qsgpiai="dir";$nwdzsmezqf="file";${${"GLOBALS"}["hnhggktgyv"]}=$this->compressZip(${${"GLOBALS"}["hnhggktgyv"]},false);${$qsgpiai}=$this->getXmlDir();${"GLOBALS"}["nvxnybvdjm"]="dir";${"GLOBALS"}["ocedlvp"]="store_id";${$qgvxcb}=${${"GLOBALS"}["rdeexogjoh"]}.str_replace(${${"GLOBALS"}["nvxnybvdjm"]},"",${$nwdzsmezqf});${${"GLOBALS"}["ocedlvp"]}=1;${"GLOBALS"}["hcmuunvskuwm"]="send_to_customer";${${"GLOBALS"}["hnhggktgyv"]}=strval(str_replace("","",${$ccmgozs}));${"GLOBALS"}["gqsbljtior"]="mailtobcc";$apmysebduu="sitename";${${"GLOBALS"}["mephsff"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/archivia_fattura");${${"GLOBALS"}["hcmuunvskuwm"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/em_send_email_customer");${${"GLOBALS"}["pegotecvao"]}=$this->helper->getEmFattEleItInfo("em_mail_from");${${"GLOBALS"}["gqsbljtior"]}=$this->helper->getEmFattEleItInfo("em_mail_to");${$apmysebduu}=$this->_scopeConfig->getValue("general/store_information/name",\Magento\Store\Model\ScopeInterface::SCOPE_STORE);if($this->helper->getEmFattEleItInfo("em_send_email")){${"GLOBALS"}["yrslrcpunntk"]="mailtobcc";if(${${"GLOBALS"}["fvcbbtotdn"]}!=""&&filter_var(${${"GLOBALS"}["yrslrcpunntk"]},FILTER_VALIDATE_EMAIL)){${"GLOBALS"}["wswwjfp"]="file";if(file_exists(${${"GLOBALS"}["hnhggktgyv"]})&&is_file(${${"GLOBALS"}["wswwjfp"]})){${"GLOBALS"}["gyglmabjt"]="mailfrom";${${"GLOBALS"}["erjblyho"]}=new \PHPMailer\PHPMailer\PHPMailer();${"GLOBALS"}["xiqxjnue"]="mail";$mail->SMTPDebug="2";${"GLOBALS"}["ispdvmlelp"]="mailto";if($this->helper->getEmFattEleItInfo("em_use_smtp")){$mail->isSMTP();$mail->Host=$this->helper->getEmFattEleItInfo("em_mail_smtp_host");$mail->SMTPAuth=true;$mail->Username=$this->helper->getEmFattEleItInfo("em_mail_smtp_user");$mail->Password=$this->_enc->decrypt($this->helper->getEmFattEleItInfo("em_mail_smtp_psw"));$mail->SMTPSecure=$this->helper->getEmFattEleItInfo("em_mail_smtp_ssl");$mail->Port=$this->helper->getEmFattEleItInfo("em_mail_smtp_port");}else{$mail->isMail();}$mail->setFrom(${${"GLOBALS"}["gyglmabjt"]});${${"GLOBALS"}["ispdvmlelp"]}=[];if(${${"GLOBALS"}["eilggcg"]}){$vdrzrjgo="invoice";foreach(${${"GLOBALS"}["eilggcg"]} as${$vdrzrjgo}){$ssdvdzsjx="xml_attachments";$pdzksn="dir";$iyvrru="send_to_customer";${$ssdvdzsjx}[]=${$pdzksn}.$this->createXml(${${"GLOBALS"}["npucyuljq"]});if(${$iyvrru}){${"GLOBALS"}["oynwrtmjgv"]="mailto";${${"GLOBALS"}["oynwrtmjgv"]}[]=$invoice->getOrder()->getCustomerEmail();}}}else{$this->messageManager->addError(__("".$this->_getType()." does not exist."));return;}$mail->isHTML(true);$hotwohwops="send_to_customer";${"GLOBALS"}["mqcvykp"]="archivia_fatt";$grhrie="mail2";if(${${"GLOBALS"}["vdlxrpp"]}){$mail->Subject=${${"GLOBALS"}["gtmjfjgiilw"]}.__(": Xml Invoice");$mail->Body=__("Hi,<br>your xml invoice is attached.<br><br>Greetings,<br><br>");$mail->AltBody=__("Hi, your xml invoice is attached. Greetings");}else{${"GLOBALS"}["rmnsnhgd"]="sitename";$mail->Subject=${${"GLOBALS"}["rmnsnhgd"]}.__(": Xml Invoice nr. %1",str_replace(".xml","",basename(${${"GLOBALS"}["hnhggktgyv"]})));${"GLOBALS"}["enwlzewyo"]="file";$mail->Body=__("Hi,<br>your xml invoices: %1 are attached.<br><br>Greetings,<br><br>",str_replace(".xml","",basename(${${"GLOBALS"}["hnhggktgyv"]})));$mail->AltBody=__("Hi, your xml invoices: %1 are attached.",str_replace(".xml","",basename(${${"GLOBALS"}["enwlzewyo"]})));}${$grhrie}=${${"GLOBALS"}["xiqxjnue"]};${${"GLOBALS"}["rmzyfmeyqcb"]}=0;if(${$hotwohwops}){${"GLOBALS"}["mnmfntg"]="xml_att";foreach(${${"GLOBALS"}["tldfvtfj"]} as${${"GLOBALS"}["mnmfntg"]}){${"GLOBALS"}["gunrkbqciw"]="xml_att";if(file_exists(${${"GLOBALS"}["gunrkbqciw"]})){$ngfvsyejlv="xml_att";$mail->ClearAttachments();$mail->addAttachment(${$ngfvsyejlv});}try{${"GLOBALS"}["mcbiihcsxarq"]="mailto";$dnjhxeig="i";if(${${"GLOBALS"}["qoiszgumkkjj"]}[${$dnjhxeig}]!=""&&filter_var(${${"GLOBALS"}["mcbiihcsxarq"]}[${${"GLOBALS"}["rmzyfmeyqcb"]}],FILTER_VALIDATE_EMAIL)){${"GLOBALS"}["orwveugxxw"]="i";$mail->ClearAddresses();$dpsyhhbx="mailto";$mail->addAddress(${$dpsyhhbx}[${${"GLOBALS"}["orwveugxxw"]}]);$mail->send();$this->messageManager->addSuccess(__("Invoices to customer %1 has been mailed successfully.",${${"GLOBALS"}["qoiszgumkkjj"]}[${${"GLOBALS"}["rmzyfmeyqcb"]}]));}else{$this->messageManager->addError(__("Recipient e-mail %1 is empty or not valid"));}${${"GLOBALS"}["rmzyfmeyqcb"]}++;}catch(Exception$e){$this->messageManager->addError(__("Message could not be sent. Mailer Error: {$mail->ErrorInfo}"));}}if(file_exists(${${"GLOBALS"}["hnhggktgyv"]})){$mail2->ClearAttachments();$mail2->addAttachment(${${"GLOBALS"}["hnhggktgyv"]});try{$mail2->ClearAddresses();$bdgvuhzcrm="mailtobcc";$ezkblclxf="mailtobcc";$mail2->addAddress(${$ezkblclxf});$mail2->send();$this->messageManager->addSuccess(__("Invoices to %1 has been mailed successfully.",${$bdgvuhzcrm}));}catch(Exception$e){$this->messageManager->addError(__("Message could not be sent. Mailer Error: {$mail2->ErrorInfo}"));}}}else{try{$bxhpwyosij="mailtobcc";$mail->ClearAttachments();$lbwpiimexfs="file";$mail->addAttachment(${$lbwpiimexfs});$mail->ClearAddresses();$mail->addAddress(${${"GLOBALS"}["fvcbbtotdn"]});$mail->send();$this->messageManager->addSuccess(__("Invoices to %1 has been mailed successfully.",${$bxhpwyosij}));}catch(Exception$e){$this->messageManager->addError(__("Message could not be sent. Mailer Error: {$mail->ErrorInfo}"));}}if(!${${"GLOBALS"}["mqcvykp"]}){${"GLOBALS"}["kaquqi"]="file";$whjyrixdf="xml_attachments";unlink(${${"GLOBALS"}["kaquqi"]});foreach(${$whjyrixdf} as${${"GLOBALS"}["reuisywpr"]}){$kmdwnwbyzy="xml_att";unlink(${$kmdwnwbyzy});}}}else{$blpjqsmc="file";$this->messageManager->addError(__("Error: The file ".${$blpjqsmc}." does not exist!"));}}else{$this->messageManager->addError(__("Recipient e-mail is empty or not valid"));}}else{$this->messageManager->addError(__("E-mail sending is not enabled"));}}public function createXml($invoice){if($this->decryptIt($this->helper->getEmFattEleItInfo("em_license_key"))==str_replace("www.","",$_SERVER["SERVER_NAME"])||$_SERVER["SERVER_ADDR"]=="127.0.0.1"||$_SERVER["SERVER_ADDR"]=="::1"){$otqbwurh="table";${"GLOBALS"}["dcrxulvojg"]="store_id";$orvvxhkiue="invoice_user_address";$oeumqhr="dir";${"GLOBALS"}["ksrmkhzla"]="table";${"GLOBALS"}["nluyhkf"]="indirizzo";${"GLOBALS"}["hvnzdorvdpc"]="items";${"GLOBALS"}["ktcjqml"]="shipping_exclude_tax";$ogpnhcfwh="dir";$tgxqtuspnkx="invoice_id";$ypkyfpv="invoice_user_piva";${"GLOBALS"}["kedyns"]="causale";$ubbrhbzm="store_id";$iiodglc="store_id";${${"GLOBALS"}["hhhxbumcuhrx"]}=$this->_getType();${"GLOBALS"}["gnwvqqvb"]="xml_invoices_header";${"GLOBALS"}["feheoq"]="store_id";$ecutwfc="prov";${"GLOBALS"}["odjyxuxghf"]="id_paese_trasm";${"GLOBALS"}["kvqaarflljc"]="nazione";$dfsiygyyy="store_id";${${"GLOBALS"}["dxflslmujx"]}=\Magento\Framework\App\ObjectManager::getInstance();$kyblnupq="price0t";${"GLOBALS"}["vcvrtxayx"]="store_id";${"GLOBALS"}["pbnzyoojutv"]="natura";${"GLOBALS"}["fsnbpxzzlo"]="regionId";${"GLOBALS"}["eoteexnnx"]="store_id";${${"GLOBALS"}["zhcpqnmto"]}=$objectManager->create("Magento\Sales\Model\Order")->load($invoice->getData("order_id"));${"GLOBALS"}["zwwoycttd"]="vat15";${"GLOBALS"}["uoyolvfih"]="invoice_user_address";${"GLOBALS"}["byezvyz"]="vat15";$lnqditzmvtb="store_id";$rsdqknz="comune";$xxwxowuyt="causale";$jryesvutku="invoice_user_cod_dest";${"GLOBALS"}["gnbtttrw"]="store_id";${"GLOBALS"}["qlcwigagsq"]="bollo";$mlkblm="vat22";${"GLOBALS"}["uekgmyqjj"]="invoice_user_address";${${"GLOBALS"}["hvnzdorvdpc"]}=$invoice->getAllItems();${"GLOBALS"}["ihsgrpivvd"]="bollo";${"GLOBALS"}["tmqsrfxrsfn"]="grand_total";${"GLOBALS"}["xrmbpmxmeut"]="invoice_id";${${"GLOBALS"}["uekgmyqjj"]}=$invoice->getBillingAddress();$hkgotomcshty="vat5";${"GLOBALS"}["tucohkjr"]="vat_id";${"GLOBALS"}["fybmrxg"]="customerId";${"GLOBALS"}["eocvixncjit"]="grand_total";${"GLOBALS"}["whxrwrts"]="shipping_exclude_tax";${"GLOBALS"}["yxgixnhkqeee"]="invoice_user_cf";${$tgxqtuspnkx}=$invoice->getId();$rsbehxvpr="store_id";$lzoniwc="store_id";${${"GLOBALS"}["fybmrxg"]}=$order->getCustomerId();${"GLOBALS"}["dfwykji"]="xml_invoices_ana2";${${"GLOBALS"}["vcvrtxayx"]}=$order->getStoreId();$yyhtyrdqylwe="num_fatt";${"GLOBALS"}["msouckvd"]="xml_invoices_datigen";${${"GLOBALS"}["ihsgrpivvd"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici/BolloFattura",${$dfsiygyyy});${"GLOBALS"}["uhvblqrsyqw"]="id_codice";if(${${"GLOBALS"}["okrfspgffg"]}){${"GLOBALS"}["wfkdnmmsucc"]="bollo_importo";${${"GLOBALS"}["wfkdnmmsucc"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici/ImportoBollo",${${"GLOBALS"}["eloucv"]});}${"GLOBALS"}["fvfevbyljd"]="store_id";${${"GLOBALS"}["odjyxuxghf"]}=$this->helper->getConfigValue("efatt/DatiTrasmissione_IdTrasmittente/IdPaese",${${"GLOBALS"}["eoteexnnx"]});${"GLOBALS"}["aqiukenjgetb"]="cap";${"GLOBALS"}["xbxdlqqtbqas"]="invoice_user_piva";${${"GLOBALS"}["mgksgwgdy"]}=$this->helper->getConfigValue("efatt/DatiTrasmissione_IdTrasmittente/IdCodice",${${"GLOBALS"}["eloucv"]});${${"GLOBALS"}["xczbbig"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici_IdFiscaleIVA/IdPaese",${$lnqditzmvtb});${${"GLOBALS"}["uhvblqrsyqw"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici_IdFiscaleIVA/IdCodice",${${"GLOBALS"}["fvfevbyljd"]});${"GLOBALS"}["yzqfiyyf"]="xml_invoices_datiana2";${"GLOBALS"}["xrjbkd"]="xml_invoices_datiana";${${"GLOBALS"}["ursyvhobb"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici_Anagrafica/Denominazione",${${"GLOBALS"}["eloucv"]});${${"GLOBALS"}["roitvyn"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici/RegimeFiscale",${${"GLOBALS"}["gnbtttrw"]});${${"GLOBALS"}["nluyhkf"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_Sede/Indirizzo",${${"GLOBALS"}["eloucv"]});${"GLOBALS"}["tprnhlv"]="xml_invoices_id_trasm";${${"GLOBALS"}["aqiukenjgetb"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_Sede/CAP",${${"GLOBALS"}["eloucv"]});${${"GLOBALS"}["yixsuzopctu"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_Sede/Comune",${$rsbehxvpr});${${"GLOBALS"}["jirnlqp"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_Sede/Provincia",${${"GLOBALS"}["eloucv"]});${${"GLOBALS"}["kvqaarflljc"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_Sede/Nazione",${${"GLOBALS"}["dcrxulvojg"]});${${"GLOBALS"}["tvrvtljw"]}=${${"GLOBALS"}["tchxbrfhx"]}.${${"GLOBALS"}["mgksgwgdy"]}."_".sprintf("%05d",${${"GLOBALS"}["xrmbpmxmeut"]}).".xml";${${"GLOBALS"}["jskxgfip"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici_IdFiscaleIVA/EsigibilitaIva",${${"GLOBALS"}["feheoq"]});${${"GLOBALS"}["mephsff"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/archivia_fattura",${$ubbrhbzm});${${"GLOBALS"}["idjbrlejyle"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/usa_numero_fattura",${$iiodglc});$grdjktsqcjkn="query";${"GLOBALS"}["jszqcyrbp"]="query";${${"GLOBALS"}["ggwtmt"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/numero_fattura",${$lzoniwc});$hjopbehx="use_num_fatt";${"GLOBALS"}["zerlaepjbm"]="natura";$xfphdzr="xml_invoices_cedente";$wmcuktb="natura";${${"GLOBALS"}["zrkxgpvnugl"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/causale",${${"GLOBALS"}["eloucv"]})??"";$phsyvnpjf="invoice_user_cf";${${"GLOBALS"}["kedyns"]}=str_replace("[CUSTOMER_EMAIL]",$order->getCustomerEmail(),${$xxwxowuyt});$zbwkzoguv="invoice_user_country";${${"GLOBALS"}["hhjkgvbffwkx"]}=$invoice_user_address->getData("".$this->helper->getEmFattEleItInfo("em_pec")."")??"";${${"GLOBALS"}["cbbqry"]}=$invoice_user_address->getData("".$this->helper->getEmFattEleItInfo("em_sdi")."")??"";${"GLOBALS"}["ahxgyvbqzyg"]="invoice_user_zip";${${"GLOBALS"}["tucohkjr"]}=$invoice_user_address->getData("".$this->helper->getEmFattEleItInfo("vat_id")."")??"";${${"GLOBALS"}["kbqcpcsnihi"]}=$invoice_user_address->getData("".$this->helper->getEmFattEleItInfo("em_cf")."")??"";${"GLOBALS"}["zlryolwcrx"]="invoice_user_ln";if(${$hjopbehx})${${"GLOBALS"}["rjwiejfqxv"]}=trim($invoice->getData("".${$yyhtyrdqylwe}.""));else${${"GLOBALS"}["rjwiejfqxv"]}=$invoice->getIncrementId();${${"GLOBALS"}["resleqemd"]}=${${"GLOBALS"}["mohsbkipre"]}["region_id"];${"GLOBALS"}["tvymlo"]="invoice_user_country";${${"GLOBALS"}["pxbcmjvp"]}=$this->_resource->getConnection();${${"GLOBALS"}["ksrmkhzla"]}=$this->_resource->getTableName("directory_country_region");${$grdjktsqcjkn}="SELECT code FROM ".${$otqbwurh}." WHERE region_id = ".(int)${${"GLOBALS"}["fsnbpxzzlo"]}." LIMIT 1";${"GLOBALS"}["tovmouft"]="xml_invoices_datigen_doc";${${"GLOBALS"}["yhxptiurxcd"]}=$connection->fetchOne(${${"GLOBALS"}["jszqcyrbp"]});$femwpxvki="invoice_id";${${"GLOBALS"}["xbxdlqqtbqas"]}=str_replace("IT","",strtoupper(trim(${${"GLOBALS"}["ibhbdbyhpb"]})));${"GLOBALS"}["gxnsoocwj"]="xml_invoices_datitrasm";${"GLOBALS"}["zpgfqczhr"]="id_paese";if($this->helper->getEmFattEleItInfo("em_cf")!=""){${"GLOBALS"}["mjmhjkoj"]="em_cf";${"GLOBALS"}["vlugwyottpp"]="invoice_user_cf";${${"GLOBALS"}["vlugwyottpp"]}=trim(strtoupper(${${"GLOBALS"}["mjmhjkoj"]}));}else{${"GLOBALS"}["icyeelo"]="invoice_user_cf";${${"GLOBALS"}["icyeelo"]}="";}$rlhcbmkuoyx="invoice_user_city";if($this->helper->getEmFattEleItInfo("em_pec")!=""&&$this->helper->getEmFattEleItInfo("em_sdi")!=""){if($this->helper->getEmFattEleItInfo("em_pec")==$this->helper->getEmFattEleItInfo("em_sdi")){${"GLOBALS"}["vqxsxbbkssy"]="pec";if(strlen(trim(${${"GLOBALS"}["cbbqry"]}))==7){$iibvoialbk="invoice_user_cod_dest";${$iibvoialbk}=trim(${${"GLOBALS"}["cbbqry"]});${"GLOBALS"}["tpwoopuggbh"]="invoice_user_pec";${${"GLOBALS"}["tpwoopuggbh"]}="";}elseif(strlen(trim(${${"GLOBALS"}["vqxsxbbkssy"]}))>7){$pehvfjdtmswr="invoice_user_pec";$dxwokjgeacd="invoice_user_cod_dest";${$pehvfjdtmswr}=trim(${${"GLOBALS"}["hhjkgvbffwkx"]});${$dxwokjgeacd}="";}else{$dzxlgsvu="invoice_user_pec";${${"GLOBALS"}["ijshaos"]}="";${$dzxlgsvu}="";}}else{$igvwzu="sdi";${${"GLOBALS"}["xjrykqjvn"]}=trim(${${"GLOBALS"}["hhjkgvbffwkx"]});${"GLOBALS"}["eszlcfzs"]="invoice_user_cod_dest";${${"GLOBALS"}["eszlcfzs"]}=trim(${$igvwzu});}}${${"GLOBALS"}["khitdoztjoo"]}=${${"GLOBALS"}["mohsbkipre"]}["firstname"];$ymkxxxq="id_paese_trasm";${"GLOBALS"}["tuohyyxkg"]="type";${"GLOBALS"}["vjhxhmmq"]="price5t";${${"GLOBALS"}["zlryolwcrx"]}=${${"GLOBALS"}["mohsbkipre"]}["lastname"];$qxhnayasogeg="count";${$rlhcbmkuoyx}=htmlspecialchars(${$orvvxhkiue}["city"],ENT_XML1|ENT_COMPAT,"UTF-8");${${"GLOBALS"}["clwirkbijh"]}=htmlspecialchars(${${"GLOBALS"}["mohsbkipre"]}["street"],ENT_XML1|ENT_COMPAT,"UTF-8");$jypoflpsnb="ship";${${"GLOBALS"}["khnpbnoykdh"]}=${${"GLOBALS"}["mohsbkipre"]}["postcode"];$gfyxiprc="vat5";${$zbwkzoguv}=${${"GLOBALS"}["mohsbkipre"]}["country_id"];if(${${"GLOBALS"}["uoyolvfih"]}["company"]!=""){${"GLOBALS"}["nlldpy"]="invoice_user_address";${${"GLOBALS"}["dxkfhv"]}=htmlspecialchars(${${"GLOBALS"}["nlldpy"]}["company"],ENT_XML1|ENT_COMPAT,"UTF-8");}else{${"GLOBALS"}["ukioohtn"]="denominazione";$xkerfmq="invoice_user_ln";${${"GLOBALS"}["ukioohtn"]}=htmlspecialchars(${${"GLOBALS"}["khitdoztjoo"]}." ".${$xkerfmq},ENT_XML1|ENT_COMPAT,"UTF-8");}${${"GLOBALS"}["uoukkbqfgms"]}=new \SimpleXMLElement("<ns2:FatturaElettronica xmlns:ns2=\"http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2" versione=\"FPR12" />");${${"GLOBALS"}["gnwvqqvb"]}=$xml_invoices->addChild("FatturaElettronicaHeader",null,"");${${"GLOBALS"}["gxnsoocwj"]}=$xml_invoices_header->addChild("DatiTrasmissione");${${"GLOBALS"}["tprnhlv"]}=$xml_invoices_datitrasm->addChild("IdTrasmittente");$xml_invoices_id_trasm->addChild("IdPaese",${$ymkxxxq});$xml_invoices_id_trasm->addChild("IdCodice",${${"GLOBALS"}["mgksgwgdy"]});$xml_invoices_datitrasm->addChild("ProgressivoInvio",sprintf("%05d",${${"GLOBALS"}["jdiqvtxxds"]}));$xml_invoices_datitrasm->addChild("FormatoTrasmissione","FPR12");$gvpckbwqo="vat10";${${"GLOBALS"}["ciligcum"]}=array("23041","22061");$qivqhxa="invoice_user_city";if(${${"GLOBALS"}["ijshaos"]}==""||${${"GLOBALS"}["ijshaos"]}==NULL){$buqfhk="invoice_user_zip";$tslrsyzeehk="cap_liv_camp";${"GLOBALS"}["tsoxbdretg"]="invoice_user_cod_dest";if(${${"GLOBALS"}["ppcpfiwquhe"]}=="IT"||in_array(${$buqfhk},${$tslrsyzeehk}))${${"GLOBALS"}["ijshaos"]}="0000000";else${${"GLOBALS"}["tsoxbdretg"]}="XXXXXXX";}${"GLOBALS"}["twgchxn"]="price15t";$xml_invoices_datitrasm->addChild("CodiceDestinatario",strtoupper(${$jryesvutku}));$mikjuyqvsg="invoice_user_country";if(${${"GLOBALS"}["xjrykqjvn"]}!=null&&${${"GLOBALS"}["ijshaos"]}=="0000000"){${"GLOBALS"}["uvupufnpaej"]="invoice_user_pec";$xml_invoices_datitrasm->addChild("PECDestinatario",${${"GLOBALS"}["uvupufnpaej"]});}${$xfphdzr}=$xml_invoices_header->addChild("CedentePrestatore");${${"GLOBALS"}["xrjbkd"]}=$xml_invoices_cedente->addChild("DatiAnagrafici");${${"GLOBALS"}["xgprwq"]}=$xml_invoices_datiana->addChild("IdFiscaleIVA");$xml_invoices_iva->addChild("IdPaese",${${"GLOBALS"}["zpgfqczhr"]});$xml_invoices_iva->addChild("IdCodice",${${"GLOBALS"}["sxdsfrvmd"]});${"GLOBALS"}["mbmmhivui"]="vat10";${${"GLOBALS"}["gxsjfvezqd"]}=$xml_invoices_datiana->addChild("Anagrafica");$xml_invoices_ana->addChild("Denominazione",trim(${${"GLOBALS"}["ursyvhobb"]}));${"GLOBALS"}["heghywm"]="price15t";${"GLOBALS"}["lelflqi"]="invoice_user_country";$xml_invoices_datiana->addChild("RegimeFiscale",${${"GLOBALS"}["roitvyn"]});${"GLOBALS"}["wbdffsqsismj"]="xml_invoices_committente";${${"GLOBALS"}["ecfoklnavw"]}=$xml_invoices_cedente->addChild("Sede");$sljwognaxn="price4t";$xml_invoices_sede->addChild("Indirizzo",trim(${${"GLOBALS"}["guvywgbqmkd"]}));$xml_invoices_sede->addChild("CAP",trim(${${"GLOBALS"}["loisspjxycnu"]}));$xml_invoices_sede->addChild("Comune",trim(${$rsdqknz}));$xml_invoices_sede->addChild("Provincia",trim(${$ecutwfc}));$xml_invoices_sede->addChild("Nazione",${${"GLOBALS"}["qyjiyuj"]});${${"GLOBALS"}["rfapccflbcdn"]}=array("AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB");${${"GLOBALS"}["wbdffsqsismj"]}=$xml_invoices_header->addChild("CessionarioCommittente");${${"GLOBALS"}["yzqfiyyf"]}=$xml_invoices_committente->addChild("DatiAnagrafici");${"GLOBALS"}["xujuorpyf"]="grand_total";if(${$ypkyfpv}!=""&&${${"GLOBALS"}["lelflqi"]}=="IT"){$drsnjnou="invoice_user_country";${"GLOBALS"}["kcyjbf"]="invoice_user_piva";${${"GLOBALS"}["vecwiwdnwp"]}=$xml_invoices_datiana2->addChild("IdFiscaleIVA");$xmlidfiscale->addChild("IdPaese",${$drsnjnou});$xmlidfiscale->addChild("IdCodice",${${"GLOBALS"}["kcyjbf"]});}else if(${${"GLOBALS"}["tvymlo"]}!="IT"){${${"GLOBALS"}["vecwiwdnwp"]}=$xml_invoices_datiana2->addChild("IdFiscaleIVA");$xmlidfiscale->addChild("IdPaese",${${"GLOBALS"}["ppcpfiwquhe"]});if(${${"GLOBALS"}["vstkfirelsd"]}!="")$xmlidfiscale->addChild("IdCodice",sprintf("%05d",${${"GLOBALS"}["vstkfirelsd"]}));else$xmlidfiscale->addChild("IdCodice",sprintf("%05d",${${"GLOBALS"}["jdiqvtxxds"]}));}$vjyqnnskd="cod";if(isset(${${"GLOBALS"}["yynlrtnpvft"]})&&${$phsyvnpjf}!="")$xml_invoices_datiana2->addChild("CodiceFiscale",${${"GLOBALS"}["yxgixnhkqeee"]});${${"GLOBALS"}["dfwykji"]}=$xml_invoices_datiana2->addChild("Anagrafica");$xml_invoices_ana2->addChild("Denominazione",trim(${${"GLOBALS"}["dxkfhv"]}));${${"GLOBALS"}["ibdpfrwb"]}=$xml_invoices_committente->addChild("Sede");$xml_invoices_sede2->addChild("Indirizzo",preg_replace("/ 
/"," - ",trim(${${"GLOBALS"}["clwirkbijh"]})));if(${${"GLOBALS"}["ppcpfiwquhe"]}!="IT")$xml_invoices_sede2->addChild("CAP","00000");else$xml_invoices_sede2->addChild("CAP",${${"GLOBALS"}["ahxgyvbqzyg"]});$xml_invoices_sede2->addChild("Comune",trim(${$qivqhxa}));if(${${"GLOBALS"}["ppcpfiwquhe"]}=="IT")$xml_invoices_sede2->addChild("Provincia",${${"GLOBALS"}["yhxptiurxcd"]});$xml_invoices_sede2->addChild("Nazione",${$mikjuyqvsg});$lnmgmcveo="vat4";${"GLOBALS"}["hmttjejtu"]="natura";${${"GLOBALS"}["xtwxdffb"]}=$xml_invoices->addChild("FatturaElettronicaBody",null,"");${${"GLOBALS"}["msouckvd"]}=$xml_invoices_body->addChild("DatiGenerali");${"GLOBALS"}["fxqfhu"]="shipping_exclude_tax";${${"GLOBALS"}["tovmouft"]}=$xml_invoices_datigen->addChild("DatiGeneraliDocumento");$lmonxksc="invoice_user_country";if(${${"GLOBALS"}["tuohyyxkg"]}=="creditmemo"){$xml_invoices_datigen_doc->addChild("TipoDocumento","TD04");}else{$xml_invoices_datigen_doc->addChild("TipoDocumento","TD01");}$xml_invoices_datigen_doc->addChild("Divisa",$order->getData("store_currency_code"));$xml_invoices_datigen_doc->addChild("Data",explode(" ",$invoice->getCreatedAt())[0]);$zxjcxbrt="cod";$xml_invoices_datigen_doc->addChild("Numero",${${"GLOBALS"}["rjwiejfqxv"]});if($order->getDiscountAmount()>0){$pbhrfn="xml_invoices_datigen_doc_sconto";${$pbhrfn}=$xml_invoices_datigen_doc->addChild("ScontoMaggiorazione");$xml_invoices_datigen_doc_sconto->addChild("Tipo","SC");$xml_invoices_datigen_doc_sconto->addChild("Importo",number_format($order->getDiscountAmount,"2",".",""));}${${"GLOBALS"}["xujuorpyf"]}=$invoice->getGrandTotal();${${"GLOBALS"}["zgwihyopfkg"]}=number_format(${${"GLOBALS"}["eocvixncjit"]},"2",".","");if(${${"GLOBALS"}["qlcwigagsq"]}&&${${"GLOBALS"}["zgwihyopfkg"]}>77.47){${${"GLOBALS"}["yfycnf"]}=$xml_invoices_datigen_doc->addChild("DatiBollo");${"GLOBALS"}["bldcxhfzubjk"]="bollo_importo";$eidzui="bollo_importo";$xml_invoices_datigen_doc_bollo->addChild("BolloVirtuale","SI");if(${$eidzui}&&${${"GLOBALS"}["bldcxhfzubjk"]}!=""){${"GLOBALS"}["aqgxdvggd"]="bollo_importo";$xml_invoices_datigen_doc_bollo->addChild("ImportoBollo",number_format(${${"GLOBALS"}["aqgxdvggd"]},"2",".",""));}}$xml_invoices_datigen_doc->addChild("ImportoTotaleDocumento",number_format(${${"GLOBALS"}["tmqsrfxrsfn"]},"2",".",""));if(${${"GLOBALS"}["zrkxgpvnugl"]}!="")$xml_invoices_datigen_doc->addChild("Causale",${${"GLOBALS"}["zrkxgpvnugl"]});${${"GLOBALS"}["ymjfsdesnco"]}=$xml_invoices_datigen->addChild("DatiOrdineAcquisto");$xml_invoices_datigen_ordine->addChild("IdDocumento",${$femwpxvki});${${"GLOBALS"}["lmzeqrojbpgo"]}=$xml_invoices_body->addChild("DatiBeniServizi");${${"GLOBALS"}["ktcjqml"]}=0;${${"GLOBALS"}["whxrwrts"]}=$invoice->getShippingAmount();if((int)${${"GLOBALS"}["fxqfhu"]}!=0){$hrowdx="ship";${$hrowdx}=1;${"GLOBALS"}["kppptb"]="shipping_tax";${"GLOBALS"}["getyuhmoqg"]="tax_shipping_vat";${${"GLOBALS"}["oslypfmcuh"]}=$invoice->getShippingTaxAmount();${${"GLOBALS"}["getyuhmoqg"]}=(int)round(number_format(((${${"GLOBALS"}["kppptb"]}*100)/${${"GLOBALS"}["ydvjmtx"]}),"2",".",""));}$ontsldtwfid="invoice_user_country";if($this->moduleManager->isOutputEnabled("Phoenix_CashOnDelivery")){${${"GLOBALS"}["gtcwvqvad"]}=$invoice->getCodTaxAmount();${${"GLOBALS"}["wiovhzb"]}=$invoice->getCodFee();if((int)${${"GLOBALS"}["wiovhzb"]}>0){${${"GLOBALS"}["pwhqnwfproj"]}=(int)round(number_format(((${${"GLOBALS"}["gtcwvqvad"]}*100)/${${"GLOBALS"}["wiovhzb"]}),"2",".",""));}else{${${"GLOBALS"}["pwhqnwfproj"]}=0.00;}}elseif($this->moduleManager->isOutputEnabled("MSP_CashOnDelivery")){$yerhow="tax_code";${"GLOBALS"}["jmqkfxqqi"]="cod";${"GLOBALS"}["dsypmekmigr"]="cod";${$yerhow}=$order->getBaseMspCodTaxAmount();${${"GLOBALS"}["jmqkfxqqi"]}=$order->getBaseMspCodAmount();if((int)${${"GLOBALS"}["dsypmekmigr"]}>0){${"GLOBALS"}["rhcxacmgeimo"]="tax_cod_vat";$itltezv="cod";${${"GLOBALS"}["rhcxacmgeimo"]}=(int)round(number_format(((${${"GLOBALS"}["gtcwvqvad"]}*100)/${$itltezv}),"2",".",""));}else{$lxknhedu="tax_cod_vat";${$lxknhedu}=0.00;}}${"GLOBALS"}["evbxsdpkt"]="price0t";if(in_array(${$lmonxksc},${${"GLOBALS"}["rfapccflbcdn"]}))${${"GLOBALS"}["hmttjejtu"]}="N3.2";else if(${$ontsldtwfid}=="SM")${$wmcuktb}="N3.3";else if(${${"GLOBALS"}["ppcpfiwquhe"]}!="IT")${${"GLOBALS"}["pbnzyoojutv"]}="N3.1";else${${"GLOBALS"}["zerlaepjbm"]}=$this->helper->getEmFattEleItInfo("natura",${${"GLOBALS"}["eloucv"]});${${"GLOBALS"}["mrbhsfarwc"]}=0;${${"GLOBALS"}["gfjghplgyhw"]}=0;${${"GLOBALS"}["byezvyz"]}=0;${${"GLOBALS"}["twgchxn"]}=0;${${"GLOBALS"}["nawqbtx"]}=0;${${"GLOBALS"}["nxcziqlwt"]}=0;${$gfyxiprc}=0;${${"GLOBALS"}["vjhxhmmq"]}=0;${${"GLOBALS"}["yxhhhittkx"]}=0;${${"GLOBALS"}["ggxwfkg"]}=0;${${"GLOBALS"}["evbxsdpkt"]}=0;${${"GLOBALS"}["omolgvcpoqgn"]}=0.00;${$qxhnayasogeg}=1;foreach(${${"GLOBALS"}["feoyuucs"]} as${${"GLOBALS"}["ucicpwnjwid"]}){${"GLOBALS"}["avpndkct"]="tax_vat";$cobygaug="tax_vat";$qigdrft="imponibile";${"GLOBALS"}["yphinjxxu"]="tax_vat";${"GLOBALS"}["qroncpm"]="price10t";${"GLOBALS"}["hermuhfn"]="imponibile";if((int)$item->getData("row_total")==0||$item->getData("row_total")==""){continue;}${"GLOBALS"}["shmrzprvii"]="price15t";${${"GLOBALS"}["irvmgds"]}="";${${"GLOBALS"}["yevpykxlvom"]}=0;$lgsmbrfpcspp="price_incl_tax";${"GLOBALS"}["cktkyinup"]="tax_vat";${"GLOBALS"}["probffkogkp"]="total_tax";${"GLOBALS"}["olyyrvoxha"]="tax_amount";$khslgvic="tax_vat";${"GLOBALS"}["rrpjtgt"]="tax_vat";${$qigdrft}=0;${"GLOBALS"}["ypzmuo"]="tax_vat";$jffkqqnesns="rowtotal";${"GLOBALS"}["eeshnwffwv"]="tax_amount";${"GLOBALS"}["xmifvyvevk"]="subtotal";${"GLOBALS"}["ynkhlwmfg"]="tax_vat";$lswwhpwi="price_incl_tax";if($item->getData("discount_amount")>0){${${"GLOBALS"}["ypocgfcagxln"]}=$item->getData("discount_amount");}elseif(($item->getData("price")!=$item->getData("row_total"))&&$item->getData("qty")==1){$tjdsmphnmyw="discount";$bsdoeexmmrw="custom_discount";${$tjdsmphnmyw}=$item->getData("price")-$item->getData("row_total");${$bsdoeexmmrw}=1;}else{${"GLOBALS"}["cqbaqvc"]="discount";${${"GLOBALS"}["cqbaqvc"]}=0;}$tpethmwu="tax_amount";${${"GLOBALS"}["mbvjvurve"]}=$this->_scopeConfig->getValue("tax/calculation/apply_after_discount",\Magento\Store\Model\ScopeInterface::SCOPE_STORE);$nvmtxmqjdogm="price_escl_tax";${"GLOBALS"}["tdqutadb"]="vat5";${${"GLOBALS"}["avtoovm"]}=$this->_scopeConfig->getValue("tax/calculation/discount_tax",\Magento\Store\Model\ScopeInterface::SCOPE_STORE);${${"GLOBALS"}["perdbmtlm"]}=$this->_scopeConfig->getValue("tax/calculation/algorithm",\Magento\Store\Model\ScopeInterface::SCOPE_STORE);$riffluo="price_escl_tax";${"GLOBALS"}["ttvdrg"]="subtotal";${${"GLOBALS"}["eeshnwffwv"]}=number_format($item->getTaxAmount(),"2",".","");${"GLOBALS"}["escdlc"]="tax_vat";$trjoryfrb="price4t";${${"GLOBALS"}["fhkvcie"]}=$item->getData("price_incl_tax");${$nvmtxmqjdogm}=$item->getPrice();${${"GLOBALS"}["probffkogkp"]}=$item->getTaxAmount();${"GLOBALS"}["gtxfbxpihdcq"]="tax_vat";${"GLOBALS"}["mjnggtujxo"]="taxcustomer";$aegblhg="discount";${"GLOBALS"}["qdhxwobqa"]="imponibile";${"GLOBALS"}["ytbarr"]="product_name";${"GLOBALS"}["czijhlepji"]="imponibile";${"GLOBALS"}["wjpsjjjfjmsk"]="imponibile";${"GLOBALS"}["bqwgybbkzla"]="formatted_product_name";if(${${"GLOBALS"}["ypocgfcagxln"]}>0){$xdmrubhgkmt="subtotal";$vcgfhgux="price_escl_tax";$htaywryfu="discount";${"GLOBALS"}["pkbxbixkux"]="price_incl_tax";$vjirolrdu="discount";${$xdmrubhgkmt}=(${${"GLOBALS"}["pkbxbixkux"]}*$item->getData("qty"))-${$vjirolrdu};${${"GLOBALS"}["cmufbme"]}=(${$vcgfhgux}*$item->getData("qty"))-${$htaywryfu};}else{${${"GLOBALS"}["wedetds"]}=${${"GLOBALS"}["fhkvcie"]}*$item->getData("qty");${${"GLOBALS"}["cmufbme"]}=${${"GLOBALS"}["vhtrxopyoe"]}*$item->getData("qty");}${${"GLOBALS"}["wedetds"]}=${${"GLOBALS"}["cmufbme"]}+${${"GLOBALS"}["nqxtbidnj"]};${${"GLOBALS"}["ynkhlwmfg"]}=(int)round(((${$lgsmbrfpcspp}-$item->getData("price"))*100/$item->getData("price"))+0.01);${"GLOBALS"}["ktbqph"]="tax_vat";${"GLOBALS"}["jnqmiw"]="vat10";$pbzvipdphken="tax_vat";$hfimip="vat22";if(${${"GLOBALS"}["fwsgewkkvav"]}==3)${${"GLOBALS"}["ypzmuo"]}=4;else if(${${"GLOBALS"}["fwsgewkkvav"]}==6)${${"GLOBALS"}["cktkyinup"]}=5;else if(${${"GLOBALS"}["ktbqph"]}==9||${${"GLOBALS"}["fwsgewkkvav"]}==11)${${"GLOBALS"}["rrpjtgt"]}=10;else if(${$pbzvipdphken}==14||${${"GLOBALS"}["fwsgewkkvav"]}==16)${${"GLOBALS"}["escdlc"]}=15;else if(${${"GLOBALS"}["fwsgewkkvav"]}==20||${${"GLOBALS"}["gtxfbxpihdcq"]}==21||${${"GLOBALS"}["fwsgewkkvav"]}==23)${${"GLOBALS"}["fwsgewkkvav"]}=22;$jblwgdrqdiu="price5t";if(${${"GLOBALS"}["mjnggtujxo"]}==1){$eirthvled="discount_taxincluded";if(${$eirthvled}){$wpsbxlfh="discount";$nbylsjph="tax_vat";${"GLOBALS"}["kurtlywfmy"]="discount";${$wpsbxlfh}=round(${${"GLOBALS"}["kurtlywfmy"]}/(1+${$nbylsjph}/100),2);}${"GLOBALS"}["jyzymcszq"]="discount";$iwhyutvdecp="rowtotal";${$iwhyutvdecp}=$item->getData("row_total")-${${"GLOBALS"}["jyzymcszq"]};}else{${${"GLOBALS"}["ecsljullmr"]}=$item->getData("row_total");}${${"GLOBALS"}["ytbarr"]}.=trim($item->getData("name"));${${"GLOBALS"}["txxyiuone"]}=str_replace(["","","",""],"",${${"GLOBALS"}["irvmgds"]});${"GLOBALS"}["uhycnvpkqki"]="imponibile";$vidlufn="vat4";${${"GLOBALS"}["zynjnvfst"]}=htmlspecialchars(${${"GLOBALS"}["txxyiuone"]},ENT_XML1|ENT_COMPAT,"UTF-8");switch(${${"GLOBALS"}["avpndkct"]}){case 0.00:${${"GLOBALS"}["jmdtopf"]}=${${"GLOBALS"}["wedetds"]};${${"GLOBALS"}["ynaeworqe"]}+=${${"GLOBALS"}["czijhlepji"]};break;case 4.00:${${"GLOBALS"}["jmdtopf"]}=${${"GLOBALS"}["wedetds"]}/1.04;${$trjoryfrb}+=${${"GLOBALS"}["wjpsjjjfjmsk"]};${$vidlufn}+=${$tpethmwu};break;case 5.00:${${"GLOBALS"}["jmdtopf"]}=${${"GLOBALS"}["wedetds"]}/1.05;${$jblwgdrqdiu}+=${${"GLOBALS"}["uhycnvpkqki"]};${${"GLOBALS"}["tdqutadb"]}+=(${$jffkqqnesns}*5)/100;break;case 10.00:${${"GLOBALS"}["jmdtopf"]}=${${"GLOBALS"}["wedetds"]}/1.10;${${"GLOBALS"}["qroncpm"]}+=${${"GLOBALS"}["jmdtopf"]};${${"GLOBALS"}["jnqmiw"]}+=${${"GLOBALS"}["olyyrvoxha"]};break;case 15.00:${${"GLOBALS"}["hermuhfn"]}=${${"GLOBALS"}["xmifvyvevk"]}/1.15;${${"GLOBALS"}["shmrzprvii"]}+=$item->getData("row_total")-${${"GLOBALS"}["ypocgfcagxln"]};${${"GLOBALS"}["oaabotdigik"]}+=(${${"GLOBALS"}["ecsljullmr"]}*15)/100;break;default:${${"GLOBALS"}["qdhxwobqa"]}=${${"GLOBALS"}["ttvdrg"]}/1.22;${$hfimip}+=${${"GLOBALS"}["omolgvcpoqgn"]};if(${${"GLOBALS"}["ypocgfcagxln"]}>0){${"GLOBALS"}["brwytkczpmql"]="price22t";${"GLOBALS"}["twtklkfl"]="discount";$somsofhu="price22t";if(${${"GLOBALS"}["yevpykxlvom"]}==0)${${"GLOBALS"}["brwytkczpmql"]}+=((${${"GLOBALS"}["fhkvcie"]}/(1+${${"GLOBALS"}["fwsgewkkvav"]}/100))-(${${"GLOBALS"}["ypocgfcagxln"]}/$item->getData("qty")))*$item->getData("qty");else${$somsofhu}+=((${${"GLOBALS"}["fhkvcie"]}/(1+${${"GLOBALS"}["fwsgewkkvav"]}/100))-${${"GLOBALS"}["twtklkfl"]})*$item->getData("qty");}else{$nvuvmyxgkmw="tax_vat";${"GLOBALS"}["nyqbfw"]="price22t";${${"GLOBALS"}["nyqbfw"]}+=(${${"GLOBALS"}["fhkvcie"]}/(1+${$nvuvmyxgkmw}/100))*$item->getData("qty");}}${${"GLOBALS"}["fhkvcie"]}=number_format(${$lswwhpwi},"4",".","");${"GLOBALS"}["bbflviuxyk"]="count";${$riffluo}=number_format((${${"GLOBALS"}["fhkvcie"]}/(1+${$cobygaug}/100)),"4",".","");${${"GLOBALS"}["mpktpyvoh"]}=$xml_invoices_datibeni->addChild("DettaglioLinee");$xml_invoices_datibeni_linee->addChild("NumeroLinea",${${"GLOBALS"}["bbflviuxyk"]});$xml_invoices_datibeni_linee->addChild("Descrizione",substr(${${"GLOBALS"}["bqwgybbkzla"]},0,1000));$xml_invoices_datibeni_linee->addChild("Quantita",number_format($item->getData("qty"),"2",".",""));$xml_invoices_datibeni_linee->addChild("PrezzoUnitario",number_format((${${"GLOBALS"}["fhkvcie"]}/(1+${${"GLOBALS"}["yphinjxxu"]}/100)),"4",".",""));if(${$aegblhg}>0){${"GLOBALS"}["mnloyqigp"]="xml_invoices_datibeni_linee_sconto";$lxnwsodsra="discount";$pybidltyvy="custom_discount";${${"GLOBALS"}["mnloyqigp"]}=$xml_invoices_datibeni_linee->addChild("ScontoMaggiorazione");$xml_invoices_datibeni_linee_sconto->addChild("Tipo","SC");$xml_invoices_datibeni_linee_sconto->addChild("Importo",number_format(${$lxnwsodsra}/$item->getData("qty"),"4",".",""));if(${$pybidltyvy}==0){$xml_invoices_datibeni_linee->addChild("PrezzoTotale",number_format(((${${"GLOBALS"}["vhtrxopyoe"]})-(${${"GLOBALS"}["ypocgfcagxln"]}/$item->getData("qty")))*$item->getData("qty"),"2",".",""));}else{$kbkkst="price_escl_tax";$xml_invoices_datibeni_linee->addChild("PrezzoTotale",number_format((${$kbkkst}-${${"GLOBALS"}["ypocgfcagxln"]})*$item->getData("qty"),"2",".",""));}}else{${"GLOBALS"}["mncfopekn"]="price_escl_tax";$xml_invoices_datibeni_linee->addChild("PrezzoTotale",number_format(${${"GLOBALS"}["mncfopekn"]}*$item->getData("qty"),"2",".",""));}$xml_invoices_datibeni_linee->addChild("AliquotaIVA",number_format(${${"GLOBALS"}["fwsgewkkvav"]},"2",".",""));if(${$khslgvic}==0.00){${"GLOBALS"}["vnkwmuxp"]="natura";$xml_invoices_datibeni_linee->addChild("Natura",${${"GLOBALS"}["vnkwmuxp"]});}${${"GLOBALS"}["wqmgtdcfe"]}++;}${"GLOBALS"}["kveudsvaw"]="filename";${${"GLOBALS"}["yxhhhittkx"]}=round(${$lnmgmcveo},2);${$hkgotomcshty}=round(${${"GLOBALS"}["hlwtskbbljm"]},2);${${"GLOBALS"}["mbmmhivui"]}=round(${$gvpckbwqo},2);${${"GLOBALS"}["oaabotdigik"]}=round(${${"GLOBALS"}["zwwoycttd"]},2);${${"GLOBALS"}["mrbhsfarwc"]}=round(${$mlkblm},2);if(isset(${$jypoflpsnb})){$cnfqqjxvuxld="vat10";$qhpmewgct="ship22";$znfvbhcb="vat22";$ixngdvy="tax_shipping_vat";$eewfgs="shipping_exclude_tax";$pgpnclosjzm="shipping_tax";$enssgqduisnc="price10t";${"GLOBALS"}["wlwcscvcd"]="shipping_exclude_tax";${"GLOBALS"}["mfgwcdsr"]="xml_invoices_datibeni_linee";${"GLOBALS"}["hfpuor"]="shipping_exclude_tax";$cbdypmgy="shipping_exclude_tax";${"GLOBALS"}["ylbylirw"]="ship10";${"GLOBALS"}["kiqayp"]="ship4";$sghbmfholsd="ship15";${"GLOBALS"}["mcuzunhv"]="shipping_tax";${"GLOBALS"}["kvsqyymjwgk"]="price4t";$ipsbheq="shipping_exclude_tax";${"GLOBALS"}["ulmfmtfvr"]="ship0";${"GLOBALS"}["kcprfixs"]="price0t";$ubgtkqnn="price5t";switch(${${"GLOBALS"}["reehehxgl"]}){case 0.00:${${"GLOBALS"}["kcprfixs"]}+=${$ipsbheq};${${"GLOBALS"}["ulmfmtfvr"]}=1;break;case 4.00:${${"GLOBALS"}["yxhhhittkx"]}+=(${${"GLOBALS"}["oslypfmcuh"]});${${"GLOBALS"}["kvsqyymjwgk"]}+=${${"GLOBALS"}["wlwcscvcd"]};${${"GLOBALS"}["kiqayp"]}=1;break;case 5.00:${${"GLOBALS"}["hlwtskbbljm"]}+=(${${"GLOBALS"}["oslypfmcuh"]});${$ubgtkqnn}+=${${"GLOBALS"}["ydvjmtx"]};${${"GLOBALS"}["hnoowlfbt"]}=1;break;case 10.00:${$cnfqqjxvuxld}+=(${${"GLOBALS"}["oslypfmcuh"]});${$enssgqduisnc}+=${${"GLOBALS"}["hfpuor"]};${${"GLOBALS"}["ylbylirw"]}=1;break;case 15.00:${${"GLOBALS"}["oaabotdigik"]}+=(${${"GLOBALS"}["mcuzunhv"]});${${"GLOBALS"}["kolsweif"]}+=${$cbdypmgy};${$sghbmfholsd}=1;break;default:${${"GLOBALS"}["gfjghplgyhw"]}+=${$eewfgs};${$znfvbhcb}+=(${$pgpnclosjzm});${$qhpmewgct}=1;}${${"GLOBALS"}["mfgwcdsr"]}=$xml_invoices_datibeni->addChild("DettaglioLinee");$xml_invoices_datibeni_linee->addChild("NumeroLinea",${${"GLOBALS"}["wqmgtdcfe"]});$xml_invoices_datibeni_linee->addChild("TipoCessionePrestazione","AC");$xml_invoices_datibeni_linee->addChild("Descrizione","Spese di spedizione");$xml_invoices_datibeni_linee->addChild("Quantita","1.00");$xml_invoices_datibeni_linee->addChild("PrezzoUnitario",number_format(${${"GLOBALS"}["ydvjmtx"]},"2",".",""));${"GLOBALS"}["xwfthxl"]="tax_shipping_vat";$xml_invoices_datibeni_linee->addChild("PrezzoTotale",number_format(${${"GLOBALS"}["ydvjmtx"]},"2",".",""));$xml_invoices_datibeni_linee->addChild("AliquotaIVA",number_format(${$ixngdvy},"2",".",""));if(${${"GLOBALS"}["xwfthxl"]}==0.00){${"GLOBALS"}["ewpdbyt"]="natura";$xml_invoices_datibeni_linee->addChild("Natura",${${"GLOBALS"}["ewpdbyt"]});}${${"GLOBALS"}["wqmgtdcfe"]}++;}if(isset(${$vjyqnnskd})&&number_format(${$zxjcxbrt},"2",".","")!="0.00"){$pqdnutryjj="cod";${"GLOBALS"}["svvwoqugo"]="cod";$lmivmdcqbo="price5t";${"GLOBALS"}["rnotvufphm"]="cod";$ttnirnb="cod10";$sbelvcggf="tax_cod_vat";$wgousfxqh="cod5";${"GLOBALS"}["otmojhivxce"]="price22t";${"GLOBALS"}["olmglbfkm"]="cod4";$kvcwmbja="tax_code";${"GLOBALS"}["pcjvffx"]="vat4";${"GLOBALS"}["agmplosclxex"]="vat5";$pcinkxxdc="count";$dnotuxwze="xml_invoices_datibeni_linee";$ohijxw="cod0";switch(${$sbelvcggf}){case 0.00:${${"GLOBALS"}["ynaeworqe"]}+=${${"GLOBALS"}["wiovhzb"]};${$ohijxw}=1;break;case 4.00:${${"GLOBALS"}["pcjvffx"]}+=(${$kvcwmbja});${${"GLOBALS"}["ggxwfkg"]}+=${$pqdnutryjj};${${"GLOBALS"}["olmglbfkm"]}=1;break;case 5.00:${${"GLOBALS"}["agmplosclxex"]}+=(${${"GLOBALS"}["gtcwvqvad"]});${$lmivmdcqbo}+=${${"GLOBALS"}["svvwoqugo"]};${$wgousfxqh}=1;break;case 10.00:${${"GLOBALS"}["nawqbtx"]}+=(${${"GLOBALS"}["gtcwvqvad"]});${${"GLOBALS"}["nxcziqlwt"]}+=${${"GLOBALS"}["wiovhzb"]};${$ttnirnb}=1;break;case 15.00:${${"GLOBALS"}["oaabotdigik"]}+=(${${"GLOBALS"}["gtcwvqvad"]});${${"GLOBALS"}["kolsweif"]}+=${${"GLOBALS"}["wiovhzb"]};${${"GLOBALS"}["dafynerkyxvn"]}=1;break;default:${${"GLOBALS"}["otmojhivxce"]}+=${${"GLOBALS"}["rnotvufphm"]};${${"GLOBALS"}["mrbhsfarwc"]}+=(${${"GLOBALS"}["gtcwvqvad"]});${${"GLOBALS"}["xahlllqu"]}=1;}${$dnotuxwze}=$xml_invoices_datibeni->addChild("DettaglioLinee");$xml_invoices_datibeni_linee->addChild("NumeroLinea",${$pcinkxxdc});$xml_invoices_datibeni_linee->addChild("TipoCessionePrestazione","AC");$xml_invoices_datibeni_linee->addChild("Descrizione","Contrassegno");$xml_invoices_datibeni_linee->addChild("Quantita","1.00");$xml_invoices_datibeni_linee->addChild("PrezzoUnitario",number_format(${${"GLOBALS"}["wiovhzb"]},"2",".",""));$lnfevf="cod";$xml_invoices_datibeni_linee->addChild("PrezzoTotale",number_format(${$lnfevf},"2",".",""));$hxhvqbmg="tax_cod_vat";$xml_invoices_datibeni_linee->addChild("AliquotaIVA",number_format(${${"GLOBALS"}["pwhqnwfproj"]},"2",".",""));if(${$hxhvqbmg}==0.00){${"GLOBALS"}["feornloqx"]="natura";$xml_invoices_datibeni_linee->addChild("Natura",${${"GLOBALS"}["feornloqx"]});}${${"GLOBALS"}["wqmgtdcfe"]}++;}if(${${"GLOBALS"}["gfjghplgyhw"]}>0){${"GLOBALS"}["ccmlxpfloiy"]="cod22";$syozyxmr="xml_invoices_datibeni_riep";${$syozyxmr}=$xml_invoices_datibeni->addChild("DatiRiepilogo");$xml_invoices_datibeni_riep->addChild("AliquotaIVA","22.00");$znnmqcqvxn="cod";${"GLOBALS"}["nelgwwr"]="price22t";if(isset(${${"GLOBALS"}["jmfshbduyrh"]})&&isset(${${"GLOBALS"}["fidvkdjni"]})){$wggyebcrb="cod22";if(isset(${${"GLOBALS"}["wiovhzb"]})&&isset(${$wggyebcrb})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]}+${${"GLOBALS"}["wiovhzb"]},"2",".",""));}elseif(!isset(${${"GLOBALS"}["wiovhzb"]})){${"GLOBALS"}["kxwcfdvvu"]="shipping_exclude_tax";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["kxwcfdvvu"]},"2",".",""));}}elseif(isset(${$znnmqcqvxn})&&isset(${${"GLOBALS"}["ccmlxpfloiy"]})){$allqital="cod";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${$allqital},"2",".",""));}$xml_invoices_datibeni_riep->addChild("ImponibileImporto",number_format(${${"GLOBALS"}["nelgwwr"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("Imposta",number_format((${${"GLOBALS"}["gfjghplgyhw"]}*22)/100,"2",".",""));$xml_invoices_datibeni_riep->addChild("EsigibilitaIVA",${${"GLOBALS"}["jskxgfip"]});}if(${$sljwognaxn}>0){${${"GLOBALS"}["bogzdiuw"]}=$xml_invoices_datibeni->addChild("DatiRiepilogo");${"GLOBALS"}["vnbcctya"]="ship4";$ydmzliowceqo="price4t";$xml_invoices_datibeni_riep->addChild("AliquotaIVA","4.00");${"GLOBALS"}["lvlwihmps"]="cod";$ariohyf="cod4";if(isset(${${"GLOBALS"}["jmfshbduyrh"]})&&isset(${${"GLOBALS"}["vnbcctya"]})){${"GLOBALS"}["pqpjixi"]="cod";if(isset(${${"GLOBALS"}["pqpjixi"]})&&isset(${${"GLOBALS"}["hlguib"]})){$srqnfyd="cod";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]}+${$srqnfyd},"2",".",""));}elseif(!isset(${${"GLOBALS"}["wiovhzb"]})){$oogjxjtxstiu="shipping_exclude_tax";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${$oogjxjtxstiu},"2",".",""));}}elseif(isset(${${"GLOBALS"}["lvlwihmps"]})&&isset(${$ariohyf})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["wiovhzb"]},"2",".",""));}$xml_invoices_datibeni_riep->addChild("ImponibileImporto",number_format(${$ydmzliowceqo},"2",".",""));$xml_invoices_datibeni_riep->addChild("Imposta",number_format(${${"GLOBALS"}["yxhhhittkx"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("EsigibilitaIVA",${${"GLOBALS"}["jskxgfip"]});}if(${${"GLOBALS"}["limekwohmh"]}>0){${"GLOBALS"}["kkelixt"]="xml_invoices_datibeni_riep";$qymqwfrd="ship5";${"GLOBALS"}["umymmgnguir"]="price5t";${${"GLOBALS"}["kkelixt"]}=$xml_invoices_datibeni->addChild("DatiRiepilogo");$vmvffxccaj="cod5";$xml_invoices_datibeni_riep->addChild("AliquotaIVA","5.00");$citekwxc="ship";if(isset(${$citekwxc})&&isset(${$qymqwfrd})){if(isset(${${"GLOBALS"}["wiovhzb"]})&&isset(${${"GLOBALS"}["ynbmgbzjdcy"]})){${"GLOBALS"}["gtjednbgmrz"]="cod";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]}+${${"GLOBALS"}["gtjednbgmrz"]},"2",".",""));}elseif(!isset(${${"GLOBALS"}["wiovhzb"]})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]},"2",".",""));}}elseif(isset(${${"GLOBALS"}["wiovhzb"]})&&isset(${$vmvffxccaj})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["wiovhzb"]},"2",".",""));}$xml_invoices_datibeni_riep->addChild("ImponibileImporto",number_format(${${"GLOBALS"}["umymmgnguir"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("Imposta",number_format(${${"GLOBALS"}["hlwtskbbljm"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("EsigibilitaIVA",${${"GLOBALS"}["jskxgfip"]});}if(${${"GLOBALS"}["nxcziqlwt"]}>0){${"GLOBALS"}["elobuun"]="xml_invoices_datibeni_riep";${${"GLOBALS"}["elobuun"]}=$xml_invoices_datibeni->addChild("DatiRiepilogo");${"GLOBALS"}["ubawyiq"]="vat10";${"GLOBALS"}["xmotmfmbeq"]="cod";$xml_invoices_datibeni_riep->addChild("AliquotaIVA","10.00");${"GLOBALS"}["evjqden"]="price10t";if(isset(${${"GLOBALS"}["jmfshbduyrh"]})&&isset(${${"GLOBALS"}["uhuheioo"]})){if(isset(${${"GLOBALS"}["wiovhzb"]})&&isset(${${"GLOBALS"}["mpkvltgpj"]})){$dbvxuvhbfnj="cod";$telpjfvo="shipping_exclude_tax";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${$telpjfvo}+${$dbvxuvhbfnj},"2",".",""));}elseif(!isset(${${"GLOBALS"}["wiovhzb"]})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]},"2",".",""));}}elseif(isset(${${"GLOBALS"}["xmotmfmbeq"]})&&isset(${${"GLOBALS"}["mpkvltgpj"]})){${"GLOBALS"}["bjisuzfpdy"]="cod";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["bjisuzfpdy"]},"2",".",""));}$xml_invoices_datibeni_riep->addChild("ImponibileImporto",number_format(${${"GLOBALS"}["evjqden"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("Imposta",number_format(${${"GLOBALS"}["ubawyiq"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("EsigibilitaIVA",${${"GLOBALS"}["jskxgfip"]});}if(${${"GLOBALS"}["heghywm"]}>0){$tjqbrkruhoxd="cod15";${"GLOBALS"}["fhmdytjlwiei"]="ship";${${"GLOBALS"}["bogzdiuw"]}=$xml_invoices_datibeni->addChild("DatiRiepilogo");$xml_invoices_datibeni_riep->addChild("AliquotaIVA","15.00");$bphzwfr="price15t";$rkgcpxitp="esigibilitaiva";$ibqbtwy="vat15";if(isset(${${"GLOBALS"}["fhmdytjlwiei"]})&&isset(${${"GLOBALS"}["jhlqmkfsvpz"]})){${"GLOBALS"}["utjroljqiv"]="cod";$pcwnfwsopfx="cod15";$jnedteqm="cod";if(isset(${${"GLOBALS"}["utjroljqiv"]})&&isset(${$pcwnfwsopfx})){$ghyurbebe="cod";$bfacyohlmvm="shipping_exclude_tax";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${$bfacyohlmvm}+${$ghyurbebe},"2",".",""));}elseif(!isset(${$jnedteqm})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]},"2",".",""));}}elseif(isset(${${"GLOBALS"}["wiovhzb"]})&&isset(${$tjqbrkruhoxd})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["wiovhzb"]},"2",".",""));}$xml_invoices_datibeni_riep->addChild("ImponibileImporto",number_format(${$bphzwfr},"2",".",""));$xml_invoices_datibeni_riep->addChild("Imposta",number_format(${$ibqbtwy},"2",".",""));$xml_invoices_datibeni_riep->addChild("EsigibilitaIVA",${$rkgcpxitp});}if(${$kyblnupq}>0){$cvcevofj="ship";$cuugsv="esigibilitaiva";$cmwmnbtuuwd="cod";${"GLOBALS"}["nywcfj"]="xml_invoices_datibeni_riep";${${"GLOBALS"}["nywcfj"]}=$xml_invoices_datibeni->addChild("DatiRiepilogo");$xml_invoices_datibeni_riep->addChild("AliquotaIVA","0.00");$xml_invoices_datibeni_riep->addChild("Natura",${${"GLOBALS"}["uvqblukdbkj"]});$xxeksryrydk="ship0";$pnvelmuiq="cod0";${"GLOBALS"}["ujjidn"]="price0t";if(isset(${$cvcevofj})&&isset(${$xxeksryrydk})){${"GLOBALS"}["dfrlnjn"]="cod";$rcpqwokcxqq="cod";${"GLOBALS"}["sgybwcsmnh"]="cod0";if(isset(${$rcpqwokcxqq})&&isset(${${"GLOBALS"}["sgybwcsmnh"]})){$jbflott="cod";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]}+${$jbflott},"2",".",""));}elseif(!isset(${${"GLOBALS"}["dfrlnjn"]})){${"GLOBALS"}["rwhdxczsenp"]="shipping_exclude_tax";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["rwhdxczsenp"]},"2",".",""));}}elseif(isset(${$cmwmnbtuuwd})&&isset(${$pnvelmuiq})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["wiovhzb"]},"2",".",""));}$xml_invoices_datibeni_riep->addChild("ImponibileImporto",number_format(${${"GLOBALS"}["ujjidn"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("Imposta","0.00");$xml_invoices_datibeni_riep->addChild("EsigibilitaIVA",${$cuugsv});}${${"GLOBALS"}["rdeexogjoh"]}=$this->getXmlDir();if(!file_exists(${$ogpnhcfwh})){${"GLOBALS"}["qncsmiikdfx"]="dir";$this->io->mkdir(${${"GLOBALS"}["qncsmiikdfx"]},0777);}if($xml_invoices->saveXML(${$oeumqhr}.${${"GLOBALS"}["kveudsvaw"]})){${"GLOBALS"}["gsbgvvgdlwz"]="filename";return${${"GLOBALS"}["gsbgvvgdlwz"]};}else{${"GLOBALS"}["aekncmoqkpd"]="filename";return${${"GLOBALS"}["aekncmoqkpd"]};}}else{header($_SERVER["SERVER_PROTOCOL"]." 400 Bad Request");die("licenza per il dominio ".str_replace("www.","",$_SERVER["SERVER_NAME"])." non valida! ");}}} ?>

Did this file decode correctly?

Original Code

<?php namespace EspertoMagent\FattEleIt\Model;${"GLOBALS"}["uvqblukdbkj"]="natura";${"GLOBALS"}["jhlqmkfsvpz"]="ship15";${"GLOBALS"}["mpkvltgpj"]="cod10";${"GLOBALS"}["uhuheioo"]="ship10";${"GLOBALS"}["ynbmgbzjdcy"]="cod5";${"GLOBALS"}["limekwohmh"]="price5t";${"GLOBALS"}["hlguib"]="cod4";${"GLOBALS"}["bogzdiuw"]="xml_invoices_datibeni_riep";${"GLOBALS"}["fidvkdjni"]="ship22";${"GLOBALS"}["jmfshbduyrh"]="ship";${"GLOBALS"}["xahlllqu"]="cod22";${"GLOBALS"}["dafynerkyxvn"]="cod15";${"GLOBALS"}["kolsweif"]="price15t";${"GLOBALS"}["hnoowlfbt"]="ship5";${"GLOBALS"}["reehehxgl"]="tax_shipping_vat";${"GLOBALS"}["hlwtskbbljm"]="vat5";${"GLOBALS"}["wqmgtdcfe"]="count";${"GLOBALS"}["mpktpyvoh"]="xml_invoices_datibeni_linee";${"GLOBALS"}["oaabotdigik"]="vat15";${"GLOBALS"}["ynaeworqe"]="price0t";${"GLOBALS"}["jmdtopf"]="imponibile";${"GLOBALS"}["zynjnvfst"]="formatted_product_name";${"GLOBALS"}["txxyiuone"]="product_name_tmp";${"GLOBALS"}["ecsljullmr"]="rowtotal";${"GLOBALS"}["fwsgewkkvav"]="tax_vat";${"GLOBALS"}["nqxtbidnj"]="total_tax";${"GLOBALS"}["vhtrxopyoe"]="price_escl_tax";${"GLOBALS"}["wedetds"]="subtotal";${"GLOBALS"}["cmufbme"]="subtotal_ex_tax";${"GLOBALS"}["fhkvcie"]="price_incl_tax";${"GLOBALS"}["perdbmtlm"]="tax_algorithm";${"GLOBALS"}["avtoovm"]="discount_taxincluded";${"GLOBALS"}["mbvjvurve"]="taxcustomer";${"GLOBALS"}["ypocgfcagxln"]="discount";${"GLOBALS"}["yevpykxlvom"]="custom_discount";${"GLOBALS"}["irvmgds"]="product_name";${"GLOBALS"}["ucicpwnjwid"]="item";${"GLOBALS"}["feoyuucs"]="items";${"GLOBALS"}["omolgvcpoqgn"]="tax_amount";${"GLOBALS"}["ggxwfkg"]="price4t";${"GLOBALS"}["yxhhhittkx"]="vat4";${"GLOBALS"}["nxcziqlwt"]="price10t";${"GLOBALS"}["nawqbtx"]="vat10";${"GLOBALS"}["gfjghplgyhw"]="price22t";${"GLOBALS"}["mrbhsfarwc"]="vat22";${"GLOBALS"}["pwhqnwfproj"]="tax_cod_vat";${"GLOBALS"}["wiovhzb"]="cod";${"GLOBALS"}["gtcwvqvad"]="tax_code";${"GLOBALS"}["ydvjmtx"]="shipping_exclude_tax";${"GLOBALS"}["oslypfmcuh"]="shipping_tax";${"GLOBALS"}["lmzeqrojbpgo"]="xml_invoices_datibeni";${"GLOBALS"}["ymjfsdesnco"]="xml_invoices_datigen_ordine";${"GLOBALS"}["yfycnf"]="xml_invoices_datigen_doc_bollo";${"GLOBALS"}["zgwihyopfkg"]="grand_total_formatted";${"GLOBALS"}["xtwxdffb"]="xml_invoices_body";${"GLOBALS"}["ibdpfrwb"]="xml_invoices_sede2";${"GLOBALS"}["yynlrtnpvft"]="invoice_user_cf";${"GLOBALS"}["vstkfirelsd"]="customerId";${"GLOBALS"}["vecwiwdnwp"]="xmlidfiscale";${"GLOBALS"}["rfapccflbcdn"]="eu_countries";${"GLOBALS"}["qyjiyuj"]="nazione";${"GLOBALS"}["loisspjxycnu"]="cap";${"GLOBALS"}["guvywgbqmkd"]="indirizzo";${"GLOBALS"}["ecfoklnavw"]="xml_invoices_sede";${"GLOBALS"}["gxsjfvezqd"]="xml_invoices_ana";${"GLOBALS"}["sxdsfrvmd"]="id_codice";${"GLOBALS"}["xgprwq"]="xml_invoices_iva";${"GLOBALS"}["ppcpfiwquhe"]="invoice_user_country";${"GLOBALS"}["ciligcum"]="cap_liv_camp";${"GLOBALS"}["jdiqvtxxds"]="invoice_id";${"GLOBALS"}["uoukkbqfgms"]="xml_invoices";${"GLOBALS"}["dxkfhv"]="denominazione";${"GLOBALS"}["khnpbnoykdh"]="invoice_user_zip";${"GLOBALS"}["clwirkbijh"]="invoice_user_via";${"GLOBALS"}["khitdoztjoo"]="invoice_user_fn";${"GLOBALS"}["xjrykqjvn"]="invoice_user_pec";${"GLOBALS"}["ijshaos"]="invoice_user_cod_dest";${"GLOBALS"}["ibhbdbyhpb"]="vat_id";${"GLOBALS"}["yhxptiurxcd"]="invoice_user_region";${"GLOBALS"}["pxbcmjvp"]="connection";${"GLOBALS"}["mohsbkipre"]="invoice_user_address";${"GLOBALS"}["resleqemd"]="regionId";${"GLOBALS"}["rjwiejfqxv"]="invoice_num";${"GLOBALS"}["kbqcpcsnihi"]="em_cf";${"GLOBALS"}["cbbqry"]="sdi";${"GLOBALS"}["hhjkgvbffwkx"]="pec";${"GLOBALS"}["zrkxgpvnugl"]="causale";${"GLOBALS"}["ggwtmt"]="num_fatt";${"GLOBALS"}["idjbrlejyle"]="use_num_fatt";${"GLOBALS"}["jskxgfip"]="esigibilitaiva";${"GLOBALS"}["tchxbrfhx"]="id_paese_trasm";${"GLOBALS"}["jirnlqp"]="prov";${"GLOBALS"}["yixsuzopctu"]="comune";${"GLOBALS"}["roitvyn"]="reg_fisc";${"GLOBALS"}["ursyvhobb"]="azienda";${"GLOBALS"}["xczbbig"]="id_paese";${"GLOBALS"}["mgksgwgdy"]="id_codice_trasm";${"GLOBALS"}["okrfspgffg"]="bollo";${"GLOBALS"}["dxflslmujx"]="objectManager";${"GLOBALS"}["hhhxbumcuhrx"]="type";${"GLOBALS"}["reuisywpr"]="xml_att";${"GLOBALS"}["qoiszgumkkjj"]="mailto";${"GLOBALS"}["tldfvtfj"]="xml_attachments";${"GLOBALS"}["rmzyfmeyqcb"]="i";${"GLOBALS"}["eilggcg"]="invoices";${"GLOBALS"}["pegotecvao"]="mailfrom";${"GLOBALS"}["npucyuljq"]="invoice";${"GLOBALS"}["erjblyho"]="mail";${"GLOBALS"}["gtmjfjgiilw"]="sitename";${"GLOBALS"}["eloucv"]="store_id";${"GLOBALS"}["fvcbbtotdn"]="mailtobcc";${"GLOBALS"}["vdlxrpp"]="send_to_customer";${"GLOBALS"}["zhcpqnmto"]="order";${"GLOBALS"}["mephsff"]="archivia_fatt";${"GLOBALS"}["reoptick"]="file2";${"GLOBALS"}["rdeexogjoh"]="dir";${"GLOBALS"}["tlzpjzdnnku"]="download";${"GLOBALS"}["wrntolt"]="f";${"GLOBALS"}["tvrvtljw"]="filename";${"GLOBALS"}["hnhggktgyv"]="file";${"GLOBALS"}["mgmpshh"]="as_binary";${"GLOBALS"}["gwdolco"]="calcmac";${"GLOBALS"}["mjylith"]="options";${"GLOBALS"}["vzockezydl"]="original_plaintext";${"GLOBALS"}["uxxwxnmkjxa"]="ciphertext_raw";${"GLOBALS"}["uviupsvsyhmd"]="sha2len";${"GLOBALS"}["tuuvfi"]="c";${"GLOBALS"}["dutfijvee"]="iv";${"GLOBALS"}["abnmdzp"]="cipher";${"GLOBALS"}["hmvsth"]="ivlen";${"GLOBALS"}["aoerucipnv"]="ciphertext";${"GLOBALS"}["tqnuxkp"]="key";${"GLOBALS"}["xeneloky"]="directoryList";${"GLOBALS"}["zboboqvyyvx"]="io";${"GLOBALS"}["lhyrsjkgtww"]="messageManager";${"GLOBALS"}["mglwpufnooc"]="enc";${"GLOBALS"}["gohbgcxykdim"]="moduleManager";${"GLOBALS"}["xkypiuwgk"]="scopeConfig";${"GLOBALS"}["iryclcmbd"]="resource";use Magento\Framework\Model\AbstractModel;use Magento\Sales\Api\InvoiceRepositoryInterface;class Download extends AbstractModel{protected$helper;protected$invoiceRepository;protected$resource;protected$scopeConfig;protected$moduleManager;protected$enc;protected$messageManager;protected$io;protected$directoryList;protected$request;public function __construct(InvoiceRepositoryInterface$invoiceRepository,\EspertoMagent\FattEleIt\Helper\Data$helper,\Magento\Framework\App\ResourceConnection$resource,\Magento\Framework\App\Config\ScopeConfigInterface$scopeConfig,\Magento\Framework\Module\Manager$moduleManager,\Magento\Framework\Encryption\EncryptorInterface$enc,\Magento\Framework\Message\ManagerInterface$messageManager,\Magento\Framework\Filesystem\Io\File$io,\Magento\Framework\App\Filesystem\DirectoryList$directoryList,\Magento\Backend\App\Action\Context$context){${"GLOBALS"}["kcmqevqcolf"]="invoiceRepository";${"GLOBALS"}["nfpjqqsgjro"]="helper";$this->helper=${${"GLOBALS"}["nfpjqqsgjro"]};$this->invoiceRepository=${${"GLOBALS"}["kcmqevqcolf"]};$this->_resource=${${"GLOBALS"}["iryclcmbd"]};$this->_scopeConfig=${${"GLOBALS"}["xkypiuwgk"]};$this->moduleManager=${${"GLOBALS"}["gohbgcxykdim"]};$this->_enc=${${"GLOBALS"}["mglwpufnooc"]};$this->messageManager=${${"GLOBALS"}["lhyrsjkgtww"]};$this->io=${${"GLOBALS"}["zboboqvyyvx"]};$this->directoryList=${${"GLOBALS"}["xeneloky"]};$this->request=$context->getRequest();}protected function _getType(){$mfsrahnyumt="type";if($this->request->getParam("namespace")=="sales_order_creditmemo_grid"||$this->request->getParam("creditmemo_id")!=""){$euukjcqbvek="type";${$euukjcqbvek}="creditmemo";}else{${"GLOBALS"}["wekbscx"]="type";${${"GLOBALS"}["wekbscx"]}="invoice";}return${$mfsrahnyumt};}protected function decryptIt($ciphertext){$yfpwivvngpd="ciphertext";if(${$yfpwivvngpd}!=""){$tacmcdg="ivlen";${"GLOBALS"}["bmyornkiii"]="key";${${"GLOBALS"}["tqnuxkp"]}="qJB0rGtIn5UB1xG03efyCp";${"GLOBALS"}["kboyukhmovf"]="hmac";${"GLOBALS"}["xqsknppboeub"]="hmac";${"GLOBALS"}["lshstp"]="c";${"GLOBALS"}["qcifsw"]="c";${${"GLOBALS"}["lshstp"]}=base64_decode(${${"GLOBALS"}["aoerucipnv"]});${${"GLOBALS"}["hmvsth"]}=openssl_cipher_iv_length(${${"GLOBALS"}["abnmdzp"]}="AES-128-CBC");${${"GLOBALS"}["dutfijvee"]}=substr(${${"GLOBALS"}["tuuvfi"]},0,${${"GLOBALS"}["hmvsth"]});${"GLOBALS"}["epenjuwkssj"]="ciphertext_raw";${${"GLOBALS"}["xqsknppboeub"]}=substr(${${"GLOBALS"}["qcifsw"]},${${"GLOBALS"}["hmvsth"]},${${"GLOBALS"}["uviupsvsyhmd"]}=32);$lrsahrjqunh="ciphertext_raw";${${"GLOBALS"}["uxxwxnmkjxa"]}=substr(${${"GLOBALS"}["tuuvfi"]},${$tacmcdg}+${${"GLOBALS"}["uviupsvsyhmd"]});${"GLOBALS"}["lnvxmcwjsku"]="key";${${"GLOBALS"}["vzockezydl"]}=openssl_decrypt(${${"GLOBALS"}["epenjuwkssj"]},${${"GLOBALS"}["abnmdzp"]},${${"GLOBALS"}["bmyornkiii"]},${${"GLOBALS"}["mjylith"]}=OPENSSL_RAW_DATA,${${"GLOBALS"}["dutfijvee"]});${${"GLOBALS"}["gwdolco"]}=hash_hmac("sha256",${$lrsahrjqunh},${${"GLOBALS"}["lnvxmcwjsku"]},${${"GLOBALS"}["mgmpshh"]}=true);if(hash_equals(${${"GLOBALS"}["kboyukhmovf"]},${${"GLOBALS"}["gwdolco"]})){return${${"GLOBALS"}["vzockezydl"]};}}else return"";}public function getXmlDir(){return$this->directoryList->getPath("var")."/em_invoices/";}public function compressZip($file,$download=true){if(extension_loaded("zip")){${"GLOBALS"}["oltvat"]="filename";$mgygiskfzl="zip";${$mgygiskfzl}=new \ZipArchive;sort(${${"GLOBALS"}["hnhggktgyv"]});${${"GLOBALS"}["tvrvtljw"]}=str_replace(".xml","",${${"GLOBALS"}["hnhggktgyv"]}[0]).".zip";if($zip->open(${${"GLOBALS"}["oltvat"]},\ZipArchive::CREATE)===true){$ykjgoy="f";foreach(${${"GLOBALS"}["hnhggktgyv"]} as${$ykjgoy}){$dlqcbimzl="f";$zip->addFile(${${"GLOBALS"}["wrntolt"]},basename(${$dlqcbimzl}));}$ugnnpoxcvkn="file";${"GLOBALS"}["ubpcvng"]="f";$zip->close();foreach(${$ugnnpoxcvkn} as${${"GLOBALS"}["ubpcvng"]}){$jismyzg="f";if(file_exists(${$jismyzg})){unlink(${${"GLOBALS"}["wrntolt"]});}}if(${${"GLOBALS"}["tlzpjzdnnku"]}){$gmfmgexh="filename";return$this->downloadFile(${$gmfmgexh});}else{return${${"GLOBALS"}["tvrvtljw"]};}}else{$this->messageManager->addError(__("Error: cannot create ZIP Archive."));}}else{$this->messageManager->addError(__("PHP ZIP extension not loaded!"));}}public function downloadFile($file){${"GLOBALS"}["jlfjyqapop"]="dir";${"GLOBALS"}["nodykb"]="archivia_fatt";${"GLOBALS"}["ceqeihoeilq"]="file";$uhtrsbpwmr="download_rate";${"GLOBALS"}["cfelqishb"]="dir";${${"GLOBALS"}["jlfjyqapop"]}=$this->getXmlDir();${${"GLOBALS"}["hnhggktgyv"]}=${${"GLOBALS"}["cfelqishb"]}.str_replace(${${"GLOBALS"}["rdeexogjoh"]},"",${${"GLOBALS"}["ceqeihoeilq"]});${${"GLOBALS"}["hnhggktgyv"]}=strval(str_replace("","",${${"GLOBALS"}["hnhggktgyv"]}));${$uhtrsbpwmr}=20.5;${${"GLOBALS"}["nodykb"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/archivia_fattura");if(file_exists(${${"GLOBALS"}["hnhggktgyv"]})&&is_file(${${"GLOBALS"}["hnhggktgyv"]})){header("Content-Type: application/octet-stream");${"GLOBALS"}["bcsrins"]="file";$gmtruope="file2";$ykqjyfdg="file";$xefnyedjhfnj="file";${"GLOBALS"}["siucukerbxfp"]="file2";header("Content-Length: ".filesize(${$ykqjyfdg}));header("Content-Disposition: attachment; filename=".basename(${$xefnyedjhfnj}));header("Content-Transfer-Encoding: binary");${"GLOBALS"}["upmubsrn"]="file2";if(ob_get_length() > 0){ob_end_clean();}flush();${$gmtruope}=fopen(${${"GLOBALS"}["bcsrins"]},"r");while(!feof(${${"GLOBALS"}["upmubsrn"]})){$veepjylpklhk="download_rate";print_r(fread(${${"GLOBALS"}["reoptick"]},round(${$veepjylpklhk}*1024)));flush();}fclose(${${"GLOBALS"}["siucukerbxfp"]});if($this->helper->getEmFattEleItInfo("em_send_email")){${"GLOBALS"}["eqkgggjy"]="mail";${${"GLOBALS"}["eqkgggjy"]}=new \PHPMailer\PHPMailer\PHPMailer();$mail->SMTPDebug="2";${"GLOBALS"}["vvxcte"]="file";if($this->helper->getEmFattEleItInfo("em_use_smtp")){$mail->isSMTP();$mail->Host=$this->helper->getEmFattEleItInfo("em_mail_smtp_host");$mail->SMTPAuth=true;$mail->Username=$this->helper->getEmFattEleItInfo("em_mail_smtp_user");$mail->Password=$this->_enc->decrypt($this->helper->getEmFattEleItInfo("em_mail_smtp_psw"));$mail->SMTPSecure=$this->helper->getEmFattEleItInfo("em_mail_smtp_ssl");$mail->Port=$this->helper->getEmFattEleItInfo("em_mail_smtp_port");}else{$mail->isMail();}$mail->setFrom($this->helper->getEmFattEleItInfo("em_mail_from"));$mail->addAddress($this->helper->getEmFattEleItInfo("em_mail_to"));$mail->addAttachment(${${"GLOBALS"}["hnhggktgyv"]});$mail->isHTML(true);$mail->Subject="fattura elettronica nr. ".str_replace(".xml","",basename(${${"GLOBALS"}["hnhggktgyv"]}));$mail->Body=__("Salve,<br>in allegato la fattura elettronica nr. %1.<br><br>Saluti,<br><br>",str_replace(".xml","",basename(${${"GLOBALS"}["vvxcte"]})));$mail->AltBody=__("Salve, in allegato le fattura elettronica nr. %1",str_replace(".xml","",basename(${${"GLOBALS"}["hnhggktgyv"]})));try{$mail->send();}catch(Exception$e){$this->messageManager->addError(__("Message could not be sent. Mailer Error: {$mail->ErrorInfo}"));}}}else{$this->messageManager->addError(__("Error: The file ".${${"GLOBALS"}["hnhggktgyv"]}." does not exist!"));}if(!${${"GLOBALS"}["mephsff"]}){$mlcgfyft="file";unlink(${$mlcgfyft});}}public function sendFile($file,$invoice=null){$sdyiektr="objectManager";${$sdyiektr}=\Magento\Framework\App\ObjectManager::getInstance();${"GLOBALS"}["kijzecooph"]="store_id";$wjjpwki="store_id";$nnlpifkos="file";${"GLOBALS"}["utzgmvh"]="dir";${${"GLOBALS"}["zhcpqnmto"]}=$objectManager->create("Magento\Sales\Model\Order")->load($invoice->getData("order_id"));${${"GLOBALS"}["kijzecooph"]}=$order->getStoreId();$fikpab="file";$xnhqbctkat="mailfrom";${"GLOBALS"}["xqgqsfqsb"]="file";$fczptpnxwmtt="dir";${${"GLOBALS"}["utzgmvh"]}=$this->getXmlDir();${$fikpab}=${${"GLOBALS"}["rdeexogjoh"]}.str_replace(${$fczptpnxwmtt},"",${$nnlpifkos});${${"GLOBALS"}["xqgqsfqsb"]}=strval(str_replace("","",${${"GLOBALS"}["hnhggktgyv"]}));${${"GLOBALS"}["mephsff"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/archivia_fattura");${${"GLOBALS"}["vdlxrpp"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/em_send_email_customer");${$xnhqbctkat}=$this->helper->getEmFattEleItInfo("em_mail_from",${$wjjpwki});${${"GLOBALS"}["fvcbbtotdn"]}=$this->helper->getEmFattEleItInfo("em_mail_to",${${"GLOBALS"}["eloucv"]});${${"GLOBALS"}["gtmjfjgiilw"]}=$this->_scopeConfig->getValue("general/store_information/name",\Magento\Store\Model\ScopeInterface::SCOPE_STORE);if($this->helper->getEmFattEleItInfo("em_send_email",${${"GLOBALS"}["eloucv"]})){${"GLOBALS"}["vyycnkba"]="mailtobcc";if(${${"GLOBALS"}["fvcbbtotdn"]}!=""&&filter_var(${${"GLOBALS"}["vyycnkba"]},FILTER_VALIDATE_EMAIL)){${"GLOBALS"}["vupvpjgmudyu"]="file";if(file_exists(${${"GLOBALS"}["vupvpjgmudyu"]})&&is_file(${${"GLOBALS"}["hnhggktgyv"]})){${${"GLOBALS"}["erjblyho"]}=new \PHPMailer\PHPMailer\PHPMailer();${"GLOBALS"}["ltxxeqhul"]="store_id";$mail->SMTPDebug="2";$yzdjwitj="mailfrom";${"GLOBALS"}["kcnrrmit"]="archivia_fatt";if($this->helper->getEmFattEleItInfo("em_use_smtp",${${"GLOBALS"}["ltxxeqhul"]})){$sapuyilbi="store_id";$mail->isSMTP();$bxbuhgldx="store_id";$mail->Host=$this->helper->getEmFattEleItInfo("em_mail_smtp_host",${$sapuyilbi});$mail->SMTPAuth=true;$vodgysmgjw="store_id";$mail->Username=$this->helper->getEmFattEleItInfo("em_mail_smtp_user",${$bxbuhgldx});$mail->Password=$this->_enc->decrypt($this->helper->getEmFattEleItInfo("em_mail_smtp_psw",${$vodgysmgjw}));$mail->SMTPSecure=$this->helper->getEmFattEleItInfo("em_mail_smtp_ssl",${${"GLOBALS"}["eloucv"]});$mail->Port=$this->helper->getEmFattEleItInfo("em_mail_smtp_port",${${"GLOBALS"}["eloucv"]});}else{$mail->isMail();}${"GLOBALS"}["bhvxnfj"]="sitename";$mail->setFrom(${$yzdjwitj});$mail->addAttachment(${${"GLOBALS"}["hnhggktgyv"]});$mail->isHTML(true);$ojecixkywur="file";$mail->Subject=${${"GLOBALS"}["bhvxnfj"]}.__(": Xml Invoice nr. %1",str_replace(".xml","",basename(${${"GLOBALS"}["hnhggktgyv"]})));$nfqjrnqkx="file";$mail->Body=__("Hi,<br>your xml invoice nr. %1 is attached.<br><br>Greetings,<br><br>",str_replace(".xml","",basename(${$ojecixkywur})));$mail->AltBody=__("Hi, your xml invoice nr. %1 is attached.",str_replace(".xml","",basename(${$nfqjrnqkx})));try{if(${${"GLOBALS"}["vdlxrpp"]}){$cimybkpkbex="mailto";if(${${"GLOBALS"}["npucyuljq"]}){$burmhwyhazr="mailto";${$burmhwyhazr}=$invoice->getOrder()->getCustomerEmail();}else{$this->messageManager->addError(__("".$this->_getType()." does not exist."));return;}$mail->addAddress(${$cimybkpkbex});$mail->send();$mail->ClearAddresses();$mail->addAddress(${${"GLOBALS"}["fvcbbtotdn"]});$mail->send();}else{${"GLOBALS"}["egiqdmns"]="mailtobcc";$mail->addAddress(${${"GLOBALS"}["egiqdmns"]});$mail->send();}$this->messageManager->addSuccess(__("Invoice has been mailed successfully."));}catch(Exception$e){$this->messageManager->addError(__("Message could not be sent. Mailer Error: {$mail->ErrorInfo}"));}if(!${${"GLOBALS"}["kcnrrmit"]}){${"GLOBALS"}["ofyyfwdxuy"]="file";unlink(${${"GLOBALS"}["ofyyfwdxuy"]});}}else{$this->messageManager->addError(__("Error: The file ".${${"GLOBALS"}["hnhggktgyv"]}." does not exist!"));}}else{$this->messageManager->addError(__("Recipient e-mail is empty or not valid"));}}else{$this->messageManager->addError(__("E-mail sending is not enabled"));}}public function sendMassFile($file,$invoices=null){$ccmgozs="file";$qgvxcb="file";$qsgpiai="dir";$nwdzsmezqf="file";${${"GLOBALS"}["hnhggktgyv"]}=$this->compressZip(${${"GLOBALS"}["hnhggktgyv"]},false);${$qsgpiai}=$this->getXmlDir();${"GLOBALS"}["nvxnybvdjm"]="dir";${"GLOBALS"}["ocedlvp"]="store_id";${$qgvxcb}=${${"GLOBALS"}["rdeexogjoh"]}.str_replace(${${"GLOBALS"}["nvxnybvdjm"]},"",${$nwdzsmezqf});${${"GLOBALS"}["ocedlvp"]}=1;${"GLOBALS"}["hcmuunvskuwm"]="send_to_customer";${${"GLOBALS"}["hnhggktgyv"]}=strval(str_replace("","",${$ccmgozs}));${"GLOBALS"}["gqsbljtior"]="mailtobcc";$apmysebduu="sitename";${${"GLOBALS"}["mephsff"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/archivia_fattura");${${"GLOBALS"}["hcmuunvskuwm"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/em_send_email_customer");${${"GLOBALS"}["pegotecvao"]}=$this->helper->getEmFattEleItInfo("em_mail_from");${${"GLOBALS"}["gqsbljtior"]}=$this->helper->getEmFattEleItInfo("em_mail_to");${$apmysebduu}=$this->_scopeConfig->getValue("general/store_information/name",\Magento\Store\Model\ScopeInterface::SCOPE_STORE);if($this->helper->getEmFattEleItInfo("em_send_email")){${"GLOBALS"}["yrslrcpunntk"]="mailtobcc";if(${${"GLOBALS"}["fvcbbtotdn"]}!=""&&filter_var(${${"GLOBALS"}["yrslrcpunntk"]},FILTER_VALIDATE_EMAIL)){${"GLOBALS"}["wswwjfp"]="file";if(file_exists(${${"GLOBALS"}["hnhggktgyv"]})&&is_file(${${"GLOBALS"}["wswwjfp"]})){${"GLOBALS"}["gyglmabjt"]="mailfrom";${${"GLOBALS"}["erjblyho"]}=new \PHPMailer\PHPMailer\PHPMailer();${"GLOBALS"}["xiqxjnue"]="mail";$mail->SMTPDebug="2";${"GLOBALS"}["ispdvmlelp"]="mailto";if($this->helper->getEmFattEleItInfo("em_use_smtp")){$mail->isSMTP();$mail->Host=$this->helper->getEmFattEleItInfo("em_mail_smtp_host");$mail->SMTPAuth=true;$mail->Username=$this->helper->getEmFattEleItInfo("em_mail_smtp_user");$mail->Password=$this->_enc->decrypt($this->helper->getEmFattEleItInfo("em_mail_smtp_psw"));$mail->SMTPSecure=$this->helper->getEmFattEleItInfo("em_mail_smtp_ssl");$mail->Port=$this->helper->getEmFattEleItInfo("em_mail_smtp_port");}else{$mail->isMail();}$mail->setFrom(${${"GLOBALS"}["gyglmabjt"]});${${"GLOBALS"}["ispdvmlelp"]}=[];if(${${"GLOBALS"}["eilggcg"]}){$vdrzrjgo="invoice";foreach(${${"GLOBALS"}["eilggcg"]} as${$vdrzrjgo}){$ssdvdzsjx="xml_attachments";$pdzksn="dir";$iyvrru="send_to_customer";${$ssdvdzsjx}[]=${$pdzksn}.$this->createXml(${${"GLOBALS"}["npucyuljq"]});if(${$iyvrru}){${"GLOBALS"}["oynwrtmjgv"]="mailto";${${"GLOBALS"}["oynwrtmjgv"]}[]=$invoice->getOrder()->getCustomerEmail();}}}else{$this->messageManager->addError(__("".$this->_getType()." does not exist."));return;}$mail->isHTML(true);$hotwohwops="send_to_customer";${"GLOBALS"}["mqcvykp"]="archivia_fatt";$grhrie="mail2";if(${${"GLOBALS"}["vdlxrpp"]}){$mail->Subject=${${"GLOBALS"}["gtmjfjgiilw"]}.__(": Xml Invoice");$mail->Body=__("Hi,<br>your xml invoice is attached.<br><br>Greetings,<br><br>");$mail->AltBody=__("Hi, your xml invoice is attached. Greetings");}else{${"GLOBALS"}["rmnsnhgd"]="sitename";$mail->Subject=${${"GLOBALS"}["rmnsnhgd"]}.__(": Xml Invoice nr. %1",str_replace(".xml","",basename(${${"GLOBALS"}["hnhggktgyv"]})));${"GLOBALS"}["enwlzewyo"]="file";$mail->Body=__("Hi,<br>your xml invoices: %1 are attached.<br><br>Greetings,<br><br>",str_replace(".xml","",basename(${${"GLOBALS"}["hnhggktgyv"]})));$mail->AltBody=__("Hi, your xml invoices: %1 are attached.",str_replace(".xml","",basename(${${"GLOBALS"}["enwlzewyo"]})));}${$grhrie}=${${"GLOBALS"}["xiqxjnue"]};${${"GLOBALS"}["rmzyfmeyqcb"]}=0;if(${$hotwohwops}){${"GLOBALS"}["mnmfntg"]="xml_att";foreach(${${"GLOBALS"}["tldfvtfj"]} as${${"GLOBALS"}["mnmfntg"]}){${"GLOBALS"}["gunrkbqciw"]="xml_att";if(file_exists(${${"GLOBALS"}["gunrkbqciw"]})){$ngfvsyejlv="xml_att";$mail->ClearAttachments();$mail->addAttachment(${$ngfvsyejlv});}try{${"GLOBALS"}["mcbiihcsxarq"]="mailto";$dnjhxeig="i";if(${${"GLOBALS"}["qoiszgumkkjj"]}[${$dnjhxeig}]!=""&&filter_var(${${"GLOBALS"}["mcbiihcsxarq"]}[${${"GLOBALS"}["rmzyfmeyqcb"]}],FILTER_VALIDATE_EMAIL)){${"GLOBALS"}["orwveugxxw"]="i";$mail->ClearAddresses();$dpsyhhbx="mailto";$mail->addAddress(${$dpsyhhbx}[${${"GLOBALS"}["orwveugxxw"]}]);$mail->send();$this->messageManager->addSuccess(__("Invoices to customer %1 has been mailed successfully.",${${"GLOBALS"}["qoiszgumkkjj"]}[${${"GLOBALS"}["rmzyfmeyqcb"]}]));}else{$this->messageManager->addError(__("Recipient e-mail %1 is empty or not valid"));}${${"GLOBALS"}["rmzyfmeyqcb"]}++;}catch(Exception$e){$this->messageManager->addError(__("Message could not be sent. Mailer Error: {$mail->ErrorInfo}"));}}if(file_exists(${${"GLOBALS"}["hnhggktgyv"]})){$mail2->ClearAttachments();$mail2->addAttachment(${${"GLOBALS"}["hnhggktgyv"]});try{$mail2->ClearAddresses();$bdgvuhzcrm="mailtobcc";$ezkblclxf="mailtobcc";$mail2->addAddress(${$ezkblclxf});$mail2->send();$this->messageManager->addSuccess(__("Invoices to %1 has been mailed successfully.",${$bdgvuhzcrm}));}catch(Exception$e){$this->messageManager->addError(__("Message could not be sent. Mailer Error: {$mail2->ErrorInfo}"));}}}else{try{$bxhpwyosij="mailtobcc";$mail->ClearAttachments();$lbwpiimexfs="file";$mail->addAttachment(${$lbwpiimexfs});$mail->ClearAddresses();$mail->addAddress(${${"GLOBALS"}["fvcbbtotdn"]});$mail->send();$this->messageManager->addSuccess(__("Invoices to %1 has been mailed successfully.",${$bxhpwyosij}));}catch(Exception$e){$this->messageManager->addError(__("Message could not be sent. Mailer Error: {$mail->ErrorInfo}"));}}if(!${${"GLOBALS"}["mqcvykp"]}){${"GLOBALS"}["kaquqi"]="file";$whjyrixdf="xml_attachments";unlink(${${"GLOBALS"}["kaquqi"]});foreach(${$whjyrixdf} as${${"GLOBALS"}["reuisywpr"]}){$kmdwnwbyzy="xml_att";unlink(${$kmdwnwbyzy});}}}else{$blpjqsmc="file";$this->messageManager->addError(__("Error: The file ".${$blpjqsmc}." does not exist!"));}}else{$this->messageManager->addError(__("Recipient e-mail is empty or not valid"));}}else{$this->messageManager->addError(__("E-mail sending is not enabled"));}}public function createXml($invoice){if($this->decryptIt($this->helper->getEmFattEleItInfo("em_license_key"))==str_replace("www.","",$_SERVER["SERVER_NAME"])||$_SERVER["SERVER_ADDR"]=="127.0.0.1"||$_SERVER["SERVER_ADDR"]=="::1"){$otqbwurh="table";${"GLOBALS"}["dcrxulvojg"]="store_id";$orvvxhkiue="invoice_user_address";$oeumqhr="dir";${"GLOBALS"}["ksrmkhzla"]="table";${"GLOBALS"}["nluyhkf"]="indirizzo";${"GLOBALS"}["hvnzdorvdpc"]="items";${"GLOBALS"}["ktcjqml"]="shipping_exclude_tax";$ogpnhcfwh="dir";$tgxqtuspnkx="invoice_id";$ypkyfpv="invoice_user_piva";${"GLOBALS"}["kedyns"]="causale";$ubbrhbzm="store_id";$iiodglc="store_id";${${"GLOBALS"}["hhhxbumcuhrx"]}=$this->_getType();${"GLOBALS"}["gnwvqqvb"]="xml_invoices_header";${"GLOBALS"}["feheoq"]="store_id";$ecutwfc="prov";${"GLOBALS"}["odjyxuxghf"]="id_paese_trasm";${"GLOBALS"}["kvqaarflljc"]="nazione";$dfsiygyyy="store_id";${${"GLOBALS"}["dxflslmujx"]}=\Magento\Framework\App\ObjectManager::getInstance();$kyblnupq="price0t";${"GLOBALS"}["vcvrtxayx"]="store_id";${"GLOBALS"}["pbnzyoojutv"]="natura";${"GLOBALS"}["fsnbpxzzlo"]="regionId";${"GLOBALS"}["eoteexnnx"]="store_id";${${"GLOBALS"}["zhcpqnmto"]}=$objectManager->create("Magento\Sales\Model\Order")->load($invoice->getData("order_id"));${"GLOBALS"}["zwwoycttd"]="vat15";${"GLOBALS"}["uoyolvfih"]="invoice_user_address";${"GLOBALS"}["byezvyz"]="vat15";$lnqditzmvtb="store_id";$rsdqknz="comune";$xxwxowuyt="causale";$jryesvutku="invoice_user_cod_dest";${"GLOBALS"}["gnbtttrw"]="store_id";${"GLOBALS"}["qlcwigagsq"]="bollo";$mlkblm="vat22";${"GLOBALS"}["uekgmyqjj"]="invoice_user_address";${${"GLOBALS"}["hvnzdorvdpc"]}=$invoice->getAllItems();${"GLOBALS"}["ihsgrpivvd"]="bollo";${"GLOBALS"}["tmqsrfxrsfn"]="grand_total";${"GLOBALS"}["xrmbpmxmeut"]="invoice_id";${${"GLOBALS"}["uekgmyqjj"]}=$invoice->getBillingAddress();$hkgotomcshty="vat5";${"GLOBALS"}["tucohkjr"]="vat_id";${"GLOBALS"}["fybmrxg"]="customerId";${"GLOBALS"}["eocvixncjit"]="grand_total";${"GLOBALS"}["whxrwrts"]="shipping_exclude_tax";${"GLOBALS"}["yxgixnhkqeee"]="invoice_user_cf";${$tgxqtuspnkx}=$invoice->getId();$rsbehxvpr="store_id";$lzoniwc="store_id";${${"GLOBALS"}["fybmrxg"]}=$order->getCustomerId();${"GLOBALS"}["dfwykji"]="xml_invoices_ana2";${${"GLOBALS"}["vcvrtxayx"]}=$order->getStoreId();$yyhtyrdqylwe="num_fatt";${"GLOBALS"}["msouckvd"]="xml_invoices_datigen";${${"GLOBALS"}["ihsgrpivvd"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici/BolloFattura",${$dfsiygyyy});${"GLOBALS"}["uhvblqrsyqw"]="id_codice";if(${${"GLOBALS"}["okrfspgffg"]}){${"GLOBALS"}["wfkdnmmsucc"]="bollo_importo";${${"GLOBALS"}["wfkdnmmsucc"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici/ImportoBollo",${${"GLOBALS"}["eloucv"]});}${"GLOBALS"}["fvfevbyljd"]="store_id";${${"GLOBALS"}["odjyxuxghf"]}=$this->helper->getConfigValue("efatt/DatiTrasmissione_IdTrasmittente/IdPaese",${${"GLOBALS"}["eoteexnnx"]});${"GLOBALS"}["aqiukenjgetb"]="cap";${"GLOBALS"}["xbxdlqqtbqas"]="invoice_user_piva";${${"GLOBALS"}["mgksgwgdy"]}=$this->helper->getConfigValue("efatt/DatiTrasmissione_IdTrasmittente/IdCodice",${${"GLOBALS"}["eloucv"]});${${"GLOBALS"}["xczbbig"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici_IdFiscaleIVA/IdPaese",${$lnqditzmvtb});${${"GLOBALS"}["uhvblqrsyqw"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici_IdFiscaleIVA/IdCodice",${${"GLOBALS"}["fvfevbyljd"]});${"GLOBALS"}["yzqfiyyf"]="xml_invoices_datiana2";${"GLOBALS"}["xrjbkd"]="xml_invoices_datiana";${${"GLOBALS"}["ursyvhobb"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici_Anagrafica/Denominazione",${${"GLOBALS"}["eloucv"]});${${"GLOBALS"}["roitvyn"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici/RegimeFiscale",${${"GLOBALS"}["gnbtttrw"]});${${"GLOBALS"}["nluyhkf"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_Sede/Indirizzo",${${"GLOBALS"}["eloucv"]});${"GLOBALS"}["tprnhlv"]="xml_invoices_id_trasm";${${"GLOBALS"}["aqiukenjgetb"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_Sede/CAP",${${"GLOBALS"}["eloucv"]});${${"GLOBALS"}["yixsuzopctu"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_Sede/Comune",${$rsbehxvpr});${${"GLOBALS"}["jirnlqp"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_Sede/Provincia",${${"GLOBALS"}["eloucv"]});${${"GLOBALS"}["kvqaarflljc"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_Sede/Nazione",${${"GLOBALS"}["dcrxulvojg"]});${${"GLOBALS"}["tvrvtljw"]}=${${"GLOBALS"}["tchxbrfhx"]}.${${"GLOBALS"}["mgksgwgdy"]}."_".sprintf("%05d",${${"GLOBALS"}["xrmbpmxmeut"]}).".xml";${${"GLOBALS"}["jskxgfip"]}=$this->helper->getConfigValue("efatt/CedentePrestatore_DatiAnagrafici_IdFiscaleIVA/EsigibilitaIva",${${"GLOBALS"}["feheoq"]});${${"GLOBALS"}["mephsff"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/archivia_fattura",${$ubbrhbzm});${${"GLOBALS"}["idjbrlejyle"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/usa_numero_fattura",${$iiodglc});$grdjktsqcjkn="query";${"GLOBALS"}["jszqcyrbp"]="query";${${"GLOBALS"}["ggwtmt"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/numero_fattura",${$lzoniwc});$hjopbehx="use_num_fatt";${"GLOBALS"}["zerlaepjbm"]="natura";$xfphdzr="xml_invoices_cedente";$wmcuktb="natura";${${"GLOBALS"}["zrkxgpvnugl"]}=$this->helper->getConfigValue("efatt/Configurazione_Generale/causale",${${"GLOBALS"}["eloucv"]})??"";$phsyvnpjf="invoice_user_cf";${${"GLOBALS"}["kedyns"]}=str_replace("[CUSTOMER_EMAIL]",$order->getCustomerEmail(),${$xxwxowuyt});$zbwkzoguv="invoice_user_country";${${"GLOBALS"}["hhjkgvbffwkx"]}=$invoice_user_address->getData("".$this->helper->getEmFattEleItInfo("em_pec")."")??"";${${"GLOBALS"}["cbbqry"]}=$invoice_user_address->getData("".$this->helper->getEmFattEleItInfo("em_sdi")."")??"";${"GLOBALS"}["ahxgyvbqzyg"]="invoice_user_zip";${${"GLOBALS"}["tucohkjr"]}=$invoice_user_address->getData("".$this->helper->getEmFattEleItInfo("vat_id")."")??"";${${"GLOBALS"}["kbqcpcsnihi"]}=$invoice_user_address->getData("".$this->helper->getEmFattEleItInfo("em_cf")."")??"";${"GLOBALS"}["zlryolwcrx"]="invoice_user_ln";if(${$hjopbehx})${${"GLOBALS"}["rjwiejfqxv"]}=trim($invoice->getData("".${$yyhtyrdqylwe}.""));else${${"GLOBALS"}["rjwiejfqxv"]}=$invoice->getIncrementId();${${"GLOBALS"}["resleqemd"]}=${${"GLOBALS"}["mohsbkipre"]}["region_id"];${"GLOBALS"}["tvymlo"]="invoice_user_country";${${"GLOBALS"}["pxbcmjvp"]}=$this->_resource->getConnection();${${"GLOBALS"}["ksrmkhzla"]}=$this->_resource->getTableName("directory_country_region");${$grdjktsqcjkn}="SELECT code FROM ".${$otqbwurh}." WHERE region_id = ".(int)${${"GLOBALS"}["fsnbpxzzlo"]}." LIMIT 1";${"GLOBALS"}["tovmouft"]="xml_invoices_datigen_doc";${${"GLOBALS"}["yhxptiurxcd"]}=$connection->fetchOne(${${"GLOBALS"}["jszqcyrbp"]});$femwpxvki="invoice_id";${${"GLOBALS"}["xbxdlqqtbqas"]}=str_replace("IT","",strtoupper(trim(${${"GLOBALS"}["ibhbdbyhpb"]})));${"GLOBALS"}["gxnsoocwj"]="xml_invoices_datitrasm";${"GLOBALS"}["zpgfqczhr"]="id_paese";if($this->helper->getEmFattEleItInfo("em_cf")!=""){${"GLOBALS"}["mjmhjkoj"]="em_cf";${"GLOBALS"}["vlugwyottpp"]="invoice_user_cf";${${"GLOBALS"}["vlugwyottpp"]}=trim(strtoupper(${${"GLOBALS"}["mjmhjkoj"]}));}else{${"GLOBALS"}["icyeelo"]="invoice_user_cf";${${"GLOBALS"}["icyeelo"]}="";}$rlhcbmkuoyx="invoice_user_city";if($this->helper->getEmFattEleItInfo("em_pec")!=""&&$this->helper->getEmFattEleItInfo("em_sdi")!=""){if($this->helper->getEmFattEleItInfo("em_pec")==$this->helper->getEmFattEleItInfo("em_sdi")){${"GLOBALS"}["vqxsxbbkssy"]="pec";if(strlen(trim(${${"GLOBALS"}["cbbqry"]}))==7){$iibvoialbk="invoice_user_cod_dest";${$iibvoialbk}=trim(${${"GLOBALS"}["cbbqry"]});${"GLOBALS"}["tpwoopuggbh"]="invoice_user_pec";${${"GLOBALS"}["tpwoopuggbh"]}="";}elseif(strlen(trim(${${"GLOBALS"}["vqxsxbbkssy"]}))>7){$pehvfjdtmswr="invoice_user_pec";$dxwokjgeacd="invoice_user_cod_dest";${$pehvfjdtmswr}=trim(${${"GLOBALS"}["hhjkgvbffwkx"]});${$dxwokjgeacd}="";}else{$dzxlgsvu="invoice_user_pec";${${"GLOBALS"}["ijshaos"]}="";${$dzxlgsvu}="";}}else{$igvwzu="sdi";${${"GLOBALS"}["xjrykqjvn"]}=trim(${${"GLOBALS"}["hhjkgvbffwkx"]});${"GLOBALS"}["eszlcfzs"]="invoice_user_cod_dest";${${"GLOBALS"}["eszlcfzs"]}=trim(${$igvwzu});}}${${"GLOBALS"}["khitdoztjoo"]}=${${"GLOBALS"}["mohsbkipre"]}["firstname"];$ymkxxxq="id_paese_trasm";${"GLOBALS"}["tuohyyxkg"]="type";${"GLOBALS"}["vjhxhmmq"]="price5t";${${"GLOBALS"}["zlryolwcrx"]}=${${"GLOBALS"}["mohsbkipre"]}["lastname"];$qxhnayasogeg="count";${$rlhcbmkuoyx}=htmlspecialchars(${$orvvxhkiue}["city"],ENT_XML1|ENT_COMPAT,"UTF-8");${${"GLOBALS"}["clwirkbijh"]}=htmlspecialchars(${${"GLOBALS"}["mohsbkipre"]}["street"],ENT_XML1|ENT_COMPAT,"UTF-8");$jypoflpsnb="ship";${${"GLOBALS"}["khnpbnoykdh"]}=${${"GLOBALS"}["mohsbkipre"]}["postcode"];$gfyxiprc="vat5";${$zbwkzoguv}=${${"GLOBALS"}["mohsbkipre"]}["country_id"];if(${${"GLOBALS"}["uoyolvfih"]}["company"]!=""){${"GLOBALS"}["nlldpy"]="invoice_user_address";${${"GLOBALS"}["dxkfhv"]}=htmlspecialchars(${${"GLOBALS"}["nlldpy"]}["company"],ENT_XML1|ENT_COMPAT,"UTF-8");}else{${"GLOBALS"}["ukioohtn"]="denominazione";$xkerfmq="invoice_user_ln";${${"GLOBALS"}["ukioohtn"]}=htmlspecialchars(${${"GLOBALS"}["khitdoztjoo"]}." ".${$xkerfmq},ENT_XML1|ENT_COMPAT,"UTF-8");}${${"GLOBALS"}["uoukkbqfgms"]}=new \SimpleXMLElement("<ns2:FatturaElettronica xmlns:ns2=\"http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2" versione=\"FPR12" />");${${"GLOBALS"}["gnwvqqvb"]}=$xml_invoices->addChild("FatturaElettronicaHeader",null,"");${${"GLOBALS"}["gxnsoocwj"]}=$xml_invoices_header->addChild("DatiTrasmissione");${${"GLOBALS"}["tprnhlv"]}=$xml_invoices_datitrasm->addChild("IdTrasmittente");$xml_invoices_id_trasm->addChild("IdPaese",${$ymkxxxq});$xml_invoices_id_trasm->addChild("IdCodice",${${"GLOBALS"}["mgksgwgdy"]});$xml_invoices_datitrasm->addChild("ProgressivoInvio",sprintf("%05d",${${"GLOBALS"}["jdiqvtxxds"]}));$xml_invoices_datitrasm->addChild("FormatoTrasmissione","FPR12");$gvpckbwqo="vat10";${${"GLOBALS"}["ciligcum"]}=array("23041","22061");$qivqhxa="invoice_user_city";if(${${"GLOBALS"}["ijshaos"]}==""||${${"GLOBALS"}["ijshaos"]}==NULL){$buqfhk="invoice_user_zip";$tslrsyzeehk="cap_liv_camp";${"GLOBALS"}["tsoxbdretg"]="invoice_user_cod_dest";if(${${"GLOBALS"}["ppcpfiwquhe"]}=="IT"||in_array(${$buqfhk},${$tslrsyzeehk}))${${"GLOBALS"}["ijshaos"]}="0000000";else${${"GLOBALS"}["tsoxbdretg"]}="XXXXXXX";}${"GLOBALS"}["twgchxn"]="price15t";$xml_invoices_datitrasm->addChild("CodiceDestinatario",strtoupper(${$jryesvutku}));$mikjuyqvsg="invoice_user_country";if(${${"GLOBALS"}["xjrykqjvn"]}!=null&&${${"GLOBALS"}["ijshaos"]}=="0000000"){${"GLOBALS"}["uvupufnpaej"]="invoice_user_pec";$xml_invoices_datitrasm->addChild("PECDestinatario",${${"GLOBALS"}["uvupufnpaej"]});}${$xfphdzr}=$xml_invoices_header->addChild("CedentePrestatore");${${"GLOBALS"}["xrjbkd"]}=$xml_invoices_cedente->addChild("DatiAnagrafici");${${"GLOBALS"}["xgprwq"]}=$xml_invoices_datiana->addChild("IdFiscaleIVA");$xml_invoices_iva->addChild("IdPaese",${${"GLOBALS"}["zpgfqczhr"]});$xml_invoices_iva->addChild("IdCodice",${${"GLOBALS"}["sxdsfrvmd"]});${"GLOBALS"}["mbmmhivui"]="vat10";${${"GLOBALS"}["gxsjfvezqd"]}=$xml_invoices_datiana->addChild("Anagrafica");$xml_invoices_ana->addChild("Denominazione",trim(${${"GLOBALS"}["ursyvhobb"]}));${"GLOBALS"}["heghywm"]="price15t";${"GLOBALS"}["lelflqi"]="invoice_user_country";$xml_invoices_datiana->addChild("RegimeFiscale",${${"GLOBALS"}["roitvyn"]});${"GLOBALS"}["wbdffsqsismj"]="xml_invoices_committente";${${"GLOBALS"}["ecfoklnavw"]}=$xml_invoices_cedente->addChild("Sede");$sljwognaxn="price4t";$xml_invoices_sede->addChild("Indirizzo",trim(${${"GLOBALS"}["guvywgbqmkd"]}));$xml_invoices_sede->addChild("CAP",trim(${${"GLOBALS"}["loisspjxycnu"]}));$xml_invoices_sede->addChild("Comune",trim(${$rsdqknz}));$xml_invoices_sede->addChild("Provincia",trim(${$ecutwfc}));$xml_invoices_sede->addChild("Nazione",${${"GLOBALS"}["qyjiyuj"]});${${"GLOBALS"}["rfapccflbcdn"]}=array("AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB");${${"GLOBALS"}["wbdffsqsismj"]}=$xml_invoices_header->addChild("CessionarioCommittente");${${"GLOBALS"}["yzqfiyyf"]}=$xml_invoices_committente->addChild("DatiAnagrafici");${"GLOBALS"}["xujuorpyf"]="grand_total";if(${$ypkyfpv}!=""&&${${"GLOBALS"}["lelflqi"]}=="IT"){$drsnjnou="invoice_user_country";${"GLOBALS"}["kcyjbf"]="invoice_user_piva";${${"GLOBALS"}["vecwiwdnwp"]}=$xml_invoices_datiana2->addChild("IdFiscaleIVA");$xmlidfiscale->addChild("IdPaese",${$drsnjnou});$xmlidfiscale->addChild("IdCodice",${${"GLOBALS"}["kcyjbf"]});}else if(${${"GLOBALS"}["tvymlo"]}!="IT"){${${"GLOBALS"}["vecwiwdnwp"]}=$xml_invoices_datiana2->addChild("IdFiscaleIVA");$xmlidfiscale->addChild("IdPaese",${${"GLOBALS"}["ppcpfiwquhe"]});if(${${"GLOBALS"}["vstkfirelsd"]}!="")$xmlidfiscale->addChild("IdCodice",sprintf("%05d",${${"GLOBALS"}["vstkfirelsd"]}));else$xmlidfiscale->addChild("IdCodice",sprintf("%05d",${${"GLOBALS"}["jdiqvtxxds"]}));}$vjyqnnskd="cod";if(isset(${${"GLOBALS"}["yynlrtnpvft"]})&&${$phsyvnpjf}!="")$xml_invoices_datiana2->addChild("CodiceFiscale",${${"GLOBALS"}["yxgixnhkqeee"]});${${"GLOBALS"}["dfwykji"]}=$xml_invoices_datiana2->addChild("Anagrafica");$xml_invoices_ana2->addChild("Denominazione",trim(${${"GLOBALS"}["dxkfhv"]}));${${"GLOBALS"}["ibdpfrwb"]}=$xml_invoices_committente->addChild("Sede");$xml_invoices_sede2->addChild("Indirizzo",preg_replace("/
/"," - ",trim(${${"GLOBALS"}["clwirkbijh"]})));if(${${"GLOBALS"}["ppcpfiwquhe"]}!="IT")$xml_invoices_sede2->addChild("CAP","00000");else$xml_invoices_sede2->addChild("CAP",${${"GLOBALS"}["ahxgyvbqzyg"]});$xml_invoices_sede2->addChild("Comune",trim(${$qivqhxa}));if(${${"GLOBALS"}["ppcpfiwquhe"]}=="IT")$xml_invoices_sede2->addChild("Provincia",${${"GLOBALS"}["yhxptiurxcd"]});$xml_invoices_sede2->addChild("Nazione",${$mikjuyqvsg});$lnmgmcveo="vat4";${"GLOBALS"}["hmttjejtu"]="natura";${${"GLOBALS"}["xtwxdffb"]}=$xml_invoices->addChild("FatturaElettronicaBody",null,"");${${"GLOBALS"}["msouckvd"]}=$xml_invoices_body->addChild("DatiGenerali");${"GLOBALS"}["fxqfhu"]="shipping_exclude_tax";${${"GLOBALS"}["tovmouft"]}=$xml_invoices_datigen->addChild("DatiGeneraliDocumento");$lmonxksc="invoice_user_country";if(${${"GLOBALS"}["tuohyyxkg"]}=="creditmemo"){$xml_invoices_datigen_doc->addChild("TipoDocumento","TD04");}else{$xml_invoices_datigen_doc->addChild("TipoDocumento","TD01");}$xml_invoices_datigen_doc->addChild("Divisa",$order->getData("store_currency_code"));$xml_invoices_datigen_doc->addChild("Data",explode(" ",$invoice->getCreatedAt())[0]);$zxjcxbrt="cod";$xml_invoices_datigen_doc->addChild("Numero",${${"GLOBALS"}["rjwiejfqxv"]});if($order->getDiscountAmount()>0){$pbhrfn="xml_invoices_datigen_doc_sconto";${$pbhrfn}=$xml_invoices_datigen_doc->addChild("ScontoMaggiorazione");$xml_invoices_datigen_doc_sconto->addChild("Tipo","SC");$xml_invoices_datigen_doc_sconto->addChild("Importo",number_format($order->getDiscountAmount,"2",".",""));}${${"GLOBALS"}["xujuorpyf"]}=$invoice->getGrandTotal();${${"GLOBALS"}["zgwihyopfkg"]}=number_format(${${"GLOBALS"}["eocvixncjit"]},"2",".","");if(${${"GLOBALS"}["qlcwigagsq"]}&&${${"GLOBALS"}["zgwihyopfkg"]}>77.47){${${"GLOBALS"}["yfycnf"]}=$xml_invoices_datigen_doc->addChild("DatiBollo");${"GLOBALS"}["bldcxhfzubjk"]="bollo_importo";$eidzui="bollo_importo";$xml_invoices_datigen_doc_bollo->addChild("BolloVirtuale","SI");if(${$eidzui}&&${${"GLOBALS"}["bldcxhfzubjk"]}!=""){${"GLOBALS"}["aqgxdvggd"]="bollo_importo";$xml_invoices_datigen_doc_bollo->addChild("ImportoBollo",number_format(${${"GLOBALS"}["aqgxdvggd"]},"2",".",""));}}$xml_invoices_datigen_doc->addChild("ImportoTotaleDocumento",number_format(${${"GLOBALS"}["tmqsrfxrsfn"]},"2",".",""));if(${${"GLOBALS"}["zrkxgpvnugl"]}!="")$xml_invoices_datigen_doc->addChild("Causale",${${"GLOBALS"}["zrkxgpvnugl"]});${${"GLOBALS"}["ymjfsdesnco"]}=$xml_invoices_datigen->addChild("DatiOrdineAcquisto");$xml_invoices_datigen_ordine->addChild("IdDocumento",${$femwpxvki});${${"GLOBALS"}["lmzeqrojbpgo"]}=$xml_invoices_body->addChild("DatiBeniServizi");${${"GLOBALS"}["ktcjqml"]}=0;${${"GLOBALS"}["whxrwrts"]}=$invoice->getShippingAmount();if((int)${${"GLOBALS"}["fxqfhu"]}!=0){$hrowdx="ship";${$hrowdx}=1;${"GLOBALS"}["kppptb"]="shipping_tax";${"GLOBALS"}["getyuhmoqg"]="tax_shipping_vat";${${"GLOBALS"}["oslypfmcuh"]}=$invoice->getShippingTaxAmount();${${"GLOBALS"}["getyuhmoqg"]}=(int)round(number_format(((${${"GLOBALS"}["kppptb"]}*100)/${${"GLOBALS"}["ydvjmtx"]}),"2",".",""));}$ontsldtwfid="invoice_user_country";if($this->moduleManager->isOutputEnabled("Phoenix_CashOnDelivery")){${${"GLOBALS"}["gtcwvqvad"]}=$invoice->getCodTaxAmount();${${"GLOBALS"}["wiovhzb"]}=$invoice->getCodFee();if((int)${${"GLOBALS"}["wiovhzb"]}>0){${${"GLOBALS"}["pwhqnwfproj"]}=(int)round(number_format(((${${"GLOBALS"}["gtcwvqvad"]}*100)/${${"GLOBALS"}["wiovhzb"]}),"2",".",""));}else{${${"GLOBALS"}["pwhqnwfproj"]}=0.00;}}elseif($this->moduleManager->isOutputEnabled("MSP_CashOnDelivery")){$yerhow="tax_code";${"GLOBALS"}["jmqkfxqqi"]="cod";${"GLOBALS"}["dsypmekmigr"]="cod";${$yerhow}=$order->getBaseMspCodTaxAmount();${${"GLOBALS"}["jmqkfxqqi"]}=$order->getBaseMspCodAmount();if((int)${${"GLOBALS"}["dsypmekmigr"]}>0){${"GLOBALS"}["rhcxacmgeimo"]="tax_cod_vat";$itltezv="cod";${${"GLOBALS"}["rhcxacmgeimo"]}=(int)round(number_format(((${${"GLOBALS"}["gtcwvqvad"]}*100)/${$itltezv}),"2",".",""));}else{$lxknhedu="tax_cod_vat";${$lxknhedu}=0.00;}}${"GLOBALS"}["evbxsdpkt"]="price0t";if(in_array(${$lmonxksc},${${"GLOBALS"}["rfapccflbcdn"]}))${${"GLOBALS"}["hmttjejtu"]}="N3.2";else if(${$ontsldtwfid}=="SM")${$wmcuktb}="N3.3";else if(${${"GLOBALS"}["ppcpfiwquhe"]}!="IT")${${"GLOBALS"}["pbnzyoojutv"]}="N3.1";else${${"GLOBALS"}["zerlaepjbm"]}=$this->helper->getEmFattEleItInfo("natura",${${"GLOBALS"}["eloucv"]});${${"GLOBALS"}["mrbhsfarwc"]}=0;${${"GLOBALS"}["gfjghplgyhw"]}=0;${${"GLOBALS"}["byezvyz"]}=0;${${"GLOBALS"}["twgchxn"]}=0;${${"GLOBALS"}["nawqbtx"]}=0;${${"GLOBALS"}["nxcziqlwt"]}=0;${$gfyxiprc}=0;${${"GLOBALS"}["vjhxhmmq"]}=0;${${"GLOBALS"}["yxhhhittkx"]}=0;${${"GLOBALS"}["ggxwfkg"]}=0;${${"GLOBALS"}["evbxsdpkt"]}=0;${${"GLOBALS"}["omolgvcpoqgn"]}=0.00;${$qxhnayasogeg}=1;foreach(${${"GLOBALS"}["feoyuucs"]} as${${"GLOBALS"}["ucicpwnjwid"]}){${"GLOBALS"}["avpndkct"]="tax_vat";$cobygaug="tax_vat";$qigdrft="imponibile";${"GLOBALS"}["yphinjxxu"]="tax_vat";${"GLOBALS"}["qroncpm"]="price10t";${"GLOBALS"}["hermuhfn"]="imponibile";if((int)$item->getData("row_total")==0||$item->getData("row_total")==""){continue;}${"GLOBALS"}["shmrzprvii"]="price15t";${${"GLOBALS"}["irvmgds"]}="";${${"GLOBALS"}["yevpykxlvom"]}=0;$lgsmbrfpcspp="price_incl_tax";${"GLOBALS"}["cktkyinup"]="tax_vat";${"GLOBALS"}["probffkogkp"]="total_tax";${"GLOBALS"}["olyyrvoxha"]="tax_amount";$khslgvic="tax_vat";${"GLOBALS"}["rrpjtgt"]="tax_vat";${$qigdrft}=0;${"GLOBALS"}["ypzmuo"]="tax_vat";$jffkqqnesns="rowtotal";${"GLOBALS"}["eeshnwffwv"]="tax_amount";${"GLOBALS"}["xmifvyvevk"]="subtotal";${"GLOBALS"}["ynkhlwmfg"]="tax_vat";$lswwhpwi="price_incl_tax";if($item->getData("discount_amount")>0){${${"GLOBALS"}["ypocgfcagxln"]}=$item->getData("discount_amount");}elseif(($item->getData("price")!=$item->getData("row_total"))&&$item->getData("qty")==1){$tjdsmphnmyw="discount";$bsdoeexmmrw="custom_discount";${$tjdsmphnmyw}=$item->getData("price")-$item->getData("row_total");${$bsdoeexmmrw}=1;}else{${"GLOBALS"}["cqbaqvc"]="discount";${${"GLOBALS"}["cqbaqvc"]}=0;}$tpethmwu="tax_amount";${${"GLOBALS"}["mbvjvurve"]}=$this->_scopeConfig->getValue("tax/calculation/apply_after_discount",\Magento\Store\Model\ScopeInterface::SCOPE_STORE);$nvmtxmqjdogm="price_escl_tax";${"GLOBALS"}["tdqutadb"]="vat5";${${"GLOBALS"}["avtoovm"]}=$this->_scopeConfig->getValue("tax/calculation/discount_tax",\Magento\Store\Model\ScopeInterface::SCOPE_STORE);${${"GLOBALS"}["perdbmtlm"]}=$this->_scopeConfig->getValue("tax/calculation/algorithm",\Magento\Store\Model\ScopeInterface::SCOPE_STORE);$riffluo="price_escl_tax";${"GLOBALS"}["ttvdrg"]="subtotal";${${"GLOBALS"}["eeshnwffwv"]}=number_format($item->getTaxAmount(),"2",".","");${"GLOBALS"}["escdlc"]="tax_vat";$trjoryfrb="price4t";${${"GLOBALS"}["fhkvcie"]}=$item->getData("price_incl_tax");${$nvmtxmqjdogm}=$item->getPrice();${${"GLOBALS"}["probffkogkp"]}=$item->getTaxAmount();${"GLOBALS"}["gtxfbxpihdcq"]="tax_vat";${"GLOBALS"}["mjnggtujxo"]="taxcustomer";$aegblhg="discount";${"GLOBALS"}["qdhxwobqa"]="imponibile";${"GLOBALS"}["ytbarr"]="product_name";${"GLOBALS"}["czijhlepji"]="imponibile";${"GLOBALS"}["wjpsjjjfjmsk"]="imponibile";${"GLOBALS"}["bqwgybbkzla"]="formatted_product_name";if(${${"GLOBALS"}["ypocgfcagxln"]}>0){$xdmrubhgkmt="subtotal";$vcgfhgux="price_escl_tax";$htaywryfu="discount";${"GLOBALS"}["pkbxbixkux"]="price_incl_tax";$vjirolrdu="discount";${$xdmrubhgkmt}=(${${"GLOBALS"}["pkbxbixkux"]}*$item->getData("qty"))-${$vjirolrdu};${${"GLOBALS"}["cmufbme"]}=(${$vcgfhgux}*$item->getData("qty"))-${$htaywryfu};}else{${${"GLOBALS"}["wedetds"]}=${${"GLOBALS"}["fhkvcie"]}*$item->getData("qty");${${"GLOBALS"}["cmufbme"]}=${${"GLOBALS"}["vhtrxopyoe"]}*$item->getData("qty");}${${"GLOBALS"}["wedetds"]}=${${"GLOBALS"}["cmufbme"]}+${${"GLOBALS"}["nqxtbidnj"]};${${"GLOBALS"}["ynkhlwmfg"]}=(int)round(((${$lgsmbrfpcspp}-$item->getData("price"))*100/$item->getData("price"))+0.01);${"GLOBALS"}["ktbqph"]="tax_vat";${"GLOBALS"}["jnqmiw"]="vat10";$pbzvipdphken="tax_vat";$hfimip="vat22";if(${${"GLOBALS"}["fwsgewkkvav"]}==3)${${"GLOBALS"}["ypzmuo"]}=4;else if(${${"GLOBALS"}["fwsgewkkvav"]}==6)${${"GLOBALS"}["cktkyinup"]}=5;else if(${${"GLOBALS"}["ktbqph"]}==9||${${"GLOBALS"}["fwsgewkkvav"]}==11)${${"GLOBALS"}["rrpjtgt"]}=10;else if(${$pbzvipdphken}==14||${${"GLOBALS"}["fwsgewkkvav"]}==16)${${"GLOBALS"}["escdlc"]}=15;else if(${${"GLOBALS"}["fwsgewkkvav"]}==20||${${"GLOBALS"}["gtxfbxpihdcq"]}==21||${${"GLOBALS"}["fwsgewkkvav"]}==23)${${"GLOBALS"}["fwsgewkkvav"]}=22;$jblwgdrqdiu="price5t";if(${${"GLOBALS"}["mjnggtujxo"]}==1){$eirthvled="discount_taxincluded";if(${$eirthvled}){$wpsbxlfh="discount";$nbylsjph="tax_vat";${"GLOBALS"}["kurtlywfmy"]="discount";${$wpsbxlfh}=round(${${"GLOBALS"}["kurtlywfmy"]}/(1+${$nbylsjph}/100),2);}${"GLOBALS"}["jyzymcszq"]="discount";$iwhyutvdecp="rowtotal";${$iwhyutvdecp}=$item->getData("row_total")-${${"GLOBALS"}["jyzymcszq"]};}else{${${"GLOBALS"}["ecsljullmr"]}=$item->getData("row_total");}${${"GLOBALS"}["ytbarr"]}.=trim($item->getData("name"));${${"GLOBALS"}["txxyiuone"]}=str_replace(["","","",""],"",${${"GLOBALS"}["irvmgds"]});${"GLOBALS"}["uhycnvpkqki"]="imponibile";$vidlufn="vat4";${${"GLOBALS"}["zynjnvfst"]}=htmlspecialchars(${${"GLOBALS"}["txxyiuone"]},ENT_XML1|ENT_COMPAT,"UTF-8");switch(${${"GLOBALS"}["avpndkct"]}){case 0.00:${${"GLOBALS"}["jmdtopf"]}=${${"GLOBALS"}["wedetds"]};${${"GLOBALS"}["ynaeworqe"]}+=${${"GLOBALS"}["czijhlepji"]};break;case 4.00:${${"GLOBALS"}["jmdtopf"]}=${${"GLOBALS"}["wedetds"]}/1.04;${$trjoryfrb}+=${${"GLOBALS"}["wjpsjjjfjmsk"]};${$vidlufn}+=${$tpethmwu};break;case 5.00:${${"GLOBALS"}["jmdtopf"]}=${${"GLOBALS"}["wedetds"]}/1.05;${$jblwgdrqdiu}+=${${"GLOBALS"}["uhycnvpkqki"]};${${"GLOBALS"}["tdqutadb"]}+=(${$jffkqqnesns}*5)/100;break;case 10.00:${${"GLOBALS"}["jmdtopf"]}=${${"GLOBALS"}["wedetds"]}/1.10;${${"GLOBALS"}["qroncpm"]}+=${${"GLOBALS"}["jmdtopf"]};${${"GLOBALS"}["jnqmiw"]}+=${${"GLOBALS"}["olyyrvoxha"]};break;case 15.00:${${"GLOBALS"}["hermuhfn"]}=${${"GLOBALS"}["xmifvyvevk"]}/1.15;${${"GLOBALS"}["shmrzprvii"]}+=$item->getData("row_total")-${${"GLOBALS"}["ypocgfcagxln"]};${${"GLOBALS"}["oaabotdigik"]}+=(${${"GLOBALS"}["ecsljullmr"]}*15)/100;break;default:${${"GLOBALS"}["qdhxwobqa"]}=${${"GLOBALS"}["ttvdrg"]}/1.22;${$hfimip}+=${${"GLOBALS"}["omolgvcpoqgn"]};if(${${"GLOBALS"}["ypocgfcagxln"]}>0){${"GLOBALS"}["brwytkczpmql"]="price22t";${"GLOBALS"}["twtklkfl"]="discount";$somsofhu="price22t";if(${${"GLOBALS"}["yevpykxlvom"]}==0)${${"GLOBALS"}["brwytkczpmql"]}+=((${${"GLOBALS"}["fhkvcie"]}/(1+${${"GLOBALS"}["fwsgewkkvav"]}/100))-(${${"GLOBALS"}["ypocgfcagxln"]}/$item->getData("qty")))*$item->getData("qty");else${$somsofhu}+=((${${"GLOBALS"}["fhkvcie"]}/(1+${${"GLOBALS"}["fwsgewkkvav"]}/100))-${${"GLOBALS"}["twtklkfl"]})*$item->getData("qty");}else{$nvuvmyxgkmw="tax_vat";${"GLOBALS"}["nyqbfw"]="price22t";${${"GLOBALS"}["nyqbfw"]}+=(${${"GLOBALS"}["fhkvcie"]}/(1+${$nvuvmyxgkmw}/100))*$item->getData("qty");}}${${"GLOBALS"}["fhkvcie"]}=number_format(${$lswwhpwi},"4",".","");${"GLOBALS"}["bbflviuxyk"]="count";${$riffluo}=number_format((${${"GLOBALS"}["fhkvcie"]}/(1+${$cobygaug}/100)),"4",".","");${${"GLOBALS"}["mpktpyvoh"]}=$xml_invoices_datibeni->addChild("DettaglioLinee");$xml_invoices_datibeni_linee->addChild("NumeroLinea",${${"GLOBALS"}["bbflviuxyk"]});$xml_invoices_datibeni_linee->addChild("Descrizione",substr(${${"GLOBALS"}["bqwgybbkzla"]},0,1000));$xml_invoices_datibeni_linee->addChild("Quantita",number_format($item->getData("qty"),"2",".",""));$xml_invoices_datibeni_linee->addChild("PrezzoUnitario",number_format((${${"GLOBALS"}["fhkvcie"]}/(1+${${"GLOBALS"}["yphinjxxu"]}/100)),"4",".",""));if(${$aegblhg}>0){${"GLOBALS"}["mnloyqigp"]="xml_invoices_datibeni_linee_sconto";$lxnwsodsra="discount";$pybidltyvy="custom_discount";${${"GLOBALS"}["mnloyqigp"]}=$xml_invoices_datibeni_linee->addChild("ScontoMaggiorazione");$xml_invoices_datibeni_linee_sconto->addChild("Tipo","SC");$xml_invoices_datibeni_linee_sconto->addChild("Importo",number_format(${$lxnwsodsra}/$item->getData("qty"),"4",".",""));if(${$pybidltyvy}==0){$xml_invoices_datibeni_linee->addChild("PrezzoTotale",number_format(((${${"GLOBALS"}["vhtrxopyoe"]})-(${${"GLOBALS"}["ypocgfcagxln"]}/$item->getData("qty")))*$item->getData("qty"),"2",".",""));}else{$kbkkst="price_escl_tax";$xml_invoices_datibeni_linee->addChild("PrezzoTotale",number_format((${$kbkkst}-${${"GLOBALS"}["ypocgfcagxln"]})*$item->getData("qty"),"2",".",""));}}else{${"GLOBALS"}["mncfopekn"]="price_escl_tax";$xml_invoices_datibeni_linee->addChild("PrezzoTotale",number_format(${${"GLOBALS"}["mncfopekn"]}*$item->getData("qty"),"2",".",""));}$xml_invoices_datibeni_linee->addChild("AliquotaIVA",number_format(${${"GLOBALS"}["fwsgewkkvav"]},"2",".",""));if(${$khslgvic}==0.00){${"GLOBALS"}["vnkwmuxp"]="natura";$xml_invoices_datibeni_linee->addChild("Natura",${${"GLOBALS"}["vnkwmuxp"]});}${${"GLOBALS"}["wqmgtdcfe"]}++;}${"GLOBALS"}["kveudsvaw"]="filename";${${"GLOBALS"}["yxhhhittkx"]}=round(${$lnmgmcveo},2);${$hkgotomcshty}=round(${${"GLOBALS"}["hlwtskbbljm"]},2);${${"GLOBALS"}["mbmmhivui"]}=round(${$gvpckbwqo},2);${${"GLOBALS"}["oaabotdigik"]}=round(${${"GLOBALS"}["zwwoycttd"]},2);${${"GLOBALS"}["mrbhsfarwc"]}=round(${$mlkblm},2);if(isset(${$jypoflpsnb})){$cnfqqjxvuxld="vat10";$qhpmewgct="ship22";$znfvbhcb="vat22";$ixngdvy="tax_shipping_vat";$eewfgs="shipping_exclude_tax";$pgpnclosjzm="shipping_tax";$enssgqduisnc="price10t";${"GLOBALS"}["wlwcscvcd"]="shipping_exclude_tax";${"GLOBALS"}["mfgwcdsr"]="xml_invoices_datibeni_linee";${"GLOBALS"}["hfpuor"]="shipping_exclude_tax";$cbdypmgy="shipping_exclude_tax";${"GLOBALS"}["ylbylirw"]="ship10";${"GLOBALS"}["kiqayp"]="ship4";$sghbmfholsd="ship15";${"GLOBALS"}["mcuzunhv"]="shipping_tax";${"GLOBALS"}["kvsqyymjwgk"]="price4t";$ipsbheq="shipping_exclude_tax";${"GLOBALS"}["ulmfmtfvr"]="ship0";${"GLOBALS"}["kcprfixs"]="price0t";$ubgtkqnn="price5t";switch(${${"GLOBALS"}["reehehxgl"]}){case 0.00:${${"GLOBALS"}["kcprfixs"]}+=${$ipsbheq};${${"GLOBALS"}["ulmfmtfvr"]}=1;break;case 4.00:${${"GLOBALS"}["yxhhhittkx"]}+=(${${"GLOBALS"}["oslypfmcuh"]});${${"GLOBALS"}["kvsqyymjwgk"]}+=${${"GLOBALS"}["wlwcscvcd"]};${${"GLOBALS"}["kiqayp"]}=1;break;case 5.00:${${"GLOBALS"}["hlwtskbbljm"]}+=(${${"GLOBALS"}["oslypfmcuh"]});${$ubgtkqnn}+=${${"GLOBALS"}["ydvjmtx"]};${${"GLOBALS"}["hnoowlfbt"]}=1;break;case 10.00:${$cnfqqjxvuxld}+=(${${"GLOBALS"}["oslypfmcuh"]});${$enssgqduisnc}+=${${"GLOBALS"}["hfpuor"]};${${"GLOBALS"}["ylbylirw"]}=1;break;case 15.00:${${"GLOBALS"}["oaabotdigik"]}+=(${${"GLOBALS"}["mcuzunhv"]});${${"GLOBALS"}["kolsweif"]}+=${$cbdypmgy};${$sghbmfholsd}=1;break;default:${${"GLOBALS"}["gfjghplgyhw"]}+=${$eewfgs};${$znfvbhcb}+=(${$pgpnclosjzm});${$qhpmewgct}=1;}${${"GLOBALS"}["mfgwcdsr"]}=$xml_invoices_datibeni->addChild("DettaglioLinee");$xml_invoices_datibeni_linee->addChild("NumeroLinea",${${"GLOBALS"}["wqmgtdcfe"]});$xml_invoices_datibeni_linee->addChild("TipoCessionePrestazione","AC");$xml_invoices_datibeni_linee->addChild("Descrizione","Spese di spedizione");$xml_invoices_datibeni_linee->addChild("Quantita","1.00");$xml_invoices_datibeni_linee->addChild("PrezzoUnitario",number_format(${${"GLOBALS"}["ydvjmtx"]},"2",".",""));${"GLOBALS"}["xwfthxl"]="tax_shipping_vat";$xml_invoices_datibeni_linee->addChild("PrezzoTotale",number_format(${${"GLOBALS"}["ydvjmtx"]},"2",".",""));$xml_invoices_datibeni_linee->addChild("AliquotaIVA",number_format(${$ixngdvy},"2",".",""));if(${${"GLOBALS"}["xwfthxl"]}==0.00){${"GLOBALS"}["ewpdbyt"]="natura";$xml_invoices_datibeni_linee->addChild("Natura",${${"GLOBALS"}["ewpdbyt"]});}${${"GLOBALS"}["wqmgtdcfe"]}++;}if(isset(${$vjyqnnskd})&&number_format(${$zxjcxbrt},"2",".","")!="0.00"){$pqdnutryjj="cod";${"GLOBALS"}["svvwoqugo"]="cod";$lmivmdcqbo="price5t";${"GLOBALS"}["rnotvufphm"]="cod";$ttnirnb="cod10";$sbelvcggf="tax_cod_vat";$wgousfxqh="cod5";${"GLOBALS"}["otmojhivxce"]="price22t";${"GLOBALS"}["olmglbfkm"]="cod4";$kvcwmbja="tax_code";${"GLOBALS"}["pcjvffx"]="vat4";${"GLOBALS"}["agmplosclxex"]="vat5";$pcinkxxdc="count";$dnotuxwze="xml_invoices_datibeni_linee";$ohijxw="cod0";switch(${$sbelvcggf}){case 0.00:${${"GLOBALS"}["ynaeworqe"]}+=${${"GLOBALS"}["wiovhzb"]};${$ohijxw}=1;break;case 4.00:${${"GLOBALS"}["pcjvffx"]}+=(${$kvcwmbja});${${"GLOBALS"}["ggxwfkg"]}+=${$pqdnutryjj};${${"GLOBALS"}["olmglbfkm"]}=1;break;case 5.00:${${"GLOBALS"}["agmplosclxex"]}+=(${${"GLOBALS"}["gtcwvqvad"]});${$lmivmdcqbo}+=${${"GLOBALS"}["svvwoqugo"]};${$wgousfxqh}=1;break;case 10.00:${${"GLOBALS"}["nawqbtx"]}+=(${${"GLOBALS"}["gtcwvqvad"]});${${"GLOBALS"}["nxcziqlwt"]}+=${${"GLOBALS"}["wiovhzb"]};${$ttnirnb}=1;break;case 15.00:${${"GLOBALS"}["oaabotdigik"]}+=(${${"GLOBALS"}["gtcwvqvad"]});${${"GLOBALS"}["kolsweif"]}+=${${"GLOBALS"}["wiovhzb"]};${${"GLOBALS"}["dafynerkyxvn"]}=1;break;default:${${"GLOBALS"}["otmojhivxce"]}+=${${"GLOBALS"}["rnotvufphm"]};${${"GLOBALS"}["mrbhsfarwc"]}+=(${${"GLOBALS"}["gtcwvqvad"]});${${"GLOBALS"}["xahlllqu"]}=1;}${$dnotuxwze}=$xml_invoices_datibeni->addChild("DettaglioLinee");$xml_invoices_datibeni_linee->addChild("NumeroLinea",${$pcinkxxdc});$xml_invoices_datibeni_linee->addChild("TipoCessionePrestazione","AC");$xml_invoices_datibeni_linee->addChild("Descrizione","Contrassegno");$xml_invoices_datibeni_linee->addChild("Quantita","1.00");$xml_invoices_datibeni_linee->addChild("PrezzoUnitario",number_format(${${"GLOBALS"}["wiovhzb"]},"2",".",""));$lnfevf="cod";$xml_invoices_datibeni_linee->addChild("PrezzoTotale",number_format(${$lnfevf},"2",".",""));$hxhvqbmg="tax_cod_vat";$xml_invoices_datibeni_linee->addChild("AliquotaIVA",number_format(${${"GLOBALS"}["pwhqnwfproj"]},"2",".",""));if(${$hxhvqbmg}==0.00){${"GLOBALS"}["feornloqx"]="natura";$xml_invoices_datibeni_linee->addChild("Natura",${${"GLOBALS"}["feornloqx"]});}${${"GLOBALS"}["wqmgtdcfe"]}++;}if(${${"GLOBALS"}["gfjghplgyhw"]}>0){${"GLOBALS"}["ccmlxpfloiy"]="cod22";$syozyxmr="xml_invoices_datibeni_riep";${$syozyxmr}=$xml_invoices_datibeni->addChild("DatiRiepilogo");$xml_invoices_datibeni_riep->addChild("AliquotaIVA","22.00");$znnmqcqvxn="cod";${"GLOBALS"}["nelgwwr"]="price22t";if(isset(${${"GLOBALS"}["jmfshbduyrh"]})&&isset(${${"GLOBALS"}["fidvkdjni"]})){$wggyebcrb="cod22";if(isset(${${"GLOBALS"}["wiovhzb"]})&&isset(${$wggyebcrb})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]}+${${"GLOBALS"}["wiovhzb"]},"2",".",""));}elseif(!isset(${${"GLOBALS"}["wiovhzb"]})){${"GLOBALS"}["kxwcfdvvu"]="shipping_exclude_tax";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["kxwcfdvvu"]},"2",".",""));}}elseif(isset(${$znnmqcqvxn})&&isset(${${"GLOBALS"}["ccmlxpfloiy"]})){$allqital="cod";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${$allqital},"2",".",""));}$xml_invoices_datibeni_riep->addChild("ImponibileImporto",number_format(${${"GLOBALS"}["nelgwwr"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("Imposta",number_format((${${"GLOBALS"}["gfjghplgyhw"]}*22)/100,"2",".",""));$xml_invoices_datibeni_riep->addChild("EsigibilitaIVA",${${"GLOBALS"}["jskxgfip"]});}if(${$sljwognaxn}>0){${${"GLOBALS"}["bogzdiuw"]}=$xml_invoices_datibeni->addChild("DatiRiepilogo");${"GLOBALS"}["vnbcctya"]="ship4";$ydmzliowceqo="price4t";$xml_invoices_datibeni_riep->addChild("AliquotaIVA","4.00");${"GLOBALS"}["lvlwihmps"]="cod";$ariohyf="cod4";if(isset(${${"GLOBALS"}["jmfshbduyrh"]})&&isset(${${"GLOBALS"}["vnbcctya"]})){${"GLOBALS"}["pqpjixi"]="cod";if(isset(${${"GLOBALS"}["pqpjixi"]})&&isset(${${"GLOBALS"}["hlguib"]})){$srqnfyd="cod";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]}+${$srqnfyd},"2",".",""));}elseif(!isset(${${"GLOBALS"}["wiovhzb"]})){$oogjxjtxstiu="shipping_exclude_tax";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${$oogjxjtxstiu},"2",".",""));}}elseif(isset(${${"GLOBALS"}["lvlwihmps"]})&&isset(${$ariohyf})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["wiovhzb"]},"2",".",""));}$xml_invoices_datibeni_riep->addChild("ImponibileImporto",number_format(${$ydmzliowceqo},"2",".",""));$xml_invoices_datibeni_riep->addChild("Imposta",number_format(${${"GLOBALS"}["yxhhhittkx"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("EsigibilitaIVA",${${"GLOBALS"}["jskxgfip"]});}if(${${"GLOBALS"}["limekwohmh"]}>0){${"GLOBALS"}["kkelixt"]="xml_invoices_datibeni_riep";$qymqwfrd="ship5";${"GLOBALS"}["umymmgnguir"]="price5t";${${"GLOBALS"}["kkelixt"]}=$xml_invoices_datibeni->addChild("DatiRiepilogo");$vmvffxccaj="cod5";$xml_invoices_datibeni_riep->addChild("AliquotaIVA","5.00");$citekwxc="ship";if(isset(${$citekwxc})&&isset(${$qymqwfrd})){if(isset(${${"GLOBALS"}["wiovhzb"]})&&isset(${${"GLOBALS"}["ynbmgbzjdcy"]})){${"GLOBALS"}["gtjednbgmrz"]="cod";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]}+${${"GLOBALS"}["gtjednbgmrz"]},"2",".",""));}elseif(!isset(${${"GLOBALS"}["wiovhzb"]})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]},"2",".",""));}}elseif(isset(${${"GLOBALS"}["wiovhzb"]})&&isset(${$vmvffxccaj})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["wiovhzb"]},"2",".",""));}$xml_invoices_datibeni_riep->addChild("ImponibileImporto",number_format(${${"GLOBALS"}["umymmgnguir"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("Imposta",number_format(${${"GLOBALS"}["hlwtskbbljm"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("EsigibilitaIVA",${${"GLOBALS"}["jskxgfip"]});}if(${${"GLOBALS"}["nxcziqlwt"]}>0){${"GLOBALS"}["elobuun"]="xml_invoices_datibeni_riep";${${"GLOBALS"}["elobuun"]}=$xml_invoices_datibeni->addChild("DatiRiepilogo");${"GLOBALS"}["ubawyiq"]="vat10";${"GLOBALS"}["xmotmfmbeq"]="cod";$xml_invoices_datibeni_riep->addChild("AliquotaIVA","10.00");${"GLOBALS"}["evjqden"]="price10t";if(isset(${${"GLOBALS"}["jmfshbduyrh"]})&&isset(${${"GLOBALS"}["uhuheioo"]})){if(isset(${${"GLOBALS"}["wiovhzb"]})&&isset(${${"GLOBALS"}["mpkvltgpj"]})){$dbvxuvhbfnj="cod";$telpjfvo="shipping_exclude_tax";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${$telpjfvo}+${$dbvxuvhbfnj},"2",".",""));}elseif(!isset(${${"GLOBALS"}["wiovhzb"]})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]},"2",".",""));}}elseif(isset(${${"GLOBALS"}["xmotmfmbeq"]})&&isset(${${"GLOBALS"}["mpkvltgpj"]})){${"GLOBALS"}["bjisuzfpdy"]="cod";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["bjisuzfpdy"]},"2",".",""));}$xml_invoices_datibeni_riep->addChild("ImponibileImporto",number_format(${${"GLOBALS"}["evjqden"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("Imposta",number_format(${${"GLOBALS"}["ubawyiq"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("EsigibilitaIVA",${${"GLOBALS"}["jskxgfip"]});}if(${${"GLOBALS"}["heghywm"]}>0){$tjqbrkruhoxd="cod15";${"GLOBALS"}["fhmdytjlwiei"]="ship";${${"GLOBALS"}["bogzdiuw"]}=$xml_invoices_datibeni->addChild("DatiRiepilogo");$xml_invoices_datibeni_riep->addChild("AliquotaIVA","15.00");$bphzwfr="price15t";$rkgcpxitp="esigibilitaiva";$ibqbtwy="vat15";if(isset(${${"GLOBALS"}["fhmdytjlwiei"]})&&isset(${${"GLOBALS"}["jhlqmkfsvpz"]})){${"GLOBALS"}["utjroljqiv"]="cod";$pcwnfwsopfx="cod15";$jnedteqm="cod";if(isset(${${"GLOBALS"}["utjroljqiv"]})&&isset(${$pcwnfwsopfx})){$ghyurbebe="cod";$bfacyohlmvm="shipping_exclude_tax";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${$bfacyohlmvm}+${$ghyurbebe},"2",".",""));}elseif(!isset(${$jnedteqm})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]},"2",".",""));}}elseif(isset(${${"GLOBALS"}["wiovhzb"]})&&isset(${$tjqbrkruhoxd})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["wiovhzb"]},"2",".",""));}$xml_invoices_datibeni_riep->addChild("ImponibileImporto",number_format(${$bphzwfr},"2",".",""));$xml_invoices_datibeni_riep->addChild("Imposta",number_format(${$ibqbtwy},"2",".",""));$xml_invoices_datibeni_riep->addChild("EsigibilitaIVA",${$rkgcpxitp});}if(${$kyblnupq}>0){$cvcevofj="ship";$cuugsv="esigibilitaiva";$cmwmnbtuuwd="cod";${"GLOBALS"}["nywcfj"]="xml_invoices_datibeni_riep";${${"GLOBALS"}["nywcfj"]}=$xml_invoices_datibeni->addChild("DatiRiepilogo");$xml_invoices_datibeni_riep->addChild("AliquotaIVA","0.00");$xml_invoices_datibeni_riep->addChild("Natura",${${"GLOBALS"}["uvqblukdbkj"]});$xxeksryrydk="ship0";$pnvelmuiq="cod0";${"GLOBALS"}["ujjidn"]="price0t";if(isset(${$cvcevofj})&&isset(${$xxeksryrydk})){${"GLOBALS"}["dfrlnjn"]="cod";$rcpqwokcxqq="cod";${"GLOBALS"}["sgybwcsmnh"]="cod0";if(isset(${$rcpqwokcxqq})&&isset(${${"GLOBALS"}["sgybwcsmnh"]})){$jbflott="cod";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["ydvjmtx"]}+${$jbflott},"2",".",""));}elseif(!isset(${${"GLOBALS"}["dfrlnjn"]})){${"GLOBALS"}["rwhdxczsenp"]="shipping_exclude_tax";$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["rwhdxczsenp"]},"2",".",""));}}elseif(isset(${$cmwmnbtuuwd})&&isset(${$pnvelmuiq})){$xml_invoices_datibeni_riep->addChild("SpeseAccessorie",number_format(${${"GLOBALS"}["wiovhzb"]},"2",".",""));}$xml_invoices_datibeni_riep->addChild("ImponibileImporto",number_format(${${"GLOBALS"}["ujjidn"]},"2",".",""));$xml_invoices_datibeni_riep->addChild("Imposta","0.00");$xml_invoices_datibeni_riep->addChild("EsigibilitaIVA",${$cuugsv});}${${"GLOBALS"}["rdeexogjoh"]}=$this->getXmlDir();if(!file_exists(${$ogpnhcfwh})){${"GLOBALS"}["qncsmiikdfx"]="dir";$this->io->mkdir(${${"GLOBALS"}["qncsmiikdfx"]},0777);}if($xml_invoices->saveXML(${$oeumqhr}.${${"GLOBALS"}["kveudsvaw"]})){${"GLOBALS"}["gsbgvvgdlwz"]="filename";return${${"GLOBALS"}["gsbgvvgdlwz"]};}else{${"GLOBALS"}["aekncmoqkpd"]="filename";return${${"GLOBALS"}["aekncmoqkpd"]};}}else{header($_SERVER["SERVER_PROTOCOL"]." 400 Bad Request");die("licenza per il dominio ".str_replace("www.","",$_SERVER["SERVER_NAME"])." non valida! ");}}} ?>

Function Calls

None

Variables

None

Stats

MD5 fddc1c50514cfe4e687c8d8c4be1b137
Eval Count 0
Decode Time 155 ms