mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-01-29 07:48:40 +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;
|
||||
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;
|
||||
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ final class BackendController extends Controller
|
|||
|
||||
$view->addData('currentCustomerRegion', $currentCustomerRegion);
|
||||
|
||||
$annualCustomerRegion = [];
|
||||
for ($i = 1; $i < 11; ++$i) {
|
||||
$annualCustomerRegion[] = [
|
||||
'year' => 2020 - 10 + $i,
|
||||
|
|
@ -355,6 +356,7 @@ final class BackendController extends Controller
|
|||
|
||||
$view->addData('currentCustomerRegion', $currentCustomerRegion);
|
||||
|
||||
$annualCustomerRegion = [];
|
||||
for ($i = 1; $i < 11; ++$i) {
|
||||
$annualCustomerRegion[] = [
|
||||
'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);
|
||||
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
@ -501,6 +507,7 @@ final class BackendController extends Controller
|
|||
|
||||
$view->addData('currentCustomerRegion', $currentCustomerRegion);
|
||||
|
||||
$annualCustomerRegion = [];
|
||||
for ($i = 1; $i < 11; ++$i) {
|
||||
$annualCustomerRegion[] = [
|
||||
'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);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,9 +55,7 @@ class Bill implements \JsonSerializable
|
|||
* @var int|BillType
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public int |
|
||||
|
||||
BillType $type = 0;
|
||||
public int|BillType $type = 0;
|
||||
|
||||
/**
|
||||
* Bill status.
|
||||
|
|
|
|||
|
|
@ -91,9 +91,7 @@ class BillElement implements \JsonSerializable
|
|||
*/
|
||||
public int $promotion = 0;
|
||||
|
||||
public int |
|
||||
|
||||
Bill $bill = 0;
|
||||
public int|Bill $bill = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
|
|||
|
|
@ -43,9 +43,7 @@ class BillType
|
|||
*
|
||||
* @var string|BillTypeL11n
|
||||
*/
|
||||
protected string |
|
||||
|
||||
BillTypeL11n $l11n;
|
||||
protected string|BillTypeL11n $l11n;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
|
|||
|
|
@ -41,9 +41,7 @@ class BillTypeL11n implements \JsonSerializable, ArrayableInterface
|
|||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected int |
|
||||
|
||||
BillType $type = 0;
|
||||
protected int|BillType $type = 0;
|
||||
|
||||
/**
|
||||
* Language.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
"require-dev": {
|
||||
"phpunit/phpunit": ">=9.4",
|
||||
"friendsofphp/php-cs-fixer": ">=3.0",
|
||||
"squizlabs/php_codesniffer": ">=3.5",
|
||||
"squizlabs/php_codesniffer": ">=3.6",
|
||||
"phpmd/phpmd": ">=2.9",
|
||||
"phpstan/phpstan": ">=0.12.58",
|
||||
"phan/phan": ">=3.2.6"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user