mirror of
https://github.com/Karaka-Management/oms-SupplierManagement.git
synced 2026-02-14 15:58:40 +00:00
Automated formatting changes
This commit is contained in:
parent
12b5738ce9
commit
68235c09d6
|
|
@ -14,9 +14,9 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\SupplierManagement\Controller;
|
namespace Modules\SupplierManagement\Controller;
|
||||||
|
|
||||||
use Modules\SupplierManagement\Models\SupplierMapper;
|
|
||||||
use Modules\Billing\Models\PurchaseBillMapper;
|
|
||||||
use Modules\Billing\Models\BillTypeL11n;
|
use Modules\Billing\Models\BillTypeL11n;
|
||||||
|
use Modules\Billing\Models\PurchaseBillMapper;
|
||||||
|
use Modules\SupplierManagement\Models\SupplierMapper;
|
||||||
use phpOMS\Asset\AssetType;
|
use phpOMS\Asset\AssetType;
|
||||||
use phpOMS\Contract\RenderableInterface;
|
use phpOMS\Contract\RenderableInterface;
|
||||||
use phpOMS\Localization\Money;
|
use phpOMS\Localization\Money;
|
||||||
|
|
@ -108,16 +108,16 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
// stats
|
// stats
|
||||||
if ($this->app->moduleManager->isActive('Billing')) {
|
if ($this->app->moduleManager->isActive('Billing')) {
|
||||||
$ytd = PurchaseBillMapper::getPurchaseBySupplierId($supplier->getId(), new SmartDateTime('Y-01-01'), new SmartDateTime('now'));
|
$ytd = PurchaseBillMapper::getPurchaseBySupplierId($supplier->getId(), new SmartDateTime('Y-01-01'), new SmartDateTime('now'));
|
||||||
$mtd = PurchaseBillMapper::getPurchaseBySupplierId($supplier->getId(), new SmartDateTime('Y-m-01'), new SmartDateTime('now'));
|
$mtd = PurchaseBillMapper::getPurchaseBySupplierId($supplier->getId(), new SmartDateTime('Y-m-01'), new SmartDateTime('now'));
|
||||||
$lastOrder = PurchaseBillMapper::getLastOrderDateBySupplierId($supplier->getId());
|
$lastOrder = PurchaseBillMapper::getLastOrderDateBySupplierId($supplier->getId());
|
||||||
$newestInvoices = PurchaseBillMapper::withConditional('language', $response->getLanguage(), [BillTypeL11n::class])::getNewestSupplierInvoices($supplier->getId(), 5);
|
$newestInvoices = PurchaseBillMapper::withConditional('language', $response->getLanguage(), [BillTypeL11n::class])::getNewestSupplierInvoices($supplier->getId(), 5);
|
||||||
$monthlyPurchaseCosts = PurchaseBillMapper::getSupplierMonthlyPurchaseCosts($supplier->getId(), (new SmartDateTime('now'))->createModify(-1), new SmartDateTime('now'));
|
$monthlyPurchaseCosts = PurchaseBillMapper::getSupplierMonthlyPurchaseCosts($supplier->getId(), (new SmartDateTime('now'))->createModify(-1), new SmartDateTime('now'));
|
||||||
} else {
|
} else {
|
||||||
$ytd = new Money();
|
$ytd = new Money();
|
||||||
$mtd = new Money();
|
$mtd = new Money();
|
||||||
$lastOrder = null;
|
$lastOrder = null;
|
||||||
$newestInvoices = [];
|
$newestInvoices = [];
|
||||||
$monthlyPurchaseCosts = [];
|
$monthlyPurchaseCosts = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Modules\Profile\Models\ContactType;
|
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
$countryCodes = \phpOMS\Localization\ISO3166TwoEnum::getConstants();
|
$countryCodes = \phpOMS\Localization\ISO3166TwoEnum::getConstants();
|
||||||
|
|
@ -22,10 +21,10 @@ $countries = \phpOMS\Localization\ISO3166NameEnum::getConstants();
|
||||||
* @var \Modules\SupplierManagement\Models\Supplier $supplier
|
* @var \Modules\SupplierManagement\Models\Supplier $supplier
|
||||||
*/
|
*/
|
||||||
$supplier = $this->getData('supplier');
|
$supplier = $this->getData('supplier');
|
||||||
$notes = $supplier->getNotes();
|
$notes = $supplier->getNotes();
|
||||||
$files = $supplier->getFiles();
|
$files = $supplier->getFiles();
|
||||||
|
|
||||||
$newestInvoices = $this->getData('newestInvoices') ?? [];
|
$newestInvoices = $this->getData('newestInvoices') ?? [];
|
||||||
$monthlyPurchaseCosts = $this->getData('monthlyPurchaseCosts') ?? [];
|
$monthlyPurchaseCosts = $this->getData('monthlyPurchaseCosts') ?? [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user