mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-01-28 23:38:40 +00:00
rename module constants and fix some unit test bugs
This commit is contained in:
parent
e70b45551f
commit
3928fbd1a3
|
|
@ -23,7 +23,7 @@ return [
|
|||
'dest' => '\Modules\Billing\Controller\BackendController:viewBillingSalesInvoiceCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionState::SALES_INVOICE,
|
||||
],
|
||||
|
|
@ -34,7 +34,7 @@ return [
|
|||
'dest' => '\Modules\Billing\Controller\BackendController:viewBillingSalesList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::SALES_INVOICE,
|
||||
],
|
||||
|
|
@ -45,7 +45,7 @@ return [
|
|||
'dest' => '\Modules\Billing\Controller\BackendController:viewBillingSalesInvoice',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::SALES_INVOICE,
|
||||
],
|
||||
|
|
@ -56,7 +56,7 @@ return [
|
|||
'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseInvoiceCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionState::PURCHASE_INVOICE,
|
||||
],
|
||||
|
|
@ -67,7 +67,7 @@ return [
|
|||
'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::PURCHASE_INVOICE,
|
||||
],
|
||||
|
|
@ -78,7 +78,7 @@ return [
|
|||
'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseInvoice',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::SALES_INVOICE,
|
||||
],
|
||||
|
|
@ -89,7 +89,7 @@ return [
|
|||
'dest' => '\Modules\Billing\Controller\BackendController:viewBillingStockInvoiceCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionState::PURCHASE_INVOICE,
|
||||
],
|
||||
|
|
@ -100,7 +100,7 @@ return [
|
|||
'dest' => '\Modules\Billing\Controller\BackendController:viewBillingStockList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::PURCHASE_INVOICE,
|
||||
],
|
||||
|
|
@ -111,7 +111,7 @@ return [
|
|||
'dest' => '\Modules\Billing\Controller\BackendController:viewBillingStockInvoice',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::SALES_INVOICE,
|
||||
],
|
||||
|
|
@ -122,7 +122,7 @@ return [
|
|||
'dest' => '\Modules\Billing\Controller\BackendController:viewBillAnalysis',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::SALES_INVOICE,
|
||||
],
|
||||
|
|
@ -133,7 +133,7 @@ return [
|
|||
'dest' => '\Modules\Billing\Controller\BackendController:viewSalesRepAnalysis',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::SALES_ANALYSIS,
|
||||
],
|
||||
|
|
@ -144,7 +144,7 @@ return [
|
|||
'dest' => '\Modules\Billing\Controller\BackendController:viewRegionAnalysis',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::SALES_ANALYSIS,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ final class ApiController extends Controller
|
|||
|
||||
$bill = BillMapper::get($request->getData('bill'));
|
||||
|
||||
$defaultTemplate = $this->app->appSettings->get(null, 'default_template', null, self::MODULE_NAME);
|
||||
$defaultTemplate = $this->app->appSettings->get(null, 'default_template', null, self::NAME);
|
||||
$template = CollectionMapper::get((int) $defaultTemplate['content']);
|
||||
|
||||
$pdfDir = __DIR__ . '/../../../Modules/Media/Files/Modules/Billing/Bills/'
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_PATH = __DIR__ . '/../';
|
||||
public const PATH = __DIR__ . '/../';
|
||||
|
||||
/**
|
||||
* Module version.
|
||||
|
|
@ -41,7 +41,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_VERSION = '1.0.0';
|
||||
public const VERSION = '1.0.0';
|
||||
|
||||
/**
|
||||
* Module name.
|
||||
|
|
@ -49,7 +49,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_NAME = 'Billing';
|
||||
public const NAME = 'Billing';
|
||||
|
||||
/**
|
||||
* Module id.
|
||||
|
|
@ -57,7 +57,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_ID = 1005100000;
|
||||
public const ID = 1005100000;
|
||||
|
||||
/**
|
||||
* Providing.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user