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