diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6dcd721..e8d598e 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: - name: Setup Composer run: composer install - name: Autoformat - run: 'vendor/bin/php-cs-fixer fix ./ --rules=''{"array_syntax": {"syntax": "short"}, "blank_line_after_namespace": true, "global_namespace_import": {"import_classes": false, "import_constants": false, "import_functions": false}, "binary_operator_spaces": {"operators": {"=": "align", ".=": "align", "+=": "align", "-=": "align", "*=": "align", "/=": "align", "|=": "align", "&=": "align", "=>": "align", "??=": "align"}}, "cast_spaces": {"space": "single"}, "class_attributes_separation": { "elements": {"const": "one", "method": "one", "property": "one"} }, "combine_consecutive_issets": true, "compact_nullable_typehint": true, "declare_strict_types": true, "declare_equal_normalize": {"space": "none"}, "elseif": true, "encoding": true, "explicit_indirect_variable": true, "explicit_string_variable": true, "function_to_constant": true, "implode_call": true, "increment_style": {"style": "pre"}, "is_null": true, "yoda_style": {"equal": false, "identical": false, "less_and_greater": false}, "line_ending": true, "logical_operators": true, "lowercase_cast": true, "constant_case": {"case": "lower"}, "lowercase_keywords": true, "modernize_types_casting": true, "native_constant_invocation": true, "native_function_casing": true, "native_function_invocation": {"include": ["@all"]}, "new_with_braces": true, "no_extra_blank_lines": {"tokens": ["break", "case", "continue", "curly_brace_block", "extra", "return", "switch", "throw", "use"]}, "no_spaces_after_function_name": true, "no_alias_functions": true, "no_closing_tag": true, "no_empty_comment": true, "no_empty_phpdoc": true, "no_empty_statement": true, "no_homoglyph_names": true, "no_mixed_echo_print": {"use": "echo"}, "no_php4_constructor": true, "no_singleline_whitespace_before_semicolons": true, "no_spaces_inside_parenthesis": true, "no_trailing_whitespace": true, "no_unneeded_final_method": true, "no_unused_imports": true, "no_useless_return": true, "no_whitespace_before_comma_in_array": true, "no_whitespace_in_blank_line": true, "non_printable_character": true, "normalize_index_brace": true, "ordered_imports": {"sort_algorithm": "alpha"}, "ordered_interfaces": {"order": "alpha"}, "php_unit_construct": true, "php_unit_internal_class": true, "php_unit_set_up_tear_down_visibility": true, "phpdoc_indent": true, "phpdoc_align": {"align": "vertical"}, "phpdoc_annotation_without_dot": true, "phpdoc_scalar": true, "phpdoc_return_self_reference": {"replacements": {"this": "self"}}, "phpdoc_trim": true, "phpdoc_trim_consecutive_blank_line_separation": true, "random_api_migration": true, "self_accessor": true, "return_type_declaration": {"space_before": "one"}, "semicolon_after_instruction": true, "set_type_to_cast": true, "short_scalar_cast": true, "single_blank_line_at_eof": true, "single_line_after_imports": true, "standardize_increment": true, "trailing_comma_in_multiline": true, "trim_array_spaces": true, "visibility_required": true, "void_return": true}'' --allow-risky=yes' + run: 'vendor/bin/php-cs-fixer fix ./ --rules=''{"array_syntax": {"syntax": "short"}, "blank_line_after_namespace": true, "global_namespace_import": {"import_classes": false, "import_constants": false, "import_functions": false}, "binary_operator_spaces": {"operators": {"=": "align", ".=": "align", "+=": "align", "-=": "align", "*=": "align", "/=": "align", "|=": "align", "&=": "align", "=>": "align", "??=": "align", ">>=": "align", "<<=": "align"}}, "cast_spaces": {"space": "single"}, "class_attributes_separation": { "elements": {"const": "one", "method": "one", "property": "one"} }, "combine_consecutive_issets": true, "compact_nullable_typehint": true, "declare_strict_types": true, "declare_equal_normalize": {"space": "none"}, "elseif": true, "encoding": true, "explicit_indirect_variable": true, "explicit_string_variable": true, "function_to_constant": true, "implode_call": true, "increment_style": {"style": "pre"}, "is_null": true, "yoda_style": {"equal": false, "identical": false, "less_and_greater": false}, "line_ending": true, "logical_operators": true, "lowercase_cast": true, "constant_case": {"case": "lower"}, "lowercase_keywords": true, "modernize_types_casting": true, "native_constant_invocation": true, "native_function_casing": true, "native_function_invocation": {"include": ["@all"]}, "new_with_braces": true, "no_extra_blank_lines": {"tokens": ["break", "case", "continue", "curly_brace_block", "extra", "return", "switch", "throw", "use"]}, "no_spaces_after_function_name": true, "no_alias_functions": true, "no_closing_tag": true, "no_empty_comment": true, "no_empty_phpdoc": true, "no_empty_statement": true, "no_homoglyph_names": true, "no_mixed_echo_print": {"use": "echo"}, "no_php4_constructor": true, "no_singleline_whitespace_before_semicolons": true, "no_spaces_inside_parenthesis": true, "no_trailing_whitespace": true, "no_unneeded_final_method": true, "no_unused_imports": true, "no_useless_return": true, "no_whitespace_before_comma_in_array": true, "no_whitespace_in_blank_line": true, "non_printable_character": true, "normalize_index_brace": true, "ordered_imports": {"sort_algorithm": "alpha"}, "ordered_interfaces": {"order": "alpha"}, "php_unit_construct": true, "php_unit_internal_class": true, "php_unit_set_up_tear_down_visibility": true, "phpdoc_indent": true, "phpdoc_align": {"align": "vertical"}, "phpdoc_annotation_without_dot": true, "phpdoc_scalar": true, "phpdoc_return_self_reference": {"replacements": {"this": "self"}}, "phpdoc_trim": true, "phpdoc_trim_consecutive_blank_line_separation": true, "random_api_migration": true, "self_accessor": true, "return_type_declaration": {"space_before": "one"}, "semicolon_after_instruction": true, "set_type_to_cast": true, "short_scalar_cast": true, "single_blank_line_at_eof": true, "single_line_after_imports": true, "standardize_increment": true, "trailing_comma_in_multiline": true, "trim_array_spaces": true, "visibility_required": true, "void_return": true}'' --allow-risky=yes' - name: Check for modified files id: git-check run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) diff --git a/Admin/Install/Media.php b/Admin/Install/Media.php index 1f62780..2b9e66c 100755 --- a/Admin/Install/Media.php +++ b/Admin/Install/Media.php @@ -46,20 +46,20 @@ class Media [ 'data' => [ [ - 'type' => 'setting', - 'name' => SettingsEnum::PREVIEW_MEDIA_TYPE, + 'type' => 'setting', + 'name' => SettingsEnum::PREVIEW_MEDIA_TYPE, 'content' => (string) $media['type'][0]['id'], 'pattern' => '\\d+', - 'module' => 'Billing' + 'module' => 'Billing', ], [ - 'type' => 'setting', - 'name' => SettingsEnum::ORIGINAL_MEDIA_TYPE, + 'type' => 'setting', + 'name' => SettingsEnum::ORIGINAL_MEDIA_TYPE, 'content' => (string) $media['type'][1]['id'], 'pattern' => '\\d+', - 'module' => 'Billing' - ] - ] + 'module' => 'Billing', + ], + ], ] ); } diff --git a/Admin/Install/Media/bill.pdf.php b/Admin/Install/Media/bill.pdf.php index a58f283..c6838dc 100755 --- a/Admin/Install/Media/bill.pdf.php +++ b/Admin/Install/Media/bill.pdf.php @@ -44,21 +44,21 @@ $pdf->setKeywords(\implode(', ', $this->getData('keywords') ?? [])); $pdf->language = $bill->getLanguage(); $pdf->attributes['legal_name'] = $this->getData('legal_company_name') ?? 'Jingga e.K.'; -$pdf->attributes['address'] = $this->getData('bill_company_address') ?? 'Gartenstr. 26'; -$pdf->attributes['city'] = $this->getData('bill_company_city') ?? '61206 Woellstadt'; +$pdf->attributes['address'] = $this->getData('bill_company_address') ?? 'Gartenstr. 26'; +$pdf->attributes['city'] = $this->getData('bill_company_city') ?? '61206 Woellstadt'; -$pdf->attributes['ceo'] = $this->getData('bill_company_ceo') ?? 'Dennis Eichhorn'; +$pdf->attributes['ceo'] = $this->getData('bill_company_ceo') ?? 'Dennis Eichhorn'; $pdf->attributes['tax_office'] = $this->getData('bill_company_tax_office') ?? 'HRB ???'; $pdf->attributes['tax_number'] = $this->getData('bill_company_tax_id') ?? '123456789'; -$pdf->attributes['terms'] = $this->getData('bill_company_terms') ?? 'https://jingga.app/terms'; +$pdf->attributes['terms'] = $this->getData('bill_company_terms') ?? 'https://jingga.app/terms'; -$pdf->attributes['bank_name'] = $this->getData('bill_company_bank_name') ?? 'Volksbank Mittelhessen'; -$pdf->attributes['swift'] = $this->getData('bill_company_swift') ?? '.....'; +$pdf->attributes['bank_name'] = $this->getData('bill_company_bank_name') ?? 'Volksbank Mittelhessen'; +$pdf->attributes['swift'] = $this->getData('bill_company_swift') ?? '.....'; $pdf->attributes['bank_account'] = $this->getData('bill_company_bank_account') ?? '.....'; $pdf->attributes['website'] = $this->getData('bill_company_website') ?? 'www.jingga.app'; -$pdf->attributes['email'] = $this->getData('bill_company_email') ?? 'info@jingga.app'; -$pdf->attributes['phone'] = $this->getData('bill_company_phone') ?? '+49 0152 ????'; +$pdf->attributes['email'] = $this->getData('bill_company_email') ?? 'info@jingga.app'; +$pdf->attributes['phone'] = $this->getData('bill_company_phone') ?? '+49 0152 ????'; $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); @@ -162,14 +162,14 @@ $header = [ $lang[$pdf->language]['Item'], $lang[$pdf->language]['Quantity'], $lang[$pdf->language]['UnitPrice'], - $lang[$pdf->language]['Total'] + $lang[$pdf->language]['Total'], ]; $lines = $bill->getElements(); // Header $headerCount = \count($header); -$w = [$pdf->getPageWidth() - 20 - 20 - 20 - 2*15, 20, 20, 20]; +$w = [$pdf->getPageWidth() - 20 - 20 - 20 - 2 * 15, 20, 20, 20]; $pdf->setCellPadding(1, 1, 1, 1); @@ -209,7 +209,7 @@ foreach($lines as $line) { $height = $pdf->getY() - $tempY; $singleSalesPriceNet = Money::fromFloatInt($line->singleSalesPriceNet); - $totalSalesPriceNet = Money::fromFloatInt($line->totalSalesPriceNet); + $totalSalesPriceNet = Money::fromFloatInt($line->totalSalesPriceNet); $pdf->MultiCell($w[1], $height, $line->getQuantity(), 0, 'L', $fill, 0, 15 + $w[0], $tempY, true, 0, false, true, 0, 'M', true); $pdf->MultiCell($w[2], $height, $singleSalesPriceNet->getCurrency(2, symbol: ''), 0, 'L', $fill, 0, 15 + $w[0] + $w[1], $tempY, true, 0, false, true, 0, 'M', true); diff --git a/Admin/Install/Messages.php b/Admin/Install/Messages.php index b447f3e..3ab6008 100755 --- a/Admin/Install/Messages.php +++ b/Admin/Install/Messages.php @@ -49,10 +49,10 @@ class Messages $settings = [ [ - 'id' => null, - 'name' => SettingsEnum::BILLING_CUSTOMER_EMAIL_TEMPLATE, + 'id' => null, + 'name' => SettingsEnum::BILLING_CUSTOMER_EMAIL_TEMPLATE, 'content' => (string) $messages['email_template'][0]['id'], - 'module' => 'Billing', + 'module' => 'Billing', ], ]; diff --git a/Admin/Installer.php b/Admin/Installer.php index 6d8145b..66c0966 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -14,7 +14,6 @@ declare(strict_types=1); namespace Modules\Billing\Admin; -use Modules\Attribute\Models\AttributeTypeMapper; use Modules\Billing\Models\BillTransferType; use Modules\ClientManagement\Models\ClientAttributeTypeMapper; use Modules\ItemManagement\Models\ItemAttributeTypeMapper; diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index a36354b..8eee6ee 100755 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -29,4 +29,4 @@ return [ ], ], ], -]; \ No newline at end of file +]; diff --git a/Controller/ApiBillController.php b/Controller/ApiBillController.php index 36517b6..ec23f4b 100755 --- a/Controller/ApiBillController.php +++ b/Controller/ApiBillController.php @@ -190,7 +190,7 @@ final class ApiBillController extends Controller * @param Client $client The client object for whom the bill is being created * @param RequestAbstract $request The request object that contains the header account * - * @return Bill The new Bill object with default values + * @return Bill The new Bill object with default values * * @todo Validate VAT before creation (maybe need to add a status when last validated, we don't want to validate every time) * @todo Set the correct date of payment diff --git a/Controller/ApiPriceController.php b/Controller/ApiPriceController.php index 3816be1..ee84ec1 100755 --- a/Controller/ApiPriceController.php +++ b/Controller/ApiPriceController.php @@ -134,7 +134,7 @@ final class ApiPriceController extends Controller $queryMapper->where('supplier', \array_unique([$request->getData('price_supplier', 'int'), null]), 'IN'); $queryMapper->where('unit', \array_unique([$request->getData('price_unit', 'int'), null]), 'IN'); $queryMapper->where('type', $request->getData('price_type', 'int') ?? PriceType::SALES); - $queryMapper->where('currency', array_unique([$request->getData('price_currency', 'int'), null]), 'IN'); + $queryMapper->where('currency', \array_unique([$request->getData('price_currency', 'int'), null]), 'IN'); // @todo: implement start and end diff --git a/Controller/ApiTaxController.php b/Controller/ApiTaxController.php index 2bff250..828f7c7 100755 --- a/Controller/ApiTaxController.php +++ b/Controller/ApiTaxController.php @@ -23,7 +23,6 @@ use Modules\Billing\Models\Tax\TaxCombination; use Modules\Billing\Models\Tax\TaxCombinationMapper; use Modules\ClientManagement\Models\Client; use Modules\ClientManagement\Models\ClientAttributeTypeMapper; -use Modules\Finance\Models\NullTaxCode; use Modules\Finance\Models\TaxCode; use Modules\Finance\Models\TaxCodeMapper; use Modules\ItemManagement\Models\Item; @@ -50,7 +49,7 @@ final class ApiTaxController extends Controller * * @param Client $client Client to get tax code from * @param Item $item Item toget tax code from - * @param string $defaultCountry Default country to use if no valid tax code could be found and if the unit country code shouldn't be used. + * @param string $defaultCountry default country to use if no valid tax code could be found and if the unit country code shouldn't be used * * @return TaxCode * @@ -184,7 +183,7 @@ final class ApiTaxController extends Controller * @param Client $client The client to get the tax code for * @param Address $taxOfficeAddress The tax office address used to determine the tax code * - * @return AttributeValue The client's tax code + * @return AttributeValue The client's tax code * * @since 1.0.0 */ diff --git a/Controller/CliController.php b/Controller/CliController.php index 6e0f04e..6ea2667 100755 --- a/Controller/CliController.php +++ b/Controller/CliController.php @@ -23,9 +23,7 @@ use Modules\SupplierManagement\Models\NullSupplier; use Modules\SupplierManagement\Models\Supplier; use Modules\SupplierManagement\Models\SupplierMapper; use phpOMS\Contract\RenderableInterface; -use phpOMS\Localization\ISO639x1Enum; use phpOMS\Localization\LanguageDetection\Language; -use phpOMS\Localization\Money; use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; use phpOMS\Stdlib\Base\FloatInt; @@ -374,7 +372,7 @@ final class CliController extends Controller if (\stripos($content, $supplier->account->name1) !== false && ((!empty($supplier->mainAddress->city) && \stripos($content, $supplier->mainAddress->city) !== false) - || (!empty( $supplier->mainAddress->address) + || (!empty($supplier->mainAddress->address) && \stripos($content, $supplier->mainAddress->address) !== false) ) ) { diff --git a/Models/Attribute/BillAttributeValueMapper.php b/Models/Attribute/BillAttributeValueMapper.php index 1dc9a9f..5af9109 100755 --- a/Models/Attribute/BillAttributeValueMapper.php +++ b/Models/Attribute/BillAttributeValueMapper.php @@ -37,14 +37,14 @@ final class BillAttributeValueMapper extends DataMapperFactory * @since 1.0.0 */ public const COLUMNS = [ - 'billing_attr_value_id' => ['name' => 'billing_attr_value_id', 'type' => 'int', 'internal' => 'id'], - 'billing_attr_value_default' => ['name' => 'billing_attr_value_default', 'type' => 'bool', 'internal' => 'isDefault'], - 'billing_attr_value_valueStr' => ['name' => 'billing_attr_value_valueStr', 'type' => 'string', 'internal' => 'valueStr'], - 'billing_attr_value_valueInt' => ['name' => 'billing_attr_value_valueInt', 'type' => 'int', 'internal' => 'valueInt'], - 'billing_attr_value_valueDec' => ['name' => 'billing_attr_value_valueDec', 'type' => 'float', 'internal' => 'valueDec'], - 'billing_attr_value_valueDat' => ['name' => 'billing_attr_value_valueDat', 'type' => 'DateTime', 'internal' => 'valueDat'], - 'billing_attr_value_unit' => ['name' => 'billing_attr_value_unit', 'type' => 'string', 'internal' => 'unit'], - 'billing_attr_value_deptype' => ['name' => 'billing_attr_value_deptype', 'type' => 'int', 'internal' => 'dependingAttributeType'], + 'billing_attr_value_id' => ['name' => 'billing_attr_value_id', 'type' => 'int', 'internal' => 'id'], + 'billing_attr_value_default' => ['name' => 'billing_attr_value_default', 'type' => 'bool', 'internal' => 'isDefault'], + 'billing_attr_value_valueStr' => ['name' => 'billing_attr_value_valueStr', 'type' => 'string', 'internal' => 'valueStr'], + 'billing_attr_value_valueInt' => ['name' => 'billing_attr_value_valueInt', 'type' => 'int', 'internal' => 'valueInt'], + 'billing_attr_value_valueDec' => ['name' => 'billing_attr_value_valueDec', 'type' => 'float', 'internal' => 'valueDec'], + 'billing_attr_value_valueDat' => ['name' => 'billing_attr_value_valueDat', 'type' => 'DateTime', 'internal' => 'valueDat'], + 'billing_attr_value_unit' => ['name' => 'billing_attr_value_unit', 'type' => 'string', 'internal' => 'unit'], + 'billing_attr_value_deptype' => ['name' => 'billing_attr_value_deptype', 'type' => 'int', 'internal' => 'dependingAttributeType'], 'billing_attr_value_depvalue' => ['name' => 'billing_attr_value_depvalue', 'type' => 'int', 'internal' => 'dependingAttributeValue'], ]; diff --git a/Models/Bill.php b/Models/Bill.php index 17912c7..39c9b67 100755 --- a/Models/Bill.php +++ b/Models/Bill.php @@ -19,8 +19,6 @@ use Modules\Admin\Models\NullAccount; use Modules\ClientManagement\Models\Client; use Modules\Editor\Models\EditorDoc; use Modules\Media\Models\Collection; -use Modules\Media\Models\Media; -use Modules\Media\Models\NullMedia; use Modules\SupplierManagement\Models\Supplier; use phpOMS\Localization\ISO4217CharEnum; use phpOMS\Localization\ISO639x1Enum; diff --git a/Models/BillElementMapper.php b/Models/BillElementMapper.php index 006c372..d30ca6e 100755 --- a/Models/BillElementMapper.php +++ b/Models/BillElementMapper.php @@ -65,8 +65,8 @@ final class BillElementMapper extends DataMapperFactory 'billing_bill_element_total_grosspurchaseprice' => ['name' => 'billing_bill_element_total_grosspurchaseprice', 'type' => 'Serializable', 'internal' => 'totalPurchasePriceGross'], 'billing_bill_element_bill' => ['name' => 'billing_bill_element_bill', 'type' => 'int', 'internal' => 'bill'], - 'billing_bill_element_tax_type' => ['name' => 'billing_bill_element_tax_type', 'type' => 'string', 'internal' => 'taxCode'], - 'billing_bill_element_tax_price' => ['name' => 'billing_bill_element_tax_price', 'type' => 'Serializable', 'internal' => 'taxP'], + 'billing_bill_element_tax_type' => ['name' => 'billing_bill_element_tax_type', 'type' => 'string', 'internal' => 'taxCode'], + 'billing_bill_element_tax_price' => ['name' => 'billing_bill_element_tax_price', 'type' => 'Serializable', 'internal' => 'taxP'], 'billing_bill_element_tax_percentage' => ['name' => 'billing_bill_element_tax_percentage', 'type' => 'Serializable', 'internal' => 'taxR'], ]; diff --git a/Models/BillMapper.php b/Models/BillMapper.php index 2fcd066..7b7b10a 100755 --- a/Models/BillMapper.php +++ b/Models/BillMapper.php @@ -45,55 +45,55 @@ class BillMapper extends DataMapperFactory * @since 1.0.0 */ public const COLUMNS = [ - 'billing_bill_id' => ['name' => 'billing_bill_id', 'type' => 'int', 'internal' => 'id'], - 'billing_bill_sequence' => ['name' => 'billing_bill_sequence', 'type' => 'int', 'internal' => 'sequence'], - 'billing_bill_number' => ['name' => 'billing_bill_number', 'type' => 'string', 'internal' => 'number'], - 'billing_bill_type' => ['name' => 'billing_bill_type', 'type' => 'int', 'internal' => 'type'], - 'billing_bill_template' => ['name' => 'billing_bill_template', 'type' => 'int', 'internal' => 'template'], - 'billing_bill_header' => ['name' => 'billing_bill_header', 'type' => 'string', 'internal' => 'header'], - 'billing_bill_footer' => ['name' => 'billing_bill_footer', 'type' => 'string', 'internal' => 'footer'], - 'billing_bill_info' => ['name' => 'billing_bill_info', 'type' => 'string', 'internal' => 'info'], - 'billing_bill_status' => ['name' => 'billing_bill_status', 'type' => 'int', 'internal' => 'status'], + 'billing_bill_id' => ['name' => 'billing_bill_id', 'type' => 'int', 'internal' => 'id'], + 'billing_bill_sequence' => ['name' => 'billing_bill_sequence', 'type' => 'int', 'internal' => 'sequence'], + 'billing_bill_number' => ['name' => 'billing_bill_number', 'type' => 'string', 'internal' => 'number'], + 'billing_bill_type' => ['name' => 'billing_bill_type', 'type' => 'int', 'internal' => 'type'], + 'billing_bill_template' => ['name' => 'billing_bill_template', 'type' => 'int', 'internal' => 'template'], + 'billing_bill_header' => ['name' => 'billing_bill_header', 'type' => 'string', 'internal' => 'header'], + 'billing_bill_footer' => ['name' => 'billing_bill_footer', 'type' => 'string', 'internal' => 'footer'], + 'billing_bill_info' => ['name' => 'billing_bill_info', 'type' => 'string', 'internal' => 'info'], + 'billing_bill_status' => ['name' => 'billing_bill_status', 'type' => 'int', 'internal' => 'status'], 'billing_bill_paymentstatus' => ['name' => 'billing_bill_paymentstatus', 'type' => 'int', 'internal' => 'paymentStatus'], - 'billing_bill_shipTo' => ['name' => 'billing_bill_shipTo', 'type' => 'string', 'internal' => 'shipTo'], - 'billing_bill_shipFAO' => ['name' => 'billing_bill_shipFAO', 'type' => 'string', 'internal' => 'shipFAO'], - 'billing_bill_shipAddr' => ['name' => 'billing_bill_shipAddr', 'type' => 'string', 'internal' => 'shipAddress'], - 'billing_bill_shipCity' => ['name' => 'billing_bill_shipCity', 'type' => 'string', 'internal' => 'shipCity'], - 'billing_bill_shipZip' => ['name' => 'billing_bill_shipZip', 'type' => 'string', 'internal' => 'shipZip'], - 'billing_bill_shipCountry' => ['name' => 'billing_bill_shipCountry', 'type' => 'string', 'internal' => 'shipCountry'], - 'billing_bill_billTo' => ['name' => 'billing_bill_billTo', 'type' => 'string', 'internal' => 'billTo'], - 'billing_bill_billFAO' => ['name' => 'billing_bill_billFAO', 'type' => 'string', 'internal' => 'billFAO'], - 'billing_bill_billAddr' => ['name' => 'billing_bill_billAddr', 'type' => 'string', 'internal' => 'billAddress'], - 'billing_bill_billCity' => ['name' => 'billing_bill_billCity', 'type' => 'string', 'internal' => 'billCity'], - 'billing_bill_billZip' => ['name' => 'billing_bill_billZip', 'type' => 'string', 'internal' => 'billZip'], - 'billing_bill_billCountry' => ['name' => 'billing_bill_billCountry', 'type' => 'string', 'internal' => 'billCountry'], - 'billing_bill_netprofit' => ['name' => 'billing_bill_netprofit', 'type' => 'Serializable', 'internal' => 'netProfit'], - 'billing_bill_grossprofit' => ['name' => 'billing_bill_grossprofit', 'type' => 'Serializable', 'internal' => 'grossProfit'], - 'billing_bill_netcosts' => ['name' => 'billing_bill_netcosts', 'type' => 'Serializable', 'internal' => 'netCosts'], - 'billing_bill_grosscosts' => ['name' => 'billing_bill_grosscosts', 'type' => 'Serializable', 'internal' => 'grossCosts'], - 'billing_bill_netsales' => ['name' => 'billing_bill_netsales', 'type' => 'Serializable', 'internal' => 'netSales'], - 'billing_bill_grosssales' => ['name' => 'billing_bill_grosssales', 'type' => 'Serializable', 'internal' => 'grossSales'], - 'billing_bill_netdiscount' => ['name' => 'billing_bill_netdiscount', 'type' => 'Serializable', 'internal' => 'netDiscount'], - 'billing_bill_grossdiscount' => ['name' => 'billing_bill_grossdiscount', 'type' => 'Serializable', 'internal' => 'grossDiscount'], - 'billing_bill_currency' => ['name' => 'billing_bill_currency', 'type' => 'string', 'internal' => 'currency'], - 'billing_bill_language' => ['name' => 'billing_bill_language', 'type' => 'string', 'internal' => 'language'], - 'billing_bill_referral' => ['name' => 'billing_bill_referral', 'type' => 'int', 'internal' => 'referral'], - 'billing_bill_referral_name' => ['name' => 'billing_bill_referral_name', 'type' => 'string', 'internal' => 'referralName'], - 'billing_bill_reference' => ['name' => 'billing_bill_reference', 'type' => 'int', 'internal' => 'reference'], - 'billing_bill_payment' => ['name' => 'billing_bill_payment', 'type' => 'int', 'internal' => 'payment'], - 'billing_bill_payment_text' => ['name' => 'billing_bill_payment_text', 'type' => 'string', 'internal' => 'paymentText'], - 'billing_bill_paymentterms' => ['name' => 'billing_bill_paymentterms', 'type' => 'int', 'internal' => 'terms'], - 'billing_bill_paymentterms_text' => ['name' => 'billing_bill_paymentterms_text', 'type' => 'string', 'internal' => 'termsText'], - 'billing_bill_ship_type' => ['name' => 'billing_bill_ship_type', 'type' => 'int', 'internal' => 'shipping'], - 'billing_bill_ship_text' => ['name' => 'billing_bill_ship_text', 'type' => 'string', 'internal' => 'shippingText'], - 'billing_bill_account_no' => ['name' => 'billing_bill_account_no', 'type' => 'string', 'internal' => 'accountNumber'], - 'billing_bill_client' => ['name' => 'billing_bill_client', 'type' => 'int', 'internal' => 'client'], - 'billing_bill_supplier' => ['name' => 'billing_bill_supplier', 'type' => 'int', 'internal' => 'supplier'], - 'billing_bill_created_by' => ['name' => 'billing_bill_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], - 'billing_bill_date' => ['name' => 'billing_bill_date', 'type' => 'DateTime', 'internal' => 'billDate'], - 'billing_bill_performance_date' => ['name' => 'billing_bill_performance_date', 'type' => 'DateTime', 'internal' => 'performanceDate', 'readonly' => true], - 'billing_bill_created_at' => ['name' => 'billing_bill_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], - 'billing_bill_unit' => ['name' => 'billing_bill_unit', 'type' => 'int', 'internal' => 'unit'], + 'billing_bill_shipTo' => ['name' => 'billing_bill_shipTo', 'type' => 'string', 'internal' => 'shipTo'], + 'billing_bill_shipFAO' => ['name' => 'billing_bill_shipFAO', 'type' => 'string', 'internal' => 'shipFAO'], + 'billing_bill_shipAddr' => ['name' => 'billing_bill_shipAddr', 'type' => 'string', 'internal' => 'shipAddress'], + 'billing_bill_shipCity' => ['name' => 'billing_bill_shipCity', 'type' => 'string', 'internal' => 'shipCity'], + 'billing_bill_shipZip' => ['name' => 'billing_bill_shipZip', 'type' => 'string', 'internal' => 'shipZip'], + 'billing_bill_shipCountry' => ['name' => 'billing_bill_shipCountry', 'type' => 'string', 'internal' => 'shipCountry'], + 'billing_bill_billTo' => ['name' => 'billing_bill_billTo', 'type' => 'string', 'internal' => 'billTo'], + 'billing_bill_billFAO' => ['name' => 'billing_bill_billFAO', 'type' => 'string', 'internal' => 'billFAO'], + 'billing_bill_billAddr' => ['name' => 'billing_bill_billAddr', 'type' => 'string', 'internal' => 'billAddress'], + 'billing_bill_billCity' => ['name' => 'billing_bill_billCity', 'type' => 'string', 'internal' => 'billCity'], + 'billing_bill_billZip' => ['name' => 'billing_bill_billZip', 'type' => 'string', 'internal' => 'billZip'], + 'billing_bill_billCountry' => ['name' => 'billing_bill_billCountry', 'type' => 'string', 'internal' => 'billCountry'], + 'billing_bill_netprofit' => ['name' => 'billing_bill_netprofit', 'type' => 'Serializable', 'internal' => 'netProfit'], + 'billing_bill_grossprofit' => ['name' => 'billing_bill_grossprofit', 'type' => 'Serializable', 'internal' => 'grossProfit'], + 'billing_bill_netcosts' => ['name' => 'billing_bill_netcosts', 'type' => 'Serializable', 'internal' => 'netCosts'], + 'billing_bill_grosscosts' => ['name' => 'billing_bill_grosscosts', 'type' => 'Serializable', 'internal' => 'grossCosts'], + 'billing_bill_netsales' => ['name' => 'billing_bill_netsales', 'type' => 'Serializable', 'internal' => 'netSales'], + 'billing_bill_grosssales' => ['name' => 'billing_bill_grosssales', 'type' => 'Serializable', 'internal' => 'grossSales'], + 'billing_bill_netdiscount' => ['name' => 'billing_bill_netdiscount', 'type' => 'Serializable', 'internal' => 'netDiscount'], + 'billing_bill_grossdiscount' => ['name' => 'billing_bill_grossdiscount', 'type' => 'Serializable', 'internal' => 'grossDiscount'], + 'billing_bill_currency' => ['name' => 'billing_bill_currency', 'type' => 'string', 'internal' => 'currency'], + 'billing_bill_language' => ['name' => 'billing_bill_language', 'type' => 'string', 'internal' => 'language'], + 'billing_bill_referral' => ['name' => 'billing_bill_referral', 'type' => 'int', 'internal' => 'referral'], + 'billing_bill_referral_name' => ['name' => 'billing_bill_referral_name', 'type' => 'string', 'internal' => 'referralName'], + 'billing_bill_reference' => ['name' => 'billing_bill_reference', 'type' => 'int', 'internal' => 'reference'], + 'billing_bill_payment' => ['name' => 'billing_bill_payment', 'type' => 'int', 'internal' => 'payment'], + 'billing_bill_payment_text' => ['name' => 'billing_bill_payment_text', 'type' => 'string', 'internal' => 'paymentText'], + 'billing_bill_paymentterms' => ['name' => 'billing_bill_paymentterms', 'type' => 'int', 'internal' => 'terms'], + 'billing_bill_paymentterms_text' => ['name' => 'billing_bill_paymentterms_text', 'type' => 'string', 'internal' => 'termsText'], + 'billing_bill_ship_type' => ['name' => 'billing_bill_ship_type', 'type' => 'int', 'internal' => 'shipping'], + 'billing_bill_ship_text' => ['name' => 'billing_bill_ship_text', 'type' => 'string', 'internal' => 'shippingText'], + 'billing_bill_account_no' => ['name' => 'billing_bill_account_no', 'type' => 'string', 'internal' => 'accountNumber'], + 'billing_bill_client' => ['name' => 'billing_bill_client', 'type' => 'int', 'internal' => 'client'], + 'billing_bill_supplier' => ['name' => 'billing_bill_supplier', 'type' => 'int', 'internal' => 'supplier'], + 'billing_bill_created_by' => ['name' => 'billing_bill_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], + 'billing_bill_date' => ['name' => 'billing_bill_date', 'type' => 'DateTime', 'internal' => 'billDate'], + 'billing_bill_performance_date' => ['name' => 'billing_bill_performance_date', 'type' => 'DateTime', 'internal' => 'performanceDate', 'readonly' => true], + 'billing_bill_created_at' => ['name' => 'billing_bill_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], + 'billing_bill_unit' => ['name' => 'billing_bill_unit', 'type' => 'int', 'internal' => 'unit'], ]; /** diff --git a/Models/BillTypeMapper.php b/Models/BillTypeMapper.php index 0aa9f36..8949757 100755 --- a/Models/BillTypeMapper.php +++ b/Models/BillTypeMapper.php @@ -37,14 +37,14 @@ final class BillTypeMapper extends DataMapperFactory * @since 1.0.0 */ public const COLUMNS = [ - 'billing_type_id' => ['name' => 'billing_type_id', 'type' => 'int', 'internal' => 'id'], - 'billing_type_name' => ['name' => 'billing_type_name', 'type' => 'string', 'internal' => 'name'], - 'billing_type_number_format' => ['name' => 'billing_type_number_format', 'type' => 'string', 'internal' => 'numberFormat'], - 'billing_type_account_format' => ['name' => 'billing_type_account_format', 'type' => 'string', 'internal' => 'accountFormat'], - 'billing_type_transfer_type' => ['name' => 'billing_type_transfer_type', 'type' => 'int', 'internal' => 'transferType'], + 'billing_type_id' => ['name' => 'billing_type_id', 'type' => 'int', 'internal' => 'id'], + 'billing_type_name' => ['name' => 'billing_type_name', 'type' => 'string', 'internal' => 'name'], + 'billing_type_number_format' => ['name' => 'billing_type_number_format', 'type' => 'string', 'internal' => 'numberFormat'], + 'billing_type_account_format' => ['name' => 'billing_type_account_format', 'type' => 'string', 'internal' => 'accountFormat'], + 'billing_type_transfer_type' => ['name' => 'billing_type_transfer_type', 'type' => 'int', 'internal' => 'transferType'], 'billing_type_default_template' => ['name' => 'billing_type_default_template', 'type' => 'int', 'internal' => 'defaultTemplate'], - 'billing_type_transfer_stock' => ['name' => 'billing_type_transfer_stock', 'type' => 'bool', 'internal' => 'transferStock'], - 'billing_type_is_template' => ['name' => 'billing_type_is_template', 'type' => 'bool', 'internal' => 'isTemplate'], + 'billing_type_transfer_stock' => ['name' => 'billing_type_transfer_stock', 'type' => 'bool', 'internal' => 'transferStock'], + 'billing_type_is_template' => ['name' => 'billing_type_is_template', 'type' => 'bool', 'internal' => 'isTemplate'], ]; /** diff --git a/Models/Price/PriceMapper.php b/Models/Price/PriceMapper.php index d19fc97..47f66b7 100755 --- a/Models/Price/PriceMapper.php +++ b/Models/Price/PriceMapper.php @@ -42,33 +42,33 @@ final class PriceMapper extends DataMapperFactory * @since 1.0.0 */ public const COLUMNS = [ - 'billing_price_id' => ['name' => 'billing_price_id', 'type' => 'int', 'internal' => 'id'], - 'billing_price_name' => ['name' => 'billing_price_name', 'type' => 'string', 'internal' => 'name'], - 'billing_price_promocode' => ['name' => 'billing_price_promocode', 'type' => 'string', 'internal' => 'promocode'], - 'billing_price_item' => ['name' => 'billing_price_item', 'type' => 'int', 'internal' => 'item'], - 'billing_price_itemgroup' => ['name' => 'billing_price_itemgroup', 'type' => 'int', 'internal' => 'itemgroup'], - 'billing_price_itemsegment' => ['name' => 'billing_price_itemsegment', 'type' => 'int', 'internal' => 'itemsegment'], - 'billing_price_itemsection' => ['name' => 'billing_price_itemsection', 'type' => 'int', 'internal' => 'itemsection'], - 'billing_price_itemtype' => ['name' => 'billing_price_itemtype', 'type' => 'int', 'internal' => 'itemtype'], - 'billing_price_client' => ['name' => 'billing_price_client', 'type' => 'int', 'internal' => 'client'], - 'billing_price_clientgroup' => ['name' => 'billing_price_clientgroup', 'type' => 'int', 'internal' => 'clientgroup'], - 'billing_price_clientsegment' => ['name' => 'billing_price_clientsegment', 'type' => 'int', 'internal' => 'clientsegment'], - 'billing_price_clientsection' => ['name' => 'billing_price_clientsection', 'type' => 'int', 'internal' => 'clientsection'], - 'billing_price_clienttype' => ['name' => 'billing_price_clienttype', 'type' => 'int', 'internal' => 'clienttype'], - 'billing_price_clientcountry' => ['name' => 'billing_price_clientcountry', 'type' => 'string', 'internal' => 'clientcountry'], - 'billing_price_supplier' => ['name' => 'billing_price_supplier', 'type' => 'int', 'internal' => 'supplier'], - 'billing_price_unit' => ['name' => 'billing_price_unit', 'type' => 'int', 'internal' => 'unit'], - 'billing_price_type' => ['name' => 'billing_price_type', 'type' => 'int', 'internal' => 'type'], - 'billing_price_quantity' => ['name' => 'billing_price_quantity', 'type' => 'int', 'internal' => 'quantity'], - 'billing_price_price' => ['name' => 'billing_price_price', 'type' => 'Serializable', 'internal' => 'price'], + 'billing_price_id' => ['name' => 'billing_price_id', 'type' => 'int', 'internal' => 'id'], + 'billing_price_name' => ['name' => 'billing_price_name', 'type' => 'string', 'internal' => 'name'], + 'billing_price_promocode' => ['name' => 'billing_price_promocode', 'type' => 'string', 'internal' => 'promocode'], + 'billing_price_item' => ['name' => 'billing_price_item', 'type' => 'int', 'internal' => 'item'], + 'billing_price_itemgroup' => ['name' => 'billing_price_itemgroup', 'type' => 'int', 'internal' => 'itemgroup'], + 'billing_price_itemsegment' => ['name' => 'billing_price_itemsegment', 'type' => 'int', 'internal' => 'itemsegment'], + 'billing_price_itemsection' => ['name' => 'billing_price_itemsection', 'type' => 'int', 'internal' => 'itemsection'], + 'billing_price_itemtype' => ['name' => 'billing_price_itemtype', 'type' => 'int', 'internal' => 'itemtype'], + 'billing_price_client' => ['name' => 'billing_price_client', 'type' => 'int', 'internal' => 'client'], + 'billing_price_clientgroup' => ['name' => 'billing_price_clientgroup', 'type' => 'int', 'internal' => 'clientgroup'], + 'billing_price_clientsegment' => ['name' => 'billing_price_clientsegment', 'type' => 'int', 'internal' => 'clientsegment'], + 'billing_price_clientsection' => ['name' => 'billing_price_clientsection', 'type' => 'int', 'internal' => 'clientsection'], + 'billing_price_clienttype' => ['name' => 'billing_price_clienttype', 'type' => 'int', 'internal' => 'clienttype'], + 'billing_price_clientcountry' => ['name' => 'billing_price_clientcountry', 'type' => 'string', 'internal' => 'clientcountry'], + 'billing_price_supplier' => ['name' => 'billing_price_supplier', 'type' => 'int', 'internal' => 'supplier'], + 'billing_price_unit' => ['name' => 'billing_price_unit', 'type' => 'int', 'internal' => 'unit'], + 'billing_price_type' => ['name' => 'billing_price_type', 'type' => 'int', 'internal' => 'type'], + 'billing_price_quantity' => ['name' => 'billing_price_quantity', 'type' => 'int', 'internal' => 'quantity'], + 'billing_price_price' => ['name' => 'billing_price_price', 'type' => 'Serializable', 'internal' => 'price'], 'billing_price_price_new' => ['name' => 'billing_price_price_new', 'type' => 'int', 'internal' => 'priceNew'], - 'billing_price_discount' => ['name' => 'billing_price_discount', 'type' => 'int', 'internal' => 'discount'], - 'billing_price_discountp' => ['name' => 'billing_price_discountp', 'type' => 'int', 'internal' => 'discountPercentage'], - 'billing_price_bonus' => ['name' => 'billing_price_bonus', 'type' => 'int', 'internal' => 'bonus'], - 'billing_price_multiply' => ['name' => 'billing_price_multiply', 'type' => 'bool', 'internal' => 'multiply'], - 'billing_price_currency' => ['name' => 'billing_price_currency', 'type' => 'string', 'internal' => 'currency'], - 'billing_price_start' => ['name' => 'billing_price_start', 'type' => 'DateTime', 'internal' => 'start'], - 'billing_price_end' => ['name' => 'billing_price_end', 'type' => 'DateTime', 'internal' => 'end'], + 'billing_price_discount' => ['name' => 'billing_price_discount', 'type' => 'int', 'internal' => 'discount'], + 'billing_price_discountp' => ['name' => 'billing_price_discountp', 'type' => 'int', 'internal' => 'discountPercentage'], + 'billing_price_bonus' => ['name' => 'billing_price_bonus', 'type' => 'int', 'internal' => 'bonus'], + 'billing_price_multiply' => ['name' => 'billing_price_multiply', 'type' => 'bool', 'internal' => 'multiply'], + 'billing_price_currency' => ['name' => 'billing_price_currency', 'type' => 'string', 'internal' => 'currency'], + 'billing_price_start' => ['name' => 'billing_price_start', 'type' => 'DateTime', 'internal' => 'start'], + 'billing_price_end' => ['name' => 'billing_price_end', 'type' => 'DateTime', 'internal' => 'end'], ]; /** @@ -131,7 +131,7 @@ final class PriceMapper extends DataMapperFactory ], ]; - /** + /** * Model to use by the mapper. * * @var class-string diff --git a/Models/SalesBillMapper.php b/Models/SalesBillMapper.php index dcf8213..7c02313 100755 --- a/Models/SalesBillMapper.php +++ b/Models/SalesBillMapper.php @@ -233,7 +233,7 @@ final class SalesBillMapper extends BillMapper $query->selectAs(ClientMapper::TABLE . '.clientmgmt_client_id', 'client') ->selectAs('SUM(' . BillElementMapper::TABLE . '.billing_bill_element_total_netsalesprice)', 'net_sales') ->from(ClientMapper::TABLE) - ->leftJoin( self::TABLE) + ->leftJoin(self::TABLE) ->on(ClientMapper::TABLE . '.clientmgmt_client_id', '=', self::TABLE . '.billing_bill_client') ->leftJoin(BillElementMapper::TABLE) ->on(self::TABLE . '.billing_bill_id', '=', BillElementMapper::TABLE . '.billing_bill_element_bill') diff --git a/Models/SubscriptionMapper.php b/Models/SubscriptionMapper.php index 0ae85e6..be8773e 100755 --- a/Models/SubscriptionMapper.php +++ b/Models/SubscriptionMapper.php @@ -36,16 +36,16 @@ final class SubscriptionMapper extends DataMapperFactory * @since 1.0.0 */ public const COLUMNS = [ - 'billing_subscription_id' => ['name' => 'billing_subscription_id', 'type' => 'int', 'internal' => 'id'], - 'billing_subscription_status' => ['name' => 'billing_subscription_status', 'type' => 'int', 'internal' => 'status'], - 'billing_subscription_start' => ['name' => 'billing_subscription_start', 'type' => 'DateTime', 'internal' => 'start'], - 'billing_subscription_end' => ['name' => 'billing_subscription_end', 'type' => 'DateTime', 'internal' => 'end'], - 'billing_subscription_price' => ['name' => 'billing_subscription_price', 'type' => 'Serializable', 'internal' => 'price'], - 'billing_subscription_quantity' => ['name' => 'billing_subscription_quantity', 'type' => 'int', 'internal' => 'quantity'], - 'billing_subscription_bill' => ['name' => 'billing_subscription_bill', 'type' => 'int', 'internal' => 'bill'], - 'billing_subscription_item' => ['name' => 'billing_subscription_item', 'type' => 'int', 'internal' => 'item'], + 'billing_subscription_id' => ['name' => 'billing_subscription_id', 'type' => 'int', 'internal' => 'id'], + 'billing_subscription_status' => ['name' => 'billing_subscription_status', 'type' => 'int', 'internal' => 'status'], + 'billing_subscription_start' => ['name' => 'billing_subscription_start', 'type' => 'DateTime', 'internal' => 'start'], + 'billing_subscription_end' => ['name' => 'billing_subscription_end', 'type' => 'DateTime', 'internal' => 'end'], + 'billing_subscription_price' => ['name' => 'billing_subscription_price', 'type' => 'Serializable', 'internal' => 'price'], + 'billing_subscription_quantity' => ['name' => 'billing_subscription_quantity', 'type' => 'int', 'internal' => 'quantity'], + 'billing_subscription_bill' => ['name' => 'billing_subscription_bill', 'type' => 'int', 'internal' => 'bill'], + 'billing_subscription_item' => ['name' => 'billing_subscription_item', 'type' => 'int', 'internal' => 'item'], 'billing_subscription_autorenew' => ['name' => 'billing_subscription_autorenew', 'type' => 'bool', 'internal' => 'autoRenew'], - 'billing_subscription_client' => ['name' => 'billing_subscription_client', 'type' => 'int', 'internal' => 'client'], + 'billing_subscription_client' => ['name' => 'billing_subscription_client', 'type' => 'int', 'internal' => 'client'], ]; /** diff --git a/Models/Tax/TaxCombinationMapper.php b/Models/Tax/TaxCombinationMapper.php index 1ce12cd..35ab0fc 100755 --- a/Models/Tax/TaxCombinationMapper.php +++ b/Models/Tax/TaxCombinationMapper.php @@ -39,19 +39,19 @@ final class TaxCombinationMapper extends DataMapperFactory * @since 1.0.0 */ public const COLUMNS = [ - 'billing_tax_id' => ['name' => 'billing_tax_id', 'type' => 'int', 'internal' => 'id'], - 'billing_tax_client_code' => ['name' => 'billing_tax_client_code', 'type' => 'int', 'internal' => 'clientCode'], - 'billing_tax_supplier_code' => ['name' => 'billing_tax_supplier_code', 'type' => 'int', 'internal' => 'supplierCode'], - 'billing_tax_item_code' => ['name' => 'billing_tax_item_code', 'type' => 'int', 'internal' => 'itemCode'], - 'billing_tax_code' => ['name' => 'billing_tax_code', 'type' => 'string', 'internal' => 'taxCode'], - 'billing_tax_type' => ['name' => 'billing_tax_type', 'type' => 'int', 'internal' => 'taxType'], - 'billing_tax_account' => ['name' => 'billing_tax_account', 'type' => 'string', 'internal' => 'account'], - 'billing_tax_refund_account' => ['name' => 'billing_tax_refund_account', 'type' => 'string', 'internal' => 'refundAccount'], + 'billing_tax_id' => ['name' => 'billing_tax_id', 'type' => 'int', 'internal' => 'id'], + 'billing_tax_client_code' => ['name' => 'billing_tax_client_code', 'type' => 'int', 'internal' => 'clientCode'], + 'billing_tax_supplier_code' => ['name' => 'billing_tax_supplier_code', 'type' => 'int', 'internal' => 'supplierCode'], + 'billing_tax_item_code' => ['name' => 'billing_tax_item_code', 'type' => 'int', 'internal' => 'itemCode'], + 'billing_tax_code' => ['name' => 'billing_tax_code', 'type' => 'string', 'internal' => 'taxCode'], + 'billing_tax_type' => ['name' => 'billing_tax_type', 'type' => 'int', 'internal' => 'taxType'], + 'billing_tax_account' => ['name' => 'billing_tax_account', 'type' => 'string', 'internal' => 'account'], + 'billing_tax_refund_account' => ['name' => 'billing_tax_refund_account', 'type' => 'string', 'internal' => 'refundAccount'], 'billing_tax_discount_account' => ['name' => 'billing_tax_discount_account', 'type' => 'string', 'internal' => 'discountAccount'], - 'billing_tax_min_price' => ['name' => 'billing_tax_min_price', 'type' => 'int', 'internal' => 'minPrice'], - 'billing_tax_max_price' => ['name' => 'billing_tax_max_price', 'type' => 'int', 'internal' => 'maxPrice'], - 'billing_tax_start' => ['name' => 'billing_tax_start', 'type' => 'DateTime', 'internal' => 'start'], - 'billing_tax_end' => ['name' => 'billing_tax_end', 'type' => 'DateTime', 'internal' => 'end'], + 'billing_tax_min_price' => ['name' => 'billing_tax_min_price', 'type' => 'int', 'internal' => 'minPrice'], + 'billing_tax_max_price' => ['name' => 'billing_tax_max_price', 'type' => 'int', 'internal' => 'maxPrice'], + 'billing_tax_start' => ['name' => 'billing_tax_start', 'type' => 'DateTime', 'internal' => 'start'], + 'billing_tax_end' => ['name' => 'billing_tax_end', 'type' => 'DateTime', 'internal' => 'end'], ]; /** diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php index 36c3c27..57db53b 100755 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -17,5 +17,5 @@ return ['Navigation' => [ 'Archive' => 'Archive', 'Bill' => 'Bill', 'Billing' => 'Billing', - 'Upload' => 'Upload', + 'Upload' => 'Upload', ]]; diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 5a04c24..13b31bf 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -13,86 +13,86 @@ declare(strict_types=1); return ['Billing' => [ - 'Amount' => 'Amount', - 'Archive' => 'Archive', - 'Address' => 'Address', - 'Addresses' => 'Addresses', - 'Africa' => 'Africa', - 'Currency' => 'Currency', - 'Language' => 'Language', - 'AlreadyPaid' => 'Already Paid', - 'America' => 'America', - 'Analyse' => 'Analyse', - 'Articles' => 'Articles', - 'Asia' => 'Asia', - 'Attribute' => 'Attribute', - 'BaseTime' => 'Base time', - 'Billing' => 'Billing', - 'Bills' => 'Bills', - 'Bonus' => 'Bonus', - 'CIS' => 'CIS', - 'Cashback' => 'Cash Back', - 'City' => 'City', - 'Client' => 'Client', - 'ClientID' => 'Client ID', - 'ComparisonTime' => 'Comparison time', - 'Confirmation' => 'Confirmation', - 'Country' => 'Country', - 'Created' => 'Created', - 'CreditCard' => 'CreditCard', - 'CreditNote' => 'Credit Note', - 'CreateBill' => 'Create Bill', - 'Customers' => 'Customers', - 'Date' => 'Date', - 'Delivery' => 'Delivery', - 'DeliveryNote' => 'Delivery Note', - 'DirectDebit' => 'DirectDebit', - 'Discount' => 'Discount', - 'DiscountP' => 'Discount %', - 'Due' => 'Due', - 'Europe' => 'Europe', - 'Filter' => 'Filter', - 'Freightage' => 'Freightage', - 'General' => 'General', - 'Gross' => 'Gross', - 'Invoice' => 'Invoice', - 'Invoices' => 'Invoices', - 'Item' => 'Item', - 'Email' => 'Email', - 'Items' => 'Items', - 'Log' => 'Log', - 'Logs' => 'Logs', - 'Media' => 'Media', - 'MoneyTransfer' => 'Money Transfer', - 'Name' => 'Name', - 'Net' => 'Net', - 'Offer' => 'Offer', - 'Other' => 'Other', - 'Payment' => 'Payment', + 'Amount' => 'Amount', + 'Archive' => 'Archive', + 'Address' => 'Address', + 'Addresses' => 'Addresses', + 'Africa' => 'Africa', + 'Currency' => 'Currency', + 'Language' => 'Language', + 'AlreadyPaid' => 'Already Paid', + 'America' => 'America', + 'Analyse' => 'Analyse', + 'Articles' => 'Articles', + 'Asia' => 'Asia', + 'Attribute' => 'Attribute', + 'BaseTime' => 'Base time', + 'Billing' => 'Billing', + 'Bills' => 'Bills', + 'Bonus' => 'Bonus', + 'CIS' => 'CIS', + 'Cashback' => 'Cash Back', + 'City' => 'City', + 'Client' => 'Client', + 'ClientID' => 'Client ID', + 'ComparisonTime' => 'Comparison time', + 'Confirmation' => 'Confirmation', + 'Country' => 'Country', + 'Created' => 'Created', + 'CreditCard' => 'CreditCard', + 'CreditNote' => 'Credit Note', + 'CreateBill' => 'Create Bill', + 'Customers' => 'Customers', + 'Date' => 'Date', + 'Delivery' => 'Delivery', + 'DeliveryNote' => 'Delivery Note', + 'DirectDebit' => 'DirectDebit', + 'Discount' => 'Discount', + 'DiscountP' => 'Discount %', + 'Due' => 'Due', + 'Europe' => 'Europe', + 'Filter' => 'Filter', + 'Freightage' => 'Freightage', + 'General' => 'General', + 'Gross' => 'Gross', + 'Invoice' => 'Invoice', + 'Invoices' => 'Invoices', + 'Item' => 'Item', + 'Email' => 'Email', + 'Items' => 'Items', + 'Log' => 'Log', + 'Logs' => 'Logs', + 'Media' => 'Media', + 'MoneyTransfer' => 'Money Transfer', + 'Name' => 'Name', + 'Net' => 'Net', + 'Offer' => 'Offer', + 'Other' => 'Other', + 'Payment' => 'Payment', 'PaymentPlan' => 'Payment Plan', - 'Postal' => 'Postal', - 'Prepaid' => 'Prepaid', - 'Preview' => 'Preview', - 'Price' => 'Price', - 'Profit' => 'Profit', - 'Quantity' => 'Quantity', - 'Recipient' => 'Recipient', - 'Region' => 'Region', - 'Rep' => 'Rep.', - 'Sales' => 'Sales', - 'Select' => 'Select', - 'Shipment' => 'Shipment', - 'Source' => 'Source', - 'Supplier' => 'Supplier', - 'SupplierID' => 'Supplier ID', - 'Tax' => 'Tax', - 'TermsOfDelivery' => 'Terms Of Delivery', - 'Total' => 'Total', - 'Type' => 'Type', - 'Types' => 'Types', - 'Upload' => 'Upload', - 'Original' => 'Original', - 'Value' => 'Value', - 'Variation' => 'Variation', - 'Zip' => 'Zip', + 'Postal' => 'Postal', + 'Prepaid' => 'Prepaid', + 'Preview' => 'Preview', + 'Price' => 'Price', + 'Profit' => 'Profit', + 'Quantity' => 'Quantity', + 'Recipient' => 'Recipient', + 'Region' => 'Region', + 'Rep' => 'Rep.', + 'Sales' => 'Sales', + 'Select' => 'Select', + 'Shipment' => 'Shipment', + 'Source' => 'Source', + 'Supplier' => 'Supplier', + 'SupplierID' => 'Supplier ID', + 'Tax' => 'Tax', + 'TermsOfDelivery' => 'Terms Of Delivery', + 'Total' => 'Total', + 'Type' => 'Type', + 'Types' => 'Types', + 'Upload' => 'Upload', + 'Original' => 'Original', + 'Value' => 'Value', + 'Variation' => 'Variation', + 'Zip' => 'Zip', ]]; diff --git a/Theme/Backend/bill-create.tpl.php b/Theme/Backend/bill-create.tpl.php index 2ac7b91..e955727 100755 --- a/Theme/Backend/bill-create.tpl.php +++ b/Theme/Backend/bill-create.tpl.php @@ -169,22 +169,22 @@ echo $this->getData('nav')->render(); ?>
- > + >
- > + >
- > + >
- > + >
@@ -198,7 +198,7 @@ echo $this->getData('nav')->render(); ?>
- > + >
@@ -219,22 +219,22 @@ echo $this->getData('nav')->render(); ?>
- > + >
- > + >
- > + >
- > + >
diff --git a/Theme/Backend/purchase-bill.tpl.php b/Theme/Backend/purchase-bill.tpl.php index da60fb5..b1200c4 100755 --- a/Theme/Backend/purchase-bill.tpl.php +++ b/Theme/Backend/purchase-bill.tpl.php @@ -12,7 +12,6 @@ */ declare(strict_types=1); -use Modules\Media\Models\NullMedia; use phpOMS\System\File\FileUtils; use phpOMS\Uri\UriFactory; diff --git a/Theme/Backend/user-purchase-bill.tpl.php b/Theme/Backend/user-purchase-bill.tpl.php index 5e2c226..54695b3 100755 --- a/Theme/Backend/user-purchase-bill.tpl.php +++ b/Theme/Backend/user-purchase-bill.tpl.php @@ -12,7 +12,6 @@ */ declare(strict_types=1); -use Modules\Media\Models\NullMedia; use phpOMS\System\File\FileUtils; use phpOMS\Uri\UriFactory; diff --git a/Theme/Cli/bill-parsed.tpl.php b/Theme/Cli/bill-parsed.tpl.php index 155ab09..5dc0650 100755 --- a/Theme/Cli/bill-parsed.tpl.php +++ b/Theme/Cli/bill-parsed.tpl.php @@ -1,3 +1,3 @@ -getData('bill') ?? null, \JSON_PRETTY_PRINT); \ No newline at end of file +echo \json_encode($this->getData('bill') ?? null, \JSON_PRETTY_PRINT); diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index 0e19e71..d5b8c68 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -57,14 +57,14 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase protected string $appName = 'Api'; }; - $this->app->dbPool = $GLOBALS['dbpool']; + $this->app->dbPool = $GLOBALS['dbpool']; $this->app->unitId = 1; - $this->app->accountManager = new AccountManager($GLOBALS['session']); - $this->app->appSettings = new CoreSettings(); - $this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/'); - $this->app->dispatcher = new Dispatcher($this->app); - $this->app->eventManager = new EventManager($this->app->dispatcher); - $this->app->l11nManager = new L11nManager(); + $this->app->accountManager = new AccountManager($GLOBALS['session']); + $this->app->appSettings = new CoreSettings(); + $this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/'); + $this->app->dispatcher = new Dispatcher($this->app); + $this->app->eventManager = new EventManager($this->app->dispatcher); + $this->app->l11nManager = new L11nManager(); $this->app->eventManager->importFromFile(__DIR__ . '/../../../../Web/Api/Hooks.php'); $account = new Account();