mirror of
https://github.com/Karaka-Management/oms-SupplierManagement.git
synced 2026-01-11 17:28:41 +00:00
Merge branch 'develop' of https://github.com/Orange-Management/oms-SupplierManagement into develop
This commit is contained in:
commit
09e343ec61
|
|
@ -14,9 +14,9 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\SupplierManagement\Controller;
|
||||
|
||||
use Modules\SupplierManagement\Models\SupplierMapper;
|
||||
use Modules\Billing\Models\PurchaseBillMapper;
|
||||
use Modules\Billing\Models\BillTypeL11n;
|
||||
use Modules\Billing\Models\PurchaseBillMapper;
|
||||
use Modules\SupplierManagement\Models\SupplierMapper;
|
||||
use phpOMS\Asset\AssetType;
|
||||
use phpOMS\Contract\RenderableInterface;
|
||||
use phpOMS\Localization\Money;
|
||||
|
|
@ -108,16 +108,16 @@ final class BackendController extends Controller
|
|||
|
||||
// stats
|
||||
if ($this->app->moduleManager->isActive('Billing')) {
|
||||
$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'));
|
||||
$lastOrder = PurchaseBillMapper::getLastOrderDateBySupplierId($supplier->getId());
|
||||
$newestInvoices = PurchaseBillMapper::withConditional('language', $response->getLanguage(), [BillTypeL11n::class])::getNewestSupplierInvoices($supplier->getId(), 5);
|
||||
$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'));
|
||||
$lastOrder = PurchaseBillMapper::getLastOrderDateBySupplierId($supplier->getId());
|
||||
$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'));
|
||||
} else {
|
||||
$ytd = new Money();
|
||||
$mtd = new Money();
|
||||
$lastOrder = null;
|
||||
$newestInvoices = [];
|
||||
$ytd = new Money();
|
||||
$mtd = new Money();
|
||||
$lastOrder = null;
|
||||
$newestInvoices = [];
|
||||
$monthlyPurchaseCosts = [];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use Modules\Profile\Models\ContactType;
|
||||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
$countryCodes = \phpOMS\Localization\ISO3166TwoEnum::getConstants();
|
||||
|
|
@ -22,10 +21,10 @@ $countries = \phpOMS\Localization\ISO3166NameEnum::getConstants();
|
|||
* @var \Modules\SupplierManagement\Models\Supplier $supplier
|
||||
*/
|
||||
$supplier = $this->getData('supplier');
|
||||
$notes = $supplier->getNotes();
|
||||
$files = $supplier->getFiles();
|
||||
$notes = $supplier->getNotes();
|
||||
$files = $supplier->getFiles();
|
||||
|
||||
$newestInvoices = $this->getData('newestInvoices') ?? [];
|
||||
$newestInvoices = $this->getData('newestInvoices') ?? [];
|
||||
$monthlyPurchaseCosts = $this->getData('monthlyPurchaseCosts') ?? [];
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user