<?php
namespace ModulesAbstract\PluginReports\Report\Model\Gatherer\ExportData; class Payment extends AbstractExportDataFile { public function getDate() { return (String)$this->docDate; } public function getPartnerType() { return 'supplier'; } public function getPartnerDetails() { $supplierAddress = ""; $countryCode = ""; $supplierEnt = \Entity\Supplier::select((String)$this->invoiceDetails->supplier['id']); if ($supplierEnt->recordExists()) { $supplierAddress = $supplierEnt->address; $countryCode = $supplierEnt->country->code; } return [ 'id' => (String)$this->invoiceDetails->supplier['id'], 'type' => (String)$this->getPartnerType(), 'alias' => (String)$this->invoiceDetails->supplier->alias, 'company' => (String)$this->invoiceDetails->supplier->company, 'companyPrefix' => (String)$this->invoiceDetails->supplier->company['prefix'], 'companySuffix' => (String)$this->invoiceDetails->supplier->company['suffix'], 'fiscalCode' => (String)$this->invoiceDetails->supplier->fiscalCode, 'address' => $supplierAddress, 'countryCode' => $countryCode, ]; } public function isVoid() { return (((String)$this['operation'] == 'void') or ((String)$this['operation'] == 'unconfirm')); } public function getVoidDate() { return $this->getExportDate(); } public function isIssue() { return (((String)$this['operation'] == 'issue') or ((String)$this['operation'] == 'confirm')); } public function getIssueDate() { return $this->getDate(); } public function isCoreDocument() { return true; } public function isCashbookDocument() { return false; } public function isImportedDocument() { return false; } } 