data['supplier'] ?? new NullSupplier(); $isNew = $supplier->id === 0; $supplierImage = $this->getData('supplierImage') ?? new NullMedia(); $supplierStatus = SupplierStatus::getConstants(); $monthlySalesCosts = $this->data['monthlySalesCosts'] ?? []; // @performance The client, supplier and item views should not use actual tabs but individual pages for better performance // Tabs require too many models to be loaded. Implement and then use a tab navigation if it doesn't already exist. // https://github.com/Karaka-Management/oms-ItemManagement/issues/13 /** * @var \phpOMS\Views\View $this */ echo $this->data['nav']->render(); ?>
| = $this->getHtml('YTDSales'); ?>: | = PurchaseBillMapper::getSupplierNetSales($supplier->id, SmartDateTime::startOfYear($this->data['business_start']), new \DateTime('now'))->getAmount(); ?> |
| = $this->getHtml('MTDSales'); ?>: | = PurchaseBillMapper::getSupplierNetSales($supplier->id, SmartDateTime::startOfMonth(), new \DateTime('now'))->getAmount(); ?> |
| = $this->getHtml('SLV'); ?>: | = PurchaseBillMapper::getSLVHistoric($supplier->id)->getAmount(); ?> |
| = $this->getHtml('LastContact'); ?>: | = PurchaseBillMapper::getSupplierLastOrder($supplier->id)?->format('Y-m-d'); ?> |
| = $this->getHtml('LastOrder'); ?>: | = PurchaseBillMapper::getSupplierLastOrder($supplier->id)?->format('Y-m-d'); ?> |
| = $this->getHtml('Created'); ?>: | = $supplier->createdAt->format('Y-m-d H:i'); ?> |
| = $this->getHtml('DSO'); ?>: | TBD |
| = $this->getHtml('Due'); ?>: | TBD |
| = $this->getHtml('Balance'); ?>: | TBD |
| = $this->getHtml('Number'); ?> | = $this->getHtml('Type'); ?> | = $this->getHtml('Name'); ?> | = $this->getHtml('Net'); ?> | = $this->getHtml('Date'); ?> |
| = $invoice->getNumber(); ?> | = $invoice->type->getL11n(); ?> | = $invoice->billTo; ?> | = $this->getCurrency($invoice->netSales, symbol: ''); ?> | = $invoice->performanceDate->format('Y-m-d'); ?> |
| = $this->getHtml('Empty', '0', '0'); ?> | ||||