mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-02-14 15:28:42 +00:00
bug fixes and template adjustments
This commit is contained in:
parent
264e93ef28
commit
f5028e3dbf
|
|
@ -279,7 +279,7 @@ final class ApiController extends Controller
|
||||||
|
|
||||||
$status = !\is_dir($pdfDir) ? \mkdir($pdfDir, 0755, true) : true;
|
$status = !\is_dir($pdfDir) ? \mkdir($pdfDir, 0755, true) : true;
|
||||||
if ($status === false) {
|
if ($status === false) {
|
||||||
$response->set($request->uri->__toString(), new FormValidation($status));
|
$response->set($request->uri->__toString(), new FormValidation(['status' => $status]));
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -293,6 +293,7 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$view->addData('currentCustomerRegion', $currentCustomerRegion);
|
$view->addData('currentCustomerRegion', $currentCustomerRegion);
|
||||||
|
|
||||||
|
$annualCustomerRegion = [];
|
||||||
for ($i = 1; $i < 11; ++$i) {
|
for ($i = 1; $i < 11; ++$i) {
|
||||||
$annualCustomerRegion[] = [
|
$annualCustomerRegion[] = [
|
||||||
'year' => 2020 - 10 + $i,
|
'year' => 2020 - 10 + $i,
|
||||||
|
|
@ -355,6 +356,7 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$view->addData('currentCustomerRegion', $currentCustomerRegion);
|
$view->addData('currentCustomerRegion', $currentCustomerRegion);
|
||||||
|
|
||||||
|
$annualCustomerRegion = [];
|
||||||
for ($i = 1; $i < 11; ++$i) {
|
for ($i = 1; $i < 11; ++$i) {
|
||||||
$annualCustomerRegion[] = [
|
$annualCustomerRegion[] = [
|
||||||
'year' => 2020 - 10 + $i,
|
'year' => 2020 - 10 + $i,
|
||||||
|
|
@ -378,7 +380,9 @@ final class BackendController extends Controller
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
\uasort($currentCustomersRep, function($a, $b) { return $b['customers'] <=> $a['customers']; });
|
\uasort($currentCustomersRep, function($a, $b) {
|
||||||
|
return $b['customers'] <=> $a['customers'];
|
||||||
|
});
|
||||||
|
|
||||||
$view->addData('currentCustomersRep', $currentCustomersRep);
|
$view->addData('currentCustomersRep', $currentCustomersRep);
|
||||||
|
|
||||||
|
|
@ -405,7 +409,9 @@ final class BackendController extends Controller
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
\uasort($currentCustomersCountry, function($a, $b) { return $b['customers'] <=> $a['customers']; });
|
\uasort($currentCustomersCountry, function($a, $b) {
|
||||||
|
return $b['customers'] <=> $a['customers'];
|
||||||
|
});
|
||||||
|
|
||||||
$view->addData('currentCustomersCountry', $currentCustomersCountry);
|
$view->addData('currentCustomersCountry', $currentCustomersCountry);
|
||||||
|
|
||||||
|
|
@ -501,6 +507,7 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$view->addData('currentCustomerRegion', $currentCustomerRegion);
|
$view->addData('currentCustomerRegion', $currentCustomerRegion);
|
||||||
|
|
||||||
|
$annualCustomerRegion = [];
|
||||||
for ($i = 1; $i < 11; ++$i) {
|
for ($i = 1; $i < 11; ++$i) {
|
||||||
$annualCustomerRegion[] = [
|
$annualCustomerRegion[] = [
|
||||||
'year' => 2020 - 10 + $i,
|
'year' => 2020 - 10 + $i,
|
||||||
|
|
@ -524,7 +531,9 @@ final class BackendController extends Controller
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
\uasort($currentCustomersRep, function($a, $b) { return $b['customers'] <=> $a['customers']; });
|
\uasort($currentCustomersRep, function($a, $b) {
|
||||||
|
return $b['customers'] <=> $a['customers'];
|
||||||
|
});
|
||||||
|
|
||||||
$view->addData('currentCustomersRep', $currentCustomersRep);
|
$view->addData('currentCustomersRep', $currentCustomersRep);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,9 +55,7 @@ class Bill implements \JsonSerializable
|
||||||
* @var int|BillType
|
* @var int|BillType
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public int |
|
public int|BillType $type = 0;
|
||||||
|
|
||||||
BillType $type = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bill status.
|
* Bill status.
|
||||||
|
|
|
||||||
|
|
@ -91,9 +91,7 @@ class BillElement implements \JsonSerializable
|
||||||
*/
|
*/
|
||||||
public int $promotion = 0;
|
public int $promotion = 0;
|
||||||
|
|
||||||
public int |
|
public int|Bill $bill = 0;
|
||||||
|
|
||||||
Bill $bill = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
|
|
||||||
|
|
@ -43,9 +43,7 @@ class BillType
|
||||||
*
|
*
|
||||||
* @var string|BillTypeL11n
|
* @var string|BillTypeL11n
|
||||||
*/
|
*/
|
||||||
protected string |
|
protected string|BillTypeL11n $l11n;
|
||||||
|
|
||||||
BillTypeL11n $l11n;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,7 @@ class BillTypeL11n implements \JsonSerializable, ArrayableInterface
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int |
|
protected int|BillType $type = 0;
|
||||||
|
|
||||||
BillType $type = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Language.
|
* Language.
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": ">=9.4",
|
"phpunit/phpunit": ">=9.4",
|
||||||
"friendsofphp/php-cs-fixer": ">=3.0",
|
"friendsofphp/php-cs-fixer": ">=3.0",
|
||||||
"squizlabs/php_codesniffer": ">=3.5",
|
"squizlabs/php_codesniffer": ">=3.6",
|
||||||
"phpmd/phpmd": ">=2.9",
|
"phpmd/phpmd": ">=2.9",
|
||||||
"phpstan/phpstan": ">=0.12.58",
|
"phpstan/phpstan": ">=0.12.58",
|
||||||
"phan/phan": ">=3.2.6"
|
"phan/phan": ">=3.2.6"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user