setFacturiData(date('Y-m-d H:i:s', strtotime($created_date))); $proforma->setFacturiDataScadenta(date('Y-m-d H:i:s', strtotime($created_date))); $proforma->setFacturiCotaTva($this->getTaxName($taxRate)); $proforma->setFacturiMoneda($currency); $proforma->setFacturiSerie($facturi_serie); $proforma->setFacturiObsUp($this->getObs($order_id, $shipping_address_first_name, $shipping_address_last_name, $shipping_address_phone, $billing_address_phone, $comments)); $proforma->setFacturiModPlata($payment_method); $proforma->setFacturiStatus('Emisa'); $proforma->setFacturiClientId($customer_id); $proforma->setFacturiNumeClient($this->getPaymentName($customer_first_name, $customer_last_name, $billing_address_first_name, $billing_address_last_name, $billing_company, $company)); $proforma->setFacturiTipPersoana(!empty($fiscal_code) ? 'juridica' : 'fizica'); $proforma->setFacturiCodfClient($fiscal_code); $proforma->setFacturiNrregClient($nr_inreg); $proforma->setFacturiSediuClient($this->getPaymentAddress($billing_address_address1, $billing_address_address2, $billing_address_zip)); $proforma->setFacturiJudetClient($this->stripSpecialChars($billing_address_province)); $proforma->setFacturiOrasClient($this->stripSpecialChars($billing_address_city)); $proforma->setFacturiClientiTel($billing_address_phone); $proforma->setFacturiEmailClient($email); $proforma->setFacturiClientiAdresaLivrare($this->getShippingAddress($shipping_address_address1, $shipping_address_address2, $shipping_address_zip)); $proforma->setFacturiContClient($facturi_cont_client); $proforma->setFacturiBancaClient($facturi_banca_client); $proforma->setFacturiObsClient('Id extern client: ' . $customer_id); $proforma->setFacturiClientiOrasLivrare($this->stripSpecialChars($shipping_address_city)); $proforma->setFacturiClientiJudetLivrare($this->stripSpecialChars($shipping_address_province)); $proforma->setUniqueIdInsert($this->getPrefix() . $facturi_serie . '_' . $customer_id . '_' . $order_id . '_' . strtotime($created_date)); return $proforma; } }