mirror of
https://github.com/Karaka-Management/oms-Finance.git
synced 2026-02-04 15:58:40 +00:00
Merge branch 'develop' of https://github.com/Karaka-Management/oms-Finance into develop
This commit is contained in:
commit
10cd29c4ba
|
|
@ -71,7 +71,7 @@ final class ApiController extends Controller
|
|||
public function apiTaxCodeCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||
{
|
||||
if (!empty($val = $this->validateTaxCodeCreate($request))) {
|
||||
$response->set('tax_code_create', new FormValidation($val));
|
||||
$response->data['tax_code_create'] = new FormValidation($val);
|
||||
$response->header->status = RequestStatusCode::R_400;
|
||||
|
||||
return;
|
||||
|
|
@ -147,7 +147,7 @@ final class ApiController extends Controller
|
|||
public function apiTaxCodeL11nCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||
{
|
||||
if (!empty($val = $this->validateTaxCodeL11nCreate($request))) {
|
||||
$response->set('tax_code_l11n_create', new FormValidation($val));
|
||||
$response->data['tax_code_l11n_create'] = new FormValidation($val);
|
||||
$response->header->status = RequestStatusCode::R_400;
|
||||
|
||||
return;
|
||||
|
|
@ -175,7 +175,7 @@ final class ApiController extends Controller
|
|||
$l11n->short = $request->getDataString('short') ?? '';
|
||||
$l11n->long = $request->getDataString('long') ?? '';
|
||||
$l11n->code = $request->getDataInt('code') ?? 0;
|
||||
$l11n->setLanguage((string) ($request->getDataString('language') ?? $request->getLanguage()));
|
||||
$l11n->setLanguage((string) ($request->getDataString('language') ?? $request->header->l11n->language));
|
||||
|
||||
return $l11n;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,14 +44,14 @@ final class BackendController extends Controller
|
|||
*/
|
||||
public function viewDashboard(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
||||
{
|
||||
$head = $response->get('Content')->getData('head');
|
||||
$head = $response->get('Content')->head;
|
||||
$head->addAsset(AssetType::CSS, 'Resources/chartjs/Chartjs/chart.css');
|
||||
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/Chartjs/chart.js');
|
||||
$head->addAsset(AssetType::JSLATE, 'Modules/ClientManagement/Controller.js', ['type' => 'module']);
|
||||
|
||||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
$view->setTemplate('/Modules/Sales/Theme/Backend/sales-analysis-dashboard');
|
||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1001602001, $request, $response));
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001602001, $request, $response);
|
||||
|
||||
/////
|
||||
$monthlySalesCustomer = [];
|
||||
|
|
@ -64,7 +64,7 @@ final class BackendController extends Controller
|
|||
];
|
||||
}
|
||||
|
||||
$view->addData('monthlySalesCustomer', $monthlySalesCustomer);
|
||||
$view->data['monthlySalesCustomer'] = $monthlySalesCustomer;
|
||||
|
||||
$annualSalesCustomer = [];
|
||||
for ($i = 1; $i < 11; ++$i) {
|
||||
|
|
@ -75,7 +75,7 @@ final class BackendController extends Controller
|
|||
];
|
||||
}
|
||||
|
||||
$view->addData('annualSalesCustomer', $annualSalesCustomer);
|
||||
$view->data['annualSalesCustomer'] = $annualSalesCustomer;
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,18 +58,6 @@ class TaxCode implements \JsonSerializable
|
|||
$this->l11n = new TaxCodeL11n();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getId() : int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -83,18 +83,6 @@ class TaxCodeL11n implements \JsonSerializable
|
|||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getId() : int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get language
|
||||
*
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ use phpOMS\Localization\Money;
|
|||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
echo $this->getData('nav')->render();
|
||||
echo $this->data['nav']->render();
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
|
|
@ -119,7 +119,7 @@ echo $this->getData('nav')->render();
|
|||
Sales / Profit - Monthly
|
||||
<?php include __DIR__ . '/../../../../Web/Backend/Themes/popup-export-data.tpl.php'; ?>
|
||||
</div>
|
||||
<?php $salesCustomer = $this->getData('monthlySalesCustomer'); ?>
|
||||
<?php $salesCustomer = $this->data['monthlySalesCustomer']; ?>
|
||||
<div class="portlet-body">
|
||||
<canvas id="sales-region" data-chart='{
|
||||
"type": "bar",
|
||||
|
|
@ -243,7 +243,7 @@ echo $this->getData('nav')->render();
|
|||
Sales / Profit - Annual
|
||||
<?php include __DIR__ . '/../../../../Web/Backend/Themes/popup-export-data.tpl.php'; ?>
|
||||
</div>
|
||||
<?php $salesCustomer = $this->getData('annualSalesCustomer'); ?>
|
||||
<?php $salesCustomer = $this->data['annualSalesCustomer']; ?>
|
||||
<div class="portlet-body">
|
||||
<canvas id="sales-customer-annual" data-chart='{
|
||||
"type": "bar",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user