From c5086f8d8fc6bca017dc9c49fcdba14d28678a3c Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 20 Mar 2024 07:21:20 +0000 Subject: [PATCH 01/11] update version requirement --- Admin/Install/Admin.install.php | 2 +- Admin/Install/Admin.php | 2 +- Admin/Install/Media.php | 2 +- Admin/Install/Media/bill.pdf.php | 2 +- Admin/Install/Media/lang.php | 2 +- Admin/Install/Messages.php | 2 +- Admin/Install/Navigation.php | 2 +- Admin/Install/WarehouseManagement.php | 2 +- Admin/Install/Workflow.php | 2 +- Admin/Installer.php | 2 +- Admin/Routes/Web/Api.php | 2 +- Admin/Routes/Web/Backend.php | 2 +- Admin/Status.php | 2 +- Admin/Uninstaller.php | 2 +- Admin/Updater.php | 2 +- Controller/ApiAttributeController.php | 2 +- Controller/ApiBillController.php | 2 +- Controller/ApiBillTypeController.php | 2 +- Controller/ApiController.php | 2 +- Controller/ApiPriceController.php | 2 +- Controller/ApiPurchaseController.php | 2 +- Controller/ApiTaxController.php | 2 +- Controller/BackendController.php | 2 +- Controller/CliController.php | 2 +- Controller/Controller.php | 2 +- Models/Attribute/BillAttributeMapper.php | 2 +- Models/Attribute/BillAttributeTypeL11nMapper.php | 2 +- Models/Attribute/BillAttributeTypeMapper.php | 2 +- Models/Attribute/BillAttributeValueL11nMapper.php | 2 +- Models/Attribute/BillAttributeValueMapper.php | 2 +- Models/Bill.php | 2 +- Models/BillElement.php | 2 +- Models/BillElementMapper.php | 2 +- Models/BillMapper.php | 2 +- Models/BillPaymentStatus.php | 2 +- Models/BillStatus.php | 2 +- Models/BillTransferType.php | 2 +- Models/BillType.php | 2 +- Models/BillTypeL11nMapper.php | 2 +- Models/BillTypeMapper.php | 2 +- Models/InvoiceRecognition.php | 2 +- Models/NullBill.php | 2 +- Models/NullBillElement.php | 2 +- Models/NullBillType.php | 2 +- Models/NullSubscription.php | 2 +- Models/PaymentTermL11nMapper.php | 2 +- Models/PaymentTermMapper.php | 2 +- Models/PermissionCategory.php | 2 +- Models/Price/NullPrice.php | 2 +- Models/Price/Price.php | 2 +- Models/Price/PriceMapper.php | 2 +- Models/Price/PriceStatus.php | 2 +- Models/Price/PriceType.php | 2 +- Models/PurchaseBillMapper.php | 2 +- Models/SalesBillMapper.php | 2 +- Models/SettingsEnum.php | 2 +- Models/ShippingTermL11nMapper.php | 2 +- Models/ShippingTermMapper.php | 2 +- Models/StockBillMapper.php | 2 +- Models/Subscription.php | 2 +- Models/SubscriptionMapper.php | 2 +- Models/Tax/BillTaxType.php | 2 +- Models/Tax/NullTaxCombination.php | 2 +- Models/Tax/TaxCombination.php | 2 +- Models/Tax/TaxCombinationMapper.php | 2 +- Theme/Backend/Lang/Navigation.de.lang.php | 2 +- Theme/Backend/Lang/Navigation.en.lang.php | 2 +- Theme/Backend/Lang/de.lang.php | 2 +- Theme/Backend/Lang/en.lang.php | 2 +- Theme/Backend/bill-create.tpl.php | 2 +- Theme/Backend/payment-type-list.tpl.php | 2 +- Theme/Backend/payment-view.tpl.php | 2 +- Theme/Backend/purchase-bill-list.tpl.php | 2 +- Theme/Backend/purchase-bill.tpl.php | 2 +- Theme/Backend/sales-bill-list.tpl.php | 2 +- Theme/Backend/shipping-type-list.tpl.php | 2 +- Theme/Backend/shipping-view.tpl.php | 2 +- Theme/Backend/user-purchase-bill-dashboard.tpl.php | 2 +- Theme/Cli/Lang/de.lang.php | 2 +- Theme/Cli/Lang/en.lang.php | 2 +- tests/Admin/AdminTest.php | 2 +- tests/Autoloader.php | 2 +- tests/Bootstrap.php | 2 +- tests/Controller/Api/ApiBillControllerTrait.php | 2 +- tests/Controller/Api/ApiPurchaseControllerTrait.php | 2 +- tests/Controller/ApiControllerTest.php | 2 +- tests/Models/BillElementTest.php | 2 +- tests/Models/BillTest.php | 2 +- tests/Models/BillTypeTest.php | 2 +- tests/Models/InvoiceRecognitionTest.php | 2 +- tests/Models/NullBillElementTest.php | 2 +- tests/Models/NullBillTest.php | 2 +- tests/Models/NullBillTypeTest.php | 2 +- tests/Models/NullSubscriptionTest.php | 2 +- tests/Models/Price/NullPriceTest.php | 2 +- tests/Models/PurchaseBillMapperTest.php | 2 +- tests/Models/SalesBillMapperTest.php | 2 +- tests/Models/StockBillMapperTest.php | 2 +- tests/Models/Tax/NullTaxCombinationTest.php | 2 +- 99 files changed, 99 insertions(+), 99 deletions(-) diff --git a/Admin/Install/Admin.install.php b/Admin/Install/Admin.install.php index 0fd52fb..eb3e87a 100644 --- a/Admin/Install/Admin.install.php +++ b/Admin/Install/Admin.install.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Admin * @copyright Dennis Eichhorn diff --git a/Admin/Install/Admin.php b/Admin/Install/Admin.php index a21cb13..8e824c4 100755 --- a/Admin/Install/Admin.php +++ b/Admin/Install/Admin.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Admin\Install * @copyright Dennis Eichhorn diff --git a/Admin/Install/Media.php b/Admin/Install/Media.php index 3dae6c2..2b24a4b 100755 --- a/Admin/Install/Media.php +++ b/Admin/Install/Media.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Admin\Install * @copyright Dennis Eichhorn diff --git a/Admin/Install/Media/bill.pdf.php b/Admin/Install/Media/bill.pdf.php index cb92fd3..1210ee9 100755 --- a/Admin/Install/Media/bill.pdf.php +++ b/Admin/Install/Media/bill.pdf.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Media * @copyright Dennis Eichhorn diff --git a/Admin/Install/Media/lang.php b/Admin/Install/Media/lang.php index 7c11b32..052825a 100755 --- a/Admin/Install/Media/lang.php +++ b/Admin/Install/Media/lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * Bill localization. * diff --git a/Admin/Install/Messages.php b/Admin/Install/Messages.php index 670cff7..65290cf 100755 --- a/Admin/Install/Messages.php +++ b/Admin/Install/Messages.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Admin\Install * @copyright Dennis Eichhorn diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index 1ea6271..53726b5 100755 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Admin\Install * @copyright Dennis Eichhorn diff --git a/Admin/Install/WarehouseManagement.php b/Admin/Install/WarehouseManagement.php index a2ddcb1..5481bca 100755 --- a/Admin/Install/WarehouseManagement.php +++ b/Admin/Install/WarehouseManagement.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Admin\Install * @copyright Dennis Eichhorn diff --git a/Admin/Install/Workflow.php b/Admin/Install/Workflow.php index 90b087e..af99cf5 100755 --- a/Admin/Install/Workflow.php +++ b/Admin/Install/Workflow.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Admin\Install * @copyright Dennis Eichhorn diff --git a/Admin/Installer.php b/Admin/Installer.php index e5afc82..98b9c49 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Admin * @copyright Dennis Eichhorn diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index 44996e2..c1fc2c2 100755 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules * @copyright Dennis Eichhorn diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 127427f..0211820 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules * @copyright Dennis Eichhorn diff --git a/Admin/Status.php b/Admin/Status.php index 56dbd72..dd2c072 100755 --- a/Admin/Status.php +++ b/Admin/Status.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Admin * @copyright Dennis Eichhorn diff --git a/Admin/Uninstaller.php b/Admin/Uninstaller.php index 01b6cab..4c4a813 100755 --- a/Admin/Uninstaller.php +++ b/Admin/Uninstaller.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Admin * @copyright Dennis Eichhorn diff --git a/Admin/Updater.php b/Admin/Updater.php index 401a3a1..aac801a 100755 --- a/Admin/Updater.php +++ b/Admin/Updater.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Admin * @copyright Dennis Eichhorn diff --git a/Controller/ApiAttributeController.php b/Controller/ApiAttributeController.php index 0fe467c..69a92c4 100755 --- a/Controller/ApiAttributeController.php +++ b/Controller/ApiAttributeController.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Controller/ApiBillController.php b/Controller/ApiBillController.php index 2b84a91..de05da4 100755 --- a/Controller/ApiBillController.php +++ b/Controller/ApiBillController.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Controller/ApiBillTypeController.php b/Controller/ApiBillTypeController.php index c754c62..7526f1a 100755 --- a/Controller/ApiBillTypeController.php +++ b/Controller/ApiBillTypeController.php @@ -3,7 +3,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 6a6ebe7..fd007a5 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -3,7 +3,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Controller/ApiPriceController.php b/Controller/ApiPriceController.php index eb42653..1dd74dd 100755 --- a/Controller/ApiPriceController.php +++ b/Controller/ApiPriceController.php @@ -3,7 +3,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Controller/ApiPurchaseController.php b/Controller/ApiPurchaseController.php index 0bd3b86..5837e6c 100755 --- a/Controller/ApiPurchaseController.php +++ b/Controller/ApiPurchaseController.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Controller/ApiTaxController.php b/Controller/ApiTaxController.php index cb22186..eebabc2 100755 --- a/Controller/ApiTaxController.php +++ b/Controller/ApiTaxController.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 2d53acc..ebb24c9 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Controller/CliController.php b/Controller/CliController.php index 0271494..fc1b4f7 100755 --- a/Controller/CliController.php +++ b/Controller/CliController.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Controller/Controller.php b/Controller/Controller.php index facef88..a55c965 100755 --- a/Controller/Controller.php +++ b/Controller/Controller.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Models/Attribute/BillAttributeMapper.php b/Models/Attribute/BillAttributeMapper.php index b9fb7bd..71cabaa 100755 --- a/Models/Attribute/BillAttributeMapper.php +++ b/Models/Attribute/BillAttributeMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Attribute * @copyright Dennis Eichhorn diff --git a/Models/Attribute/BillAttributeTypeL11nMapper.php b/Models/Attribute/BillAttributeTypeL11nMapper.php index 1ac4e8a..65aacd0 100755 --- a/Models/Attribute/BillAttributeTypeL11nMapper.php +++ b/Models/Attribute/BillAttributeTypeL11nMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Attribute * @copyright Dennis Eichhorn diff --git a/Models/Attribute/BillAttributeTypeMapper.php b/Models/Attribute/BillAttributeTypeMapper.php index 3429716..17b6e7b 100755 --- a/Models/Attribute/BillAttributeTypeMapper.php +++ b/Models/Attribute/BillAttributeTypeMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Attribute * @copyright Dennis Eichhorn diff --git a/Models/Attribute/BillAttributeValueL11nMapper.php b/Models/Attribute/BillAttributeValueL11nMapper.php index 939cd7e..f1604be 100755 --- a/Models/Attribute/BillAttributeValueL11nMapper.php +++ b/Models/Attribute/BillAttributeValueL11nMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Attribute * @copyright Dennis Eichhorn diff --git a/Models/Attribute/BillAttributeValueMapper.php b/Models/Attribute/BillAttributeValueMapper.php index 2e54b8b..c698c3e 100755 --- a/Models/Attribute/BillAttributeValueMapper.php +++ b/Models/Attribute/BillAttributeValueMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Attribute * @copyright Dennis Eichhorn diff --git a/Models/Bill.php b/Models/Bill.php index 2a6784a..a5acf20 100755 --- a/Models/Bill.php +++ b/Models/Bill.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/BillElement.php b/Models/BillElement.php index 024c17a..5ea3b20 100755 --- a/Models/BillElement.php +++ b/Models/BillElement.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/BillElementMapper.php b/Models/BillElementMapper.php index d8771e3..99a22a4 100755 --- a/Models/BillElementMapper.php +++ b/Models/BillElementMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/BillMapper.php b/Models/BillMapper.php index ee72a5b..1a7295c 100755 --- a/Models/BillMapper.php +++ b/Models/BillMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/BillPaymentStatus.php b/Models/BillPaymentStatus.php index 900022c..ad777fa 100755 --- a/Models/BillPaymentStatus.php +++ b/Models/BillPaymentStatus.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/BillStatus.php b/Models/BillStatus.php index 292aead..01e15ba 100755 --- a/Models/BillStatus.php +++ b/Models/BillStatus.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/BillTransferType.php b/Models/BillTransferType.php index 9b7bd59..c48aa53 100755 --- a/Models/BillTransferType.php +++ b/Models/BillTransferType.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/BillType.php b/Models/BillType.php index 8bfab10..bdfe2aa 100755 --- a/Models/BillType.php +++ b/Models/BillType.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/BillTypeL11nMapper.php b/Models/BillTypeL11nMapper.php index be5b1d6..d6abb8c 100755 --- a/Models/BillTypeL11nMapper.php +++ b/Models/BillTypeL11nMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/BillTypeMapper.php b/Models/BillTypeMapper.php index d3cccfe..aa58cd4 100755 --- a/Models/BillTypeMapper.php +++ b/Models/BillTypeMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/InvoiceRecognition.php b/Models/InvoiceRecognition.php index 74c11be..4b09c1f 100644 --- a/Models/InvoiceRecognition.php +++ b/Models/InvoiceRecognition.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/NullBill.php b/Models/NullBill.php index c4da9a3..f917b91 100755 --- a/Models/NullBill.php +++ b/Models/NullBill.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/NullBillElement.php b/Models/NullBillElement.php index 8953f5b..916e768 100755 --- a/Models/NullBillElement.php +++ b/Models/NullBillElement.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/NullBillType.php b/Models/NullBillType.php index 818e8bc..4ee3e0f 100755 --- a/Models/NullBillType.php +++ b/Models/NullBillType.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/NullSubscription.php b/Models/NullSubscription.php index 1a953f1..29c54c5 100755 --- a/Models/NullSubscription.php +++ b/Models/NullSubscription.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/PaymentTermL11nMapper.php b/Models/PaymentTermL11nMapper.php index 3510b12..1e1fdfd 100644 --- a/Models/PaymentTermL11nMapper.php +++ b/Models/PaymentTermL11nMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/PaymentTermMapper.php b/Models/PaymentTermMapper.php index a8fcce5..3a59fe5 100644 --- a/Models/PaymentTermMapper.php +++ b/Models/PaymentTermMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/PermissionCategory.php b/Models/PermissionCategory.php index 3e1458c..d4d1c65 100755 --- a/Models/PermissionCategory.php +++ b/Models/PermissionCategory.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/Price/NullPrice.php b/Models/Price/NullPrice.php index e636173..c0ff963 100755 --- a/Models/Price/NullPrice.php +++ b/Models/Price/NullPrice.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Price * @copyright Dennis Eichhorn diff --git a/Models/Price/Price.php b/Models/Price/Price.php index 023a524..6079d04 100755 --- a/Models/Price/Price.php +++ b/Models/Price/Price.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Price * @copyright Dennis Eichhorn diff --git a/Models/Price/PriceMapper.php b/Models/Price/PriceMapper.php index 6d15044..6567819 100755 --- a/Models/Price/PriceMapper.php +++ b/Models/Price/PriceMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Price * @copyright Dennis Eichhorn diff --git a/Models/Price/PriceStatus.php b/Models/Price/PriceStatus.php index 74e3a21..ad42907 100644 --- a/Models/Price/PriceStatus.php +++ b/Models/Price/PriceStatus.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Price * @copyright Dennis Eichhorn diff --git a/Models/Price/PriceType.php b/Models/Price/PriceType.php index f8fb8ad..1f165f8 100755 --- a/Models/Price/PriceType.php +++ b/Models/Price/PriceType.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Price * @copyright Dennis Eichhorn diff --git a/Models/PurchaseBillMapper.php b/Models/PurchaseBillMapper.php index b6bf6a8..a9d4ed1 100755 --- a/Models/PurchaseBillMapper.php +++ b/Models/PurchaseBillMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/SalesBillMapper.php b/Models/SalesBillMapper.php index 60b1360..3042174 100755 --- a/Models/SalesBillMapper.php +++ b/Models/SalesBillMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/SettingsEnum.php b/Models/SettingsEnum.php index 9edcade..e087a8b 100755 --- a/Models/SettingsEnum.php +++ b/Models/SettingsEnum.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/ShippingTermL11nMapper.php b/Models/ShippingTermL11nMapper.php index e67686a..185a818 100644 --- a/Models/ShippingTermL11nMapper.php +++ b/Models/ShippingTermL11nMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/ShippingTermMapper.php b/Models/ShippingTermMapper.php index 5b55f9c..34e32cc 100644 --- a/Models/ShippingTermMapper.php +++ b/Models/ShippingTermMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/StockBillMapper.php b/Models/StockBillMapper.php index eda9236..798b8a1 100755 --- a/Models/StockBillMapper.php +++ b/Models/StockBillMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/Subscription.php b/Models/Subscription.php index feccea0..0a151eb 100755 --- a/Models/Subscription.php +++ b/Models/Subscription.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/SubscriptionMapper.php b/Models/SubscriptionMapper.php index 7f2a098..a776245 100755 --- a/Models/SubscriptionMapper.php +++ b/Models/SubscriptionMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models * @copyright Dennis Eichhorn diff --git a/Models/Tax/BillTaxType.php b/Models/Tax/BillTaxType.php index 951c23e..7bc2fb8 100755 --- a/Models/Tax/BillTaxType.php +++ b/Models/Tax/BillTaxType.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Tax * @copyright Dennis Eichhorn diff --git a/Models/Tax/NullTaxCombination.php b/Models/Tax/NullTaxCombination.php index 13a142b..41bb20a 100755 --- a/Models/Tax/NullTaxCombination.php +++ b/Models/Tax/NullTaxCombination.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Tax * @copyright Dennis Eichhorn diff --git a/Models/Tax/TaxCombination.php b/Models/Tax/TaxCombination.php index 56bd8cf..4e8ca72 100755 --- a/Models/Tax/TaxCombination.php +++ b/Models/Tax/TaxCombination.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Tax * @copyright Dennis Eichhorn diff --git a/Models/Tax/TaxCombinationMapper.php b/Models/Tax/TaxCombinationMapper.php index b4ad10f..9e5b43a 100755 --- a/Models/Tax/TaxCombinationMapper.php +++ b/Models/Tax/TaxCombinationMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\Models\Tax * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.de.lang.php b/Theme/Backend/Lang/Navigation.de.lang.php index 2adfaa3..3130d50 100755 --- a/Theme/Backend/Lang/Navigation.de.lang.php +++ b/Theme/Backend/Lang/Navigation.de.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php index 0d87942..863c619 100755 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index d1b05de..1393a2f 100755 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index a7bbb44..40d00c6 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/bill-create.tpl.php b/Theme/Backend/bill-create.tpl.php index b1c7d66..fd0786b 100755 --- a/Theme/Backend/bill-create.tpl.php +++ b/Theme/Backend/bill-create.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Theme/Backend/payment-type-list.tpl.php b/Theme/Backend/payment-type-list.tpl.php index d36f6d8..21d8cec 100644 --- a/Theme/Backend/payment-type-list.tpl.php +++ b/Theme/Backend/payment-type-list.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\ItemManagement * @copyright Dennis Eichhorn diff --git a/Theme/Backend/payment-view.tpl.php b/Theme/Backend/payment-view.tpl.php index 40f1511..59f591d 100644 --- a/Theme/Backend/payment-view.tpl.php +++ b/Theme/Backend/payment-view.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Theme/Backend/purchase-bill-list.tpl.php b/Theme/Backend/purchase-bill-list.tpl.php index ad3f775..9781419 100755 --- a/Theme/Backend/purchase-bill-list.tpl.php +++ b/Theme/Backend/purchase-bill-list.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Theme/Backend/purchase-bill.tpl.php b/Theme/Backend/purchase-bill.tpl.php index eae5982..e912d1f 100755 --- a/Theme/Backend/purchase-bill.tpl.php +++ b/Theme/Backend/purchase-bill.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Theme/Backend/sales-bill-list.tpl.php b/Theme/Backend/sales-bill-list.tpl.php index 61c72da..dcaa1b1 100755 --- a/Theme/Backend/sales-bill-list.tpl.php +++ b/Theme/Backend/sales-bill-list.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Theme/Backend/shipping-type-list.tpl.php b/Theme/Backend/shipping-type-list.tpl.php index 7db9527..54d3239 100644 --- a/Theme/Backend/shipping-type-list.tpl.php +++ b/Theme/Backend/shipping-type-list.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\ItemManagement * @copyright Dennis Eichhorn diff --git a/Theme/Backend/shipping-view.tpl.php b/Theme/Backend/shipping-view.tpl.php index 545385f..796d49d 100644 --- a/Theme/Backend/shipping-view.tpl.php +++ b/Theme/Backend/shipping-view.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Theme/Backend/user-purchase-bill-dashboard.tpl.php b/Theme/Backend/user-purchase-bill-dashboard.tpl.php index 176c8b3..7533fb1 100755 --- a/Theme/Backend/user-purchase-bill-dashboard.tpl.php +++ b/Theme/Backend/user-purchase-bill-dashboard.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing * @copyright Dennis Eichhorn diff --git a/Theme/Cli/Lang/de.lang.php b/Theme/Cli/Lang/de.lang.php index 776cf84..1949f83 100644 --- a/Theme/Cli/Lang/de.lang.php +++ b/Theme/Cli/Lang/de.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Cli/Lang/en.lang.php b/Theme/Cli/Lang/en.lang.php index 776cf84..1949f83 100755 --- a/Theme/Cli/Lang/en.lang.php +++ b/Theme/Cli/Lang/en.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/tests/Admin/AdminTest.php b/tests/Admin/AdminTest.php index cc5faeb..f559565 100755 --- a/tests/Admin/AdminTest.php +++ b/tests/Admin/AdminTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Autoloader.php b/tests/Autoloader.php index 28b8056..525390b 100755 --- a/tests/Autoloader.php +++ b/tests/Autoloader.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules/tests * @copyright Dennis Eichhorn diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index 4bf4f19..165c4ac 100755 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Billing\tests * @copyright Dennis Eichhorn diff --git a/tests/Controller/Api/ApiBillControllerTrait.php b/tests/Controller/Api/ApiBillControllerTrait.php index 1670cbf..ca159b8 100644 --- a/tests/Controller/Api/ApiBillControllerTrait.php +++ b/tests/Controller/Api/ApiBillControllerTrait.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Controller/Api/ApiPurchaseControllerTrait.php b/tests/Controller/Api/ApiPurchaseControllerTrait.php index f1aef72..7038509 100644 --- a/tests/Controller/Api/ApiPurchaseControllerTrait.php +++ b/tests/Controller/Api/ApiPurchaseControllerTrait.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index cb71db9..7170d45 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/BillElementTest.php b/tests/Models/BillElementTest.php index 063025f..53d7a1d 100755 --- a/tests/Models/BillElementTest.php +++ b/tests/Models/BillElementTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/BillTest.php b/tests/Models/BillTest.php index 504ec9e..e02ab6f 100755 --- a/tests/Models/BillTest.php +++ b/tests/Models/BillTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/BillTypeTest.php b/tests/Models/BillTypeTest.php index 708904a..6b54725 100755 --- a/tests/Models/BillTypeTest.php +++ b/tests/Models/BillTypeTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/InvoiceRecognitionTest.php b/tests/Models/InvoiceRecognitionTest.php index 1bc79f6..a2c67c3 100644 --- a/tests/Models/InvoiceRecognitionTest.php +++ b/tests/Models/InvoiceRecognitionTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/NullBillElementTest.php b/tests/Models/NullBillElementTest.php index e75ec1b..881b47f 100755 --- a/tests/Models/NullBillElementTest.php +++ b/tests/Models/NullBillElementTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/NullBillTest.php b/tests/Models/NullBillTest.php index 668e6e1..7eecab9 100755 --- a/tests/Models/NullBillTest.php +++ b/tests/Models/NullBillTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/NullBillTypeTest.php b/tests/Models/NullBillTypeTest.php index 5c3b9f4..a451822 100755 --- a/tests/Models/NullBillTypeTest.php +++ b/tests/Models/NullBillTypeTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/NullSubscriptionTest.php b/tests/Models/NullSubscriptionTest.php index 27efe39..3fd5dcd 100644 --- a/tests/Models/NullSubscriptionTest.php +++ b/tests/Models/NullSubscriptionTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/Price/NullPriceTest.php b/tests/Models/Price/NullPriceTest.php index b39e0d7..8368a48 100644 --- a/tests/Models/Price/NullPriceTest.php +++ b/tests/Models/Price/NullPriceTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/PurchaseBillMapperTest.php b/tests/Models/PurchaseBillMapperTest.php index abf52fe..bf52365 100755 --- a/tests/Models/PurchaseBillMapperTest.php +++ b/tests/Models/PurchaseBillMapperTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/SalesBillMapperTest.php b/tests/Models/SalesBillMapperTest.php index 0929f9e..3d6aac0 100755 --- a/tests/Models/SalesBillMapperTest.php +++ b/tests/Models/SalesBillMapperTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/StockBillMapperTest.php b/tests/Models/StockBillMapperTest.php index f23c4e4..7a32459 100755 --- a/tests/Models/StockBillMapperTest.php +++ b/tests/Models/StockBillMapperTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/Tax/NullTaxCombinationTest.php b/tests/Models/Tax/NullTaxCombinationTest.php index 62e331d..c035f17 100644 --- a/tests/Models/Tax/NullTaxCombinationTest.php +++ b/tests/Models/Tax/NullTaxCombinationTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn From e75a9fb9dcae2ae4626d6ad0af667384940d95fe Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 20 Mar 2024 08:02:38 +0000 Subject: [PATCH 02/11] fix ICLA name --- ICAL.txt => ICLA.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ICAL.txt => ICLA.txt (100%) mode change 100755 => 100644 diff --git a/ICAL.txt b/ICLA.txt old mode 100755 new mode 100644 similarity index 100% rename from ICAL.txt rename to ICLA.txt From 36fcbadbdd2412d47cb8749d9235308032028579 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 29 Mar 2024 15:25:59 +0000 Subject: [PATCH 03/11] started with template fixes --- Admin/Install/Admin.install.php | 14 ++ Admin/Install/Navigation.install.json | 46 ++++++ Admin/Install/Taxes/taxes.json | 31 +++- Admin/Routes/Web/Api.php | 4 + Admin/Routes/Web/Backend.php | 23 +++ Controller/ApiBillController.php | 6 +- Controller/ApiPurchaseController.php | 32 ++++ Controller/BackendController.php | 54 ++++++ Models/BillElement.php | 1 - Models/BillMapper.php | 1 - Models/PermissionCategory.php | 2 + Models/SalesBillMapper.php | 154 ++++++++++++++---- Models/SettingsEnum.php | 3 + Theme/Backend/Lang/de.lang.php | 3 + Theme/Backend/Lang/en.lang.php | 3 + .../finance-taxcombination-list.tpl.php | 72 ++++++++ Theme/Backend/payment-view.tpl.php | 6 +- Theme/Backend/purchase-bill.tpl.php | 4 +- Theme/Backend/shipping-view.tpl.php | 6 +- 19 files changed, 412 insertions(+), 53 deletions(-) create mode 100644 Theme/Backend/finance-taxcombination-list.tpl.php diff --git a/Admin/Install/Admin.install.php b/Admin/Install/Admin.install.php index eb3e87a..9f802bd 100644 --- a/Admin/Install/Admin.install.php +++ b/Admin/Install/Admin.install.php @@ -23,4 +23,18 @@ return [ 'pattern' => '', 'module' => ApiController::NAME, ], + [ + 'type' => 'setting', + 'name' => SettingsEnum::BILLING_DOCUMENT_SPACER_COLOR, + 'content' => '15613766', + 'pattern' => '\d', + 'module' => ApiController::NAME, + ], + [ + 'type' => 'setting', + 'name' => SettingsEnum::BILLING_DOCUMENT_SPACER_TOLERANCE, + 'content' => '175', + 'pattern' => '\d', + 'module' => ApiController::NAME, + ], ]; diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 61df907..e874722 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -337,5 +337,51 @@ ] } ] + }, + { + "id": 1005103001, + "pid": "/", + "type": 2, + "subtype": 1, + "name": "TaxCombinations", + "uri": "{/base}/finance/tax/combination/list?{?}", + "target": "self", + "icon": null, + "order": 2, + "from": "Billing", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1008101001, + "children": [ + { + "id": 1005103002, + "pid": "/finance/tax/combination", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "{/base}/finance/tax/combination/list?{?}", + "target": "self", + "icon": null, + "order": 1, + "from": "Billing", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1005103001, + "children": [] + }, + { + "id": 1005103003, + "pid": "/finance/tax/combination", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "{/base}/finance/tax/combination/create?{?}", + "target": "self", + "icon": null, + "order": 5, + "from": "Billing", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1005103001, + "children": [] + } + ] } ] diff --git a/Admin/Install/Taxes/taxes.json b/Admin/Install/Taxes/taxes.json index 68e2d49..340a123 100644 --- a/Admin/Install/Taxes/taxes.json +++ b/Admin/Install/Taxes/taxes.json @@ -1,4 +1,11 @@ [ + { + "type": 1, + "item_code": "GENERAL", + "account_code": "EU_S", + "tax_code": "EU_S0", + "account": "8400" + }, { "type": 1, "item_code": "GENERAL", @@ -83,14 +90,14 @@ { "type": 1, "item_code": "GENERAL", - "account_code": "DE_0", + "account_code": "DE_S", "tax_code": "SBIZ_0", "account": "8195" }, { "type": 2, "item_code": "GENERAL", - "account_code": "DE_0", + "account_code": "DE_S", "tax_code": "SBIZ_0", "account": "3349" }, @@ -202,6 +209,12 @@ "account_code": "INT", "tax_code": "S0" }, + { + "type": 1, + "item_code": "SOFTWARE", + "account_code": "EU_S", + "tax_code": "EU_S0" + }, { "type": 1, "item_code": "SOFTWARE", @@ -285,14 +298,14 @@ { "type": 1, "item_code": "SOFTWARE", - "account_code": "DE_0", + "account_code": "DE_S", "tax_code": "SBIZ_0", "account": "8195" }, { "type": 2, "item_code": "SOFTWARE", - "account_code": "DE_0", + "account_code": "DE_S", "tax_code": "SBIZ_0", "account": "3349" }, @@ -404,6 +417,12 @@ "account_code": "INT", "tax_code": "S0" }, + { + "type": 1, + "item_code": "SERVICE", + "account_code": "EU_S", + "tax_code": "EU_S0" + }, { "type": 1, "item_code": "SERVICE", @@ -487,14 +506,14 @@ { "type": 1, "item_code": "SERVICE", - "account_code": "DE_0", + "account_code": "DE_S", "tax_code": "SBIZ_0", "account": "8195" }, { "type": 2, "item_code": "SERVICE", - "account_code": "DE_0", + "account_code": "DE_S", "tax_code": "SBIZ_0", "account": "3349" }, diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index c1fc2c2..a1723b2 100755 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -22,6 +22,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\ApiBillController:apiMediaRender', 'verb' => RouteVerb::GET, + 'csrf' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, @@ -33,6 +34,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\ApiBillController:apiPreviewRender', 'verb' => RouteVerb::GET, + 'csrf' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, @@ -44,6 +46,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\ApiPriceController:apiPriceCreate', 'verb' => RouteVerb::GET, + 'csrf' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, @@ -55,6 +58,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\ApiPurchaseController:apiInvoiceParse', 'verb' => RouteVerb::SET, + 'csrf' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::MODIFY, diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 0211820..8b4e446 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -275,4 +275,27 @@ return [ ], ], ], + + '^.*/finance/tax/combination/list(\?.*$|$)' => [ + [ + 'dest' => '\Modules\Billing\Controller\BackendController:viewTaxCombinationList', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::CREATE, + 'state' => PermissionCategory::TAX, + ], + ], + ], + '^.*/finance/tax/combination/create(\?.*$|$)' => [ + [ + 'dest' => '\Modules\Billing\Controller\BackendController:viewTaxCombinationCreate', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::CREATE, + 'state' => PermissionCategory::TAX, + ], + ], + ], ]; diff --git a/Controller/ApiBillController.php b/Controller/ApiBillController.php index de05da4..7e0dceb 100755 --- a/Controller/ApiBillController.php +++ b/Controller/ApiBillController.php @@ -440,7 +440,7 @@ final class ApiBillController extends Controller // @todo use bill and shipping address instead of main address if available // https://github.com/Karaka-Management/oms-Billing/issues/45 - $bill->billTo = $request->getDataString('billto') ?? $account->account->name1; + $bill->billTo = $request->getDataString('billto') ?? $account->account->name1 . ' ' . $account->account->name2; $bill->billAddress = $request->getDataString('billaddress') ?? $account->mainAddress->address; $bill->billCity = $request->getDataString('billtocity') ?? $account->mainAddress->city; $bill->billZip = $request->getDataString('billtopostal') ?? $account->mainAddress->postal; @@ -481,7 +481,7 @@ final class ApiBillController extends Controller $settings = $this->app->appSettings->get(null, SettingsEnum::VALID_BILL_LANGUAGES, unit: $this->app->unitId, - module: 'Admin' + module: self::NAME ); if (empty($settings)) { @@ -489,7 +489,7 @@ final class ApiBillController extends Controller $settings = $this->app->appSettings->get(null, SettingsEnum::VALID_BILL_LANGUAGES, unit: null, - module: 'Admin' + module: self::NAME ); } diff --git a/Controller/ApiPurchaseController.php b/Controller/ApiPurchaseController.php index 5837e6c..56d83f1 100755 --- a/Controller/ApiPurchaseController.php +++ b/Controller/ApiPurchaseController.php @@ -111,7 +111,39 @@ final class ApiPurchaseController extends Controller $bills = []; $files = \array_merge($request->files, $request->getDataJson('media')); + + /** @var \Model\Setting[] $settings */ + $settings = $this->app->appSettings->get(null, + [SettingsEnum::BILLING_DOCUMENT_SPACER_COLOR, SettingsEnum::BILLING_DOCUMENT_SPACER_TOLERANCE], + unit: $this->app->unitId, + module: self::NAME + ); + + if (empty($settings)) { + /** @var \Model\Setting[] $settings */ + $settings = $this->app->appSettings->get(null, + [SettingsEnum::BILLING_DOCUMENT_SPACER_COLOR, SettingsEnum::BILLING_DOCUMENT_SPACER_TOLERANCE], + unit: null, + module: self::NAME + ); + } + foreach ($files as $file) { + // 1. convert to image pdftoppm + // 2. search for color pages by using averageColorRandom (tolerance < 175 = color match) + // 3. split pdf document if necessary + // sudo apt-get --yes install pdftk + // pdftk foo-bar.pdf cat 1-12 output foo.pdf + // pdftk foo-bar.pdf cat 13-end output bar.pdf + // alternatively, pdfseparate -f 1 -l 5 input.pdf output-page%d.pdf + // alternatively, pdfjam -o + // alternatively, pdfly cat in.pdf 2:4 -o out.pdf + // 4. add to documents array + } + + $documents = $files; + + foreach ($documents as $file) { // Create default bill $billRequest = new HttpRequest(); $billRequest->header->account = $request->header->account; diff --git a/Controller/BackendController.php b/Controller/BackendController.php index ebb24c9..b55afc1 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -29,6 +29,7 @@ use Modules\Billing\Models\SettingsEnum; use Modules\Billing\Models\ShippingTermL11nMapper; use Modules\Billing\Models\ShippingTermMapper; use Modules\Billing\Models\StockBillMapper; +use Modules\Billing\Models\Tax\TaxCombinationMapper; use phpOMS\Account\PermissionType; use phpOMS\Contract\RenderableInterface; use phpOMS\DataStorage\Database\Query\OrderType; @@ -725,4 +726,57 @@ final class BackendController extends Controller return $view; } + + /** + * Method which shows the sales dashboard + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface Response can be rendered + * + * @since 1.0.0 + */ + public function viewTaxCombinationList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + $view->setTemplate('/Modules/Billing/Theme/Backend/finance-taxcombination-list'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005103001, $request, $response); + + $view->data['taxcombination'] = TaxCombinationMapper::getAll() + ->with('clientCode') + ->with('supplierCode') + ->with('itemCode') + ->with('taxCode') + ->executeGetArray(); + + return $view; + } + + /** + * Method which shows the sales dashboard + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface Response can be rendered + * + * @since 1.0.0 + */ + public function viewTaxCombinationView(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + $view->setTemplate('/Modules/Billing/Theme/Backend/finance-taxcombination-view'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005103001, $request, $response); + + $view->data['taxcombination'] = TaxCombinationMapper::getAll() + ->with('clientCode') + ->with('supplierCode') + ->with('itemCode') + ->executeGetArray(); + + return $view; + } } diff --git a/Models/BillElement.php b/Models/BillElement.php index 5ea3b20..8938dab 100755 --- a/Models/BillElement.php +++ b/Models/BillElement.php @@ -15,7 +15,6 @@ declare(strict_types=1); namespace Modules\Billing\Models; use Modules\Billing\Models\Tax\TaxCombination; -use Modules\Finance\Models\TaxCode; use Modules\ItemManagement\Models\Container; use Modules\ItemManagement\Models\Item; use Modules\ItemManagement\Models\NullItem; diff --git a/Models/BillMapper.php b/Models/BillMapper.php index 1a7295c..067dd19 100755 --- a/Models/BillMapper.php +++ b/Models/BillMapper.php @@ -18,7 +18,6 @@ use Modules\Admin\Models\AccountMapper; use Modules\Billing\Models\Attribute\BillAttributeMapper; use Modules\ClientManagement\Models\ClientMapper; use Modules\Editor\Models\EditorDocMapper; -use Modules\Media\Models\CollectionMapper; use Modules\Media\Models\MediaMapper; use Modules\SupplierManagement\Models\SupplierMapper; use phpOMS\DataStorage\Database\Mapper\DataMapperFactory; diff --git a/Models/PermissionCategory.php b/Models/PermissionCategory.php index d4d1c65..e0c41b1 100755 --- a/Models/PermissionCategory.php +++ b/Models/PermissionCategory.php @@ -45,4 +45,6 @@ abstract class PermissionCategory extends Enum public const SHIPPING_TERM = 10; public const BILL_LOG = 101; + + public const TAX = 201; } diff --git a/Models/SalesBillMapper.php b/Models/SalesBillMapper.php index 3042174..e68d7ce 100755 --- a/Models/SalesBillMapper.php +++ b/Models/SalesBillMapper.php @@ -16,7 +16,7 @@ namespace Modules\Billing\Models; use Modules\ClientManagement\Models\ClientMapper; use phpOMS\DataStorage\Database\Query\Builder; -use phpOMS\Localization\Defaults\CountryMapper; +use phpOMS\DataStorage\Database\Query\OrderType; use phpOMS\Stdlib\Base\FloatInt; /** @@ -257,13 +257,16 @@ final class SalesBillMapper extends BillMapper { $query = new Builder(self::$db); $query->selectAs(ClientMapper::TABLE . '.clientmgmt_client_id', 'client') - ->selectAs('SUM(' . BillElementMapper::TABLE . '.billing_bill_element_total_netsalesprice)', 'net_sales') + ->selectAs('SUM(' . BillElementMapper::TABLE . '.billing_bill_element_total_netsalesprice * billing_type_transfer_sign)', 'net_sales') ->from(ClientMapper::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') + ->leftJoin(BillTypeMapper::TABLE) + ->on(self::TABLE . '.billing_bill_type', '=', BillTypeMapper::TABLE . '.billing_type_id') ->where(BillElementMapper::TABLE . '.billing_bill_element_item', '=', $id) + ->andWhere(BillTypeMapper::TABLE . '.billing_type_accounting', '=', true) ->andWhere(self::TABLE . '.billing_bill_performance_date', '>=', $start) ->andWhere(self::TABLE . '.billing_bill_performance_date', '<=', $end) ->orderBy('net_sales', 'DESC') @@ -294,28 +297,27 @@ final class SalesBillMapper extends BillMapper * Placeholder * @todo Implement */ - public static function getItemBills(int $id, \DateTime $start, \DateTime $end) : array + public static function getItemBills(int $id, \DateTime $start, \DateTime $end, int $limit = 10000) : array { $query = self::reader() ->with('type') ->with('type/l11n') ->where('type/l11n/language', 'en') + ->where('createdAt', $start, '>=') + ->where('createdAt', $end, '<=') + ->sort('id', OrderType::DESC) + ->limit($limit) ->getQuery(); $query->leftJoin(BillElementMapper::TABLE, BillElementMapper::TABLE . '_d1') ->on(self::TABLE . '_d1.billing_bill_id', '=', BillElementMapper::TABLE . '_d1.billing_bill_element_bill') ->where(BillElementMapper::TABLE . '_d1.billing_bill_element_item', '=', $id); - /** @phpstan-ignore-next-line */ - if (!empty(self::CREATED_AT)) { - $query->orderBy(self::TABLE . '_d1.' . self::COLUMNS[self::CREATED_AT]['name'], 'DESC'); - } else { - $query->orderBy(self::TABLE . '_d1.' . self::COLUMNS[self::PRIMARYFIELD]['name'], 'DESC'); - } - return self::getAll() ->with('type') ->with('type/l11n') + ->sort('id', OrderType::DESC) + ->limit($limit) ->execute($query); } @@ -353,26 +355,43 @@ final class SalesBillMapper extends BillMapper * Placeholder * @todo Implement */ - public static function getItemCountrySales(int $id, \DateTime $start, \DateTime $end, int $limit = 10) : array + public static function getItemCountrySales(int $item, \DateTime $start, \DateTime $end, int $limit = 10) : array { - $query = new Builder(self::$db); - $result = $query->select(CountryMapper::TABLE . '.country_code2') - ->selectAs('SUM(billing_bill_element_total_netsalesprice)', 'net_sales') - ->from(self::TABLE) - ->leftJoin(BillElementMapper::TABLE) - ->on(self::TABLE . '.billing_bill_id', '=', BillElementMapper::TABLE . '.billing_bill_element_bill') - ->leftJoin(CountryMapper::TABLE) - ->on(self::TABLE . '.billing_bill_billCountry', '=', CountryMapper::TABLE . '.country_code2') - ->where(BillElementMapper::TABLE . '.billing_bill_element_item', '=', $id) - ->andWhere(self::TABLE . '.billing_bill_performance_date', '>=', $start) - ->andWhere(self::TABLE . '.billing_bill_performance_date', '<=', $end) - ->groupBy(CountryMapper::TABLE . '.country_code2') - ->orderBy('net_sales', 'DESC') - ->limit($limit) - ->execute() - ?->fetchAll(\PDO::FETCH_KEY_PAIR); + $sql = <<= '{$start->format('Y-m-d H:i:s')}' + AND billing_bill_performance_date <= '{$end->format('Y-m-d H:i:s')}' + GROUP BY + billing_bill_billCountry + LIMIT {$limit}; + SQL; - return $result ?? []; + $query = new Builder(self::$db); + $results = $query->raw($sql)->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? []; + + if ($results === false) { + return []; + } + + $hasData = false; + foreach ($results as $result) { + if ($result !== "0" || $result > 0) { + $hasData = true; + break; + } + } + + return $hasData ? $results : []; } /** @@ -390,14 +409,16 @@ final class SalesBillMapper extends BillMapper $sql = <<= '{$start->format('Y-m-d H:i:s')}' AND billing_bill_performance_date <= '{$end->format('Y-m-d H:i:s')}' GROUP BY billing_bill_element_item, year, month @@ -405,9 +426,23 @@ final class SalesBillMapper extends BillMapper SQL; $query = new Builder(self::$db); - $result = $query->raw($sql)->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? []; + $results = $query->raw($sql)->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? []; - return $result ?? []; + if ($results === false) { + return []; + } + + $hasData = false; + foreach ($results as $result) { + if ($result['net_sales'] !== "0" || $result['net_sales'] > 0 + || $result['net_costs'] !== "0" || $result['net_costs'] > 0 + ) { + $hasData = true; + break; + } + } + + return $hasData ? $results : []; } /** @@ -452,13 +487,15 @@ final class SalesBillMapper extends BillMapper { $sql = <<= '{$start->format('Y-m-d H:i:s')}' AND billing_bill_performance_date <= '{$end->format('Y-m-d H:i:s')}' GROUP BY year, month @@ -493,6 +530,55 @@ final class SalesBillMapper extends BillMapper return new FloatInt((int) ($result[0]['net_sales'] ?? 0)); } + /** + * Placeholder + * @todo Implement + */ + public static function getClientAttributeNetSales( + int $client, + string $attribute, + string $language, + \DateTime $start, + \DateTime $end + ) : array + { + $sql = <<= '{$start->format('Y-m-d H:i:s')}' + AND billing_bill_performance_date <= '{$end->format('Y-m-d H:i:s')}' + AND itemmgmt_attr_type_name = '{$attribute}' + GROUP BY + itemmgmt_attr_value_l11n_title; + SQL; + + $query = new Builder(self::$db); + $result = $query->raw($sql)->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? []; + + return $result; + } + /** * Placeholder * @todo Implement diff --git a/Models/SettingsEnum.php b/Models/SettingsEnum.php index e087a8b..d846c0a 100755 --- a/Models/SettingsEnum.php +++ b/Models/SettingsEnum.php @@ -37,4 +37,7 @@ abstract class SettingsEnum extends Enum public const BILLING_CUSTOMER_EMAIL_TEMPLATE = '1005100004'; // Email template for customer billing public const BILLING_SUPPLIER_EMAIL_TEMPLATE = '1005100005'; // Email template for supplier billing + + public const BILLING_DOCUMENT_SPACER_COLOR = '1005100101'; + public const BILLING_DOCUMENT_SPACER_TOLERANCE = '1005100102'; } diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index 1393a2f..0df065f 100755 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -81,6 +81,9 @@ return ['Billing' => [ 'Upload' => 'Hochladen', 'Zip' => 'Zip', 'Files' => 'Files', + 'TaxCode' => 'Steuerkz.', + 'PL' => 'GuV', + 'TaxCombinations' => 'Steuerkomb.', 'PaymentTerms' => 'Zahlungsbedingungen', 'ShippingTerms' => 'Lieferbedingungen', 'PaymentTerm' => 'Zahlungsbedingung', diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 40d00c6..9d8cf50 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -81,6 +81,9 @@ return ['Billing' => [ 'Upload' => 'Upload', 'Zip' => 'Zip', 'Files' => 'Files', + 'TaxCode' => 'Tax Code', + 'PL' => 'PL', + 'TaxCombinations' => 'Tax Combinations', 'PaymentTerms' => 'Payment Terms', 'ShippingTerms' => 'Shipping Terms', 'PaymentTerm' => 'Payment Term', diff --git a/Theme/Backend/finance-taxcombination-list.tpl.php b/Theme/Backend/finance-taxcombination-list.tpl.php new file mode 100644 index 0000000..1aa6472 --- /dev/null +++ b/Theme/Backend/finance-taxcombination-list.tpl.php @@ -0,0 +1,72 @@ +data['taxcombination']; + +$previous = empty($taxcombination) ? '{/base}/finance/tax/combination/list' : '{/base}/finance/tax/combination/list?{?}&id=' . \reset($taxcombination)->id . '&ptype=p'; +$next = empty($taxcombination) ? '{/base}/finance/tax/combination/list' : '{/base}/finance/tax/combination/list?{?}&id=' . \end($taxcombination)->id . '&ptype=n'; + +echo $this->data['nav']->render(); ?> +
+
+
+
getHtml('TaxCombinations'); ?>download
+ + + + + $value) : ++$count; + $url = UriFactory::build('{/base}/finance/tax/combination/view?{?}&id=' . $value->id); ?> + +
getHtml('ID', '0', '0'); ?> + getHtml('Client'); ?> + getHtml('Supplier'); ?> + getHtml('Item'); ?> + getHtml('TaxCode'); ?> + getHtml('Tax'); ?> + getHtml('PL'); ?> +
+ id; ?> + + printHtml($value->clientCode->getValue()); ?> + + printHtml($value->supplierCode->getValue()); ?> + + printHtml($value->itemCode->getValue()); ?> + + printHtml($value->taxCode->abbr); ?> + + taxCode->percentageInvoice / 10000; ?> % + + printHtml($value->account); ?> + + +
getHtml('Empty', '0', '0'); ?> + +
+ +
+
diff --git a/Theme/Backend/payment-view.tpl.php b/Theme/Backend/payment-view.tpl.php index 59f591d..072775f 100644 --- a/Theme/Backend/payment-view.tpl.php +++ b/Theme/Backend/payment-view.tpl.php @@ -22,7 +22,7 @@ echo $this->data['nav']->render(); ?>
-
@@ -30,7 +30,7 @@ echo $this->data['nav']->render(); ?>
- +
@@ -47,7 +47,7 @@ echo $this->data['nav']->render(); ?> data['l11nView']->render( $this->data['l11nValues'], [], - '{/api}bill/payment/l11n' + '{/api}bill/payment/l11n?csrf={$CSRF}' ); ?>
\ No newline at end of file diff --git a/Theme/Backend/purchase-bill.tpl.php b/Theme/Backend/purchase-bill.tpl.php index e912d1f..a03c8dc 100755 --- a/Theme/Backend/purchase-bill.tpl.php +++ b/Theme/Backend/purchase-bill.tpl.php @@ -438,7 +438,7 @@ echo $this->data['nav']->render(); ?>
@@ -453,7 +453,7 @@ echo $this->data['nav']->render(); ?>
diff --git a/Theme/Backend/shipping-view.tpl.php b/Theme/Backend/shipping-view.tpl.php index 796d49d..6f7a540 100644 --- a/Theme/Backend/shipping-view.tpl.php +++ b/Theme/Backend/shipping-view.tpl.php @@ -22,7 +22,7 @@ echo $this->data['nav']->render(); ?>
- @@ -30,7 +30,7 @@ echo $this->data['nav']->render(); ?>
- +
@@ -47,7 +47,7 @@ echo $this->data['nav']->render(); ?> data['l11nView']->render( $this->data['l11nValues'], [], - '{/api}bill/shipping/l11n' + '{/api}bill/shipping/l11n?csrf={$CSRF}' ); ?>
\ No newline at end of file From 4ebb4bc2856aa8c9848dcde9ceeffbac24d997df Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 29 Mar 2024 15:27:30 +0000 Subject: [PATCH 04/11] remove dynamic start for routes --- Admin/Routes/Web/Backend.php | 50 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 8b4e446..420bf90 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -18,7 +18,7 @@ use phpOMS\Account\PermissionType; use phpOMS\Router\RouteVerb; return [ - '^.*/sales/bill/create(\?.*$|$)' => [ + '^/sales/bill/create(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingSalesInvoiceCreate', 'verb' => RouteVerb::GET, @@ -29,7 +29,7 @@ return [ ], ], ], - '^.*/sales/bill/list(\?.*$|$)' => [ + '^/sales/bill/list(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingSalesList', 'verb' => RouteVerb::GET, @@ -40,7 +40,7 @@ return [ ], ], ], - '^.*/sales/bill/archive(\?.*$|$)' => [ + '^/sales/bill/archive(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingSalesArchive', 'verb' => RouteVerb::GET, @@ -51,7 +51,7 @@ return [ ], ], ], - '^.*/sales/bill(\?.*$|$)' => [ + '^/sales/bill(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingSalesInvoice', 'verb' => RouteVerb::GET, @@ -63,7 +63,7 @@ return [ ], ], - '^.*/purchase/bill/create(\?.*$|$)' => [ + '^/purchase/bill/create(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseInvoiceCreate', 'verb' => RouteVerb::GET, @@ -74,7 +74,7 @@ return [ ], ], ], - '^.*/purchase/bill/list(\?.*$|$)' => [ + '^/purchase/bill/list(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseList', 'verb' => RouteVerb::GET, @@ -85,7 +85,7 @@ return [ ], ], ], - '^.*/purchase/bill/archive(\?.*$|$)' => [ + '^/purchase/bill/archive(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseArchive', 'verb' => RouteVerb::GET, @@ -96,7 +96,7 @@ return [ ], ], ], - '^.*/purchase/bill(\?.*$|$)' => [ + '^/purchase/bill(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseInvoice', 'verb' => RouteVerb::GET, @@ -107,7 +107,7 @@ return [ ], ], ], - '^.*/purchase/bill/upload(\?.*$|$)' => [ + '^/purchase/bill/upload(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseInvoiceUpload', 'verb' => RouteVerb::GET, @@ -119,7 +119,7 @@ return [ ], ], - '^.*/warehouse/bill/create(\?.*$|$)' => [ + '^/warehouse/bill/create(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingStockInvoiceCreate', 'verb' => RouteVerb::GET, @@ -130,7 +130,7 @@ return [ ], ], ], - '^.*/warehouse/bill/list(\?.*$|$)' => [ + '^/warehouse/bill/list(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingStockList', 'verb' => RouteVerb::GET, @@ -141,7 +141,7 @@ return [ ], ], ], - '^.*/warehouse/bill/archive(\?.*$|$)' => [ + '^/warehouse/bill/archive(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingStockArchive', 'verb' => RouteVerb::GET, @@ -152,7 +152,7 @@ return [ ], ], ], - '^.*/warehouse/bill(\?.*$|$)' => [ + '^/warehouse/bill(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingStockInvoice', 'verb' => RouteVerb::GET, @@ -164,7 +164,7 @@ return [ ], ], - '^.*/private/purchase/recognition/dashboard(\?.*$|$)' => [ + '^/private/purchase/recognition/dashboard(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPrivatePurchaseBillDashboard', 'verb' => RouteVerb::GET, @@ -175,7 +175,7 @@ return [ ], ], ], - '^.*/private/purchase/recognition/upload(\?.*$|$)' => [ + '^/private/purchase/recognition/upload(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPrivatePurchaseBillUpload', 'verb' => RouteVerb::GET, @@ -186,7 +186,7 @@ return [ ], ], ], - '^.*/private/purchase/recognition/bill(\?.*$|$)' => [ + '^/private/purchase/recognition/bill(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPrivateBillingPurchaseInvoice', 'verb' => RouteVerb::GET, @@ -197,7 +197,7 @@ return [ ], ], ], - '^.*/purchase/recognition/dashboard(\?.*$|$)' => [ + '^/purchase/recognition/dashboard(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPrivatePurchaseBillDashboard', 'verb' => RouteVerb::GET, @@ -208,7 +208,7 @@ return [ ], ], ], - '^.*/purchase/recognition/upload(\?.*$|$)' => [ + '^/purchase/recognition/upload(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPrivatePurchaseBillUpload', 'verb' => RouteVerb::GET, @@ -219,7 +219,7 @@ return [ ], ], ], - '^.*/purchase/recognition/bill(\?.*$|$)' => [ + '^/purchase/recognition/bill(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPrivateBillingPurchaseInvoice', 'verb' => RouteVerb::GET, @@ -231,7 +231,7 @@ return [ ], ], - '^.*/bill/payment/list(\?.*$|$)' => [ + '^/bill/payment/list(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPaymentList', 'verb' => RouteVerb::GET, @@ -242,7 +242,7 @@ return [ ], ], ], - '^.*/bill/payment/view(\?.*$|$)' => [ + '^/bill/payment/view(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPaymentView', 'verb' => RouteVerb::GET, @@ -253,7 +253,7 @@ return [ ], ], ], - '^.*/bill/shipping/list(\?.*$|$)' => [ + '^/bill/shipping/list(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewShippingList', 'verb' => RouteVerb::GET, @@ -264,7 +264,7 @@ return [ ], ], ], - '^.*/bill/shipping/view(\?.*$|$)' => [ + '^/bill/shipping/view(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewShippingView', 'verb' => RouteVerb::GET, @@ -276,7 +276,7 @@ return [ ], ], - '^.*/finance/tax/combination/list(\?.*$|$)' => [ + '^/finance/tax/combination/list(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewTaxCombinationList', 'verb' => RouteVerb::GET, @@ -287,7 +287,7 @@ return [ ], ], ], - '^.*/finance/tax/combination/create(\?.*$|$)' => [ + '^/finance/tax/combination/create(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewTaxCombinationCreate', 'verb' => RouteVerb::GET, From d194aade27ad1af36f8712c77661941dede3bb59 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 2 Apr 2024 21:40:47 +0000 Subject: [PATCH 05/11] template fixes + bug fixes + style fixes --- Admin/Install/paymentterms.json | 49 ++++ Admin/Routes/Web/Api.php | 12 + Admin/Routes/Web/Backend.php | 6 +- Controller/ApiPriceController.php | 12 +- Controller/ApiTaxController.php | 2 +- Controller/BackendController.php | 227 +++++++++++------- Controller/CliController.php | 2 +- Models/BillMapper.php | 2 +- Models/PurchaseBillMapper.php | 163 ++++++++++++- Models/SalesBillMapper.php | 22 +- Models/SettingsEnum.php | 1 + Models/StockBillMapper.php | 4 +- Theme/Backend/Lang/de.lang.php | 163 +++++++------ Theme/Backend/Lang/en.lang.php | 163 +++++++------ .../finance-taxcombination-list.tpl.php | 4 +- Theme/Backend/purchase-bill-list.tpl.php | 2 +- Theme/Backend/purchase-bill-upload.tpl.php | 44 ++++ Theme/Backend/purchase-bill.tpl.php | 2 +- Theme/Backend/sales-bill-list.tpl.php | 2 +- .../user-purchase-bill-dashboard.tpl.php | 202 ---------------- tests/Models/BillTest.php | 2 +- 21 files changed, 600 insertions(+), 486 deletions(-) create mode 100644 Theme/Backend/purchase-bill-upload.tpl.php delete mode 100755 Theme/Backend/user-purchase-bill-dashboard.tpl.php diff --git a/Admin/Install/paymentterms.json b/Admin/Install/paymentterms.json index 394d4ef..02e9ec6 100644 --- a/Admin/Install/paymentterms.json +++ b/Admin/Install/paymentterms.json @@ -41,6 +41,27 @@ "de" : "Zahlung fällig 90 Tage nach Rechnungsdatum" } }, + { + "name": "Net 120", + "l11n": { + "en" : "Payment is due 120 days after the invoice date", + "de" : "Zahlung fällig 120 Tage nach Rechnungsdatum" + } + }, + { + "name": "Net 150", + "l11n": { + "en" : "Payment is due 150 days after the invoice date", + "de" : "Zahlung fällig 150 Tage nach Rechnungsdatum" + } + }, + { + "name": "Net 180", + "l11n": { + "en" : "Payment is due 180 days after the invoice date", + "de" : "Zahlung fällig 180 Tage nach Rechnungsdatum" + } + }, { "name": "COD", "l11n": { @@ -104,6 +125,34 @@ "de" : "3% Skonto innerhalb von 15 Tagen nach Rechnungsdatum, andernfalls fällig zum vollen Betrag nach 30 Tagen nach Rechnungsdatum" } }, + { + "name": "2/10 Net 60", + "l11n": { + "en" : "2% discount for payment within 10 days after invoice date; otherwise, the full amount is due in 60 days after invoice date", + "de" : "2% Skonto innerhalb von 10 Tagen nach Rechnungsdatum, andernfalls fällig zum vollen Betrag nach 60 Tagen nach Rechnungsdatum" + } + }, + { + "name": "3/10 Net 60", + "l11n": { + "en" : "3% discount for payment within 10 days after invoice date; otherwise, the full amount is due in 60 days after invoice date", + "de" : "3% Skonto innerhalb von 10 Tagen nach Rechnungsdatum, andernfalls fällig zum vollen Betrag nach 60 Tagen nach Rechnungsdatum" + } + }, + { + "name": "2/15 Net 60", + "l11n": { + "en" : "2% discount for payment within 15 days after invoice date; otherwise, the full amount is due in 60 days after invoice date", + "de" : "2% Skonto innerhalb von 15 Tagen nach Rechnungsdatum, andernfalls fällig zum vollen Betrag nach 60 Tagen nach Rechnungsdatum" + } + }, + { + "name": "3/15 Net 60", + "l11n": { + "en" : "3% discount for payment within 15 days after invoice date; otherwise, the full amount is due in 60 days after invoice date", + "de" : "3% Skonto innerhalb von 15 Tagen nach Rechnungsdatum, andernfalls fällig zum vollen Betrag nach 60 Tagen nach Rechnungsdatum" + } + }, { "name": "Escrow", "l11n": { diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index a1723b2..379c6ef 100755 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -66,4 +66,16 @@ return [ ], ], ], + '^.*/purchase/recognition/upload(\?.*$|$)' => [ + [ + 'dest' => '\Modules\Billing\Controller\ApiPurchaseController:apiPurchaseBillUpload', + 'verb' => RouteVerb::SET, + 'csrf' => true, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::CREATE, + 'state' => PermissionCategory::PURCHASE_INVOICE, + ], + ], + ], ]; diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 420bf90..5124c41 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -51,7 +51,7 @@ return [ ], ], ], - '^/sales/bill(\?.*$|$)' => [ + '^/sales/bill/view(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingSalesInvoice', 'verb' => RouteVerb::GET, @@ -113,7 +113,7 @@ return [ 'verb' => RouteVerb::GET, 'permission' => [ 'module' => BackendController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::CREATE, 'state' => PermissionCategory::SALES_INVOICE, ], ], @@ -181,7 +181,7 @@ return [ 'verb' => RouteVerb::GET, 'permission' => [ 'module' => BackendController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::CREATE, 'state' => PermissionCategory::PRIVATE_BILL_UPLOAD, ], ], diff --git a/Controller/ApiPriceController.php b/Controller/ApiPriceController.php index 1dd74dd..bfb0ded 100755 --- a/Controller/ApiPriceController.php +++ b/Controller/ApiPriceController.php @@ -506,8 +506,8 @@ final class ApiPriceController extends Controller $new->clientsection = $request->hasData('clientsection') ? new NullAttributeValue((int) $request->getData('clientsection')) : $new->clientsection; $new->clienttype = $request->hasData('clienttype') ? new NullAttributeValue((int) $request->getData('clienttype')) : $new->clienttype; - $new->supplier = $request->hasData('supplier') ? new NullSupplier((int) $request->getData('supplier')) : $new->supplier; - $new->unit = $request->getDataInt('unit') ?? $new->unit; + $new->supplier = $request->hasData('supplier') ? new NullSupplier((int) $request->getData('supplier')) : $new->supplier; + $new->unit = $request->getDataInt('unit') ?? $new->unit; $new->quantity = new FloatInt($request->getDataString('quantity') ?? $new->quantity->value); $new->price = new FloatInt($request->getDataString('price') ?? $new->price->value); @@ -516,10 +516,10 @@ final class ApiPriceController extends Controller $new->discountPercentage = new FloatInt($request->getDataString('discountPercentage') ?? $new->discountPercentage->value); $new->bonus = new FloatInt($request->getDataString('bonus') ?? $new->bonus->value); - $new->multiply = $request->getDataBool('multiply') ?? $new->multiply; - $new->currency = ISO4217CharEnum::tryFromValue($request->getDataString('currency')) ?? $new->currency; - $new->start = $request->getDataDateTime('start') ?? $new->start; - $new->end = $request->getDataDateTime('end') ?? $new->end; + $new->multiply = $request->getDataBool('multiply') ?? $new->multiply; + $new->currency = ISO4217CharEnum::tryFromValue($request->getDataString('currency')) ?? $new->currency; + $new->start = $request->getDataDateTime('start') ?? $new->start; + $new->end = $request->getDataDateTime('end') ?? $new->end; return $new; } diff --git a/Controller/ApiTaxController.php b/Controller/ApiTaxController.php index eebabc2..a5fa161 100755 --- a/Controller/ApiTaxController.php +++ b/Controller/ApiTaxController.php @@ -358,7 +358,7 @@ final class ApiTaxController extends Controller ->with('itemCode') ->where('clientCode/valueStr', $combination['account_code'] ?? '') ->where('itemCode/valueStr', $combination['item_code'] ?? '') - ->execute(); + ->executeGetArray(); if (\count($old) !== 1) { continue; diff --git a/Controller/BackendController.php b/Controller/BackendController.php index b55afc1..40627b8 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -23,12 +23,9 @@ use Modules\Billing\Models\BillTypeMapper; use Modules\Billing\Models\PaymentTermL11nMapper; use Modules\Billing\Models\PaymentTermMapper; use Modules\Billing\Models\PermissionCategory; -use Modules\Billing\Models\PurchaseBillMapper; -use Modules\Billing\Models\SalesBillMapper; use Modules\Billing\Models\SettingsEnum; use Modules\Billing\Models\ShippingTermL11nMapper; use Modules\Billing\Models\ShippingTermMapper; -use Modules\Billing\Models\StockBillMapper; use Modules\Billing\Models\Tax\TaxCombinationMapper; use phpOMS\Account\PermissionType; use phpOMS\Contract\RenderableInterface; @@ -67,7 +64,7 @@ final class BackendController extends Controller $view->setTemplate('/Modules/Billing/Theme/Backend/sales-bill-list'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005104001, $request, $response); - $mapperQuery = SalesBillMapper::getAll() + $mapperQuery = BillMapper::getAll() ->with('type') ->with('type/l11n') ->with('client') @@ -76,23 +73,19 @@ final class BackendController extends Controller ->where('type/l11n/language', $response->header->l11n->language) ->sort('id', OrderType::DESC) ->where('unit', $this->app->unitId) + ->where('client', null, '!=') ->limit(25); if ($request->getData('ptype') === 'p') { - $view->data['bills'] = $mapperQuery - ->where('id', $request->getDataInt('id') ?? 0, '<') - ->where('client', null, '!=') - ->execute(); + $mapperQuery->where('id', $request->getDataInt('offset') ?? 0, '<'); } elseif ($request->getData('ptype') === 'n') { - $view->data['bills'] = $mapperQuery->where('id', $request->getDataInt('id') ?? 0, '>') - ->where('client', null, '!=') - ->execute(); + $mapperQuery->where('id', $request->getDataInt('offset') ?? 0, '>'); } else { - $view->data['bills'] = $mapperQuery->where('id', 0, '>') - ->where('client', null, '!=') - ->execute(); + $mapperQuery->where('id', 0, '>'); } + $view->data['bills'] = $mapperQuery->execute(); + return $view; } @@ -114,7 +107,7 @@ final class BackendController extends Controller $view->setTemplate('/Modules/Billing/Theme/Backend/sales-bill-list'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005104001, $request, $response); - $mapperQuery = SalesBillMapper::getAll() + $view->data['bills'] = BillMapper::getAll() ->with('type') ->with('type/l11n') ->with('client') @@ -123,22 +116,88 @@ final class BackendController extends Controller ->where('type/l11n/language', $response->header->l11n->language) ->sort('id', OrderType::DESC) ->where('unit', $this->app->unitId) - ->limit(25); + ->where('client', null, '!=') + ->limit(25) + ->paginate( + 'id', + $request->getDataString('ptype') ?? '', + $request->getDataInt('offset') + )->executeGetArray(); - if ($request->getData('ptype') === 'p') { - $view->data['bills'] = $mapperQuery - ->where('id', $request->getDataInt('id') ?? 0, '<') - ->where('client', null, '!=') - ->execute(); - } elseif ($request->getData('ptype') === 'n') { - $view->data['bills'] = $mapperQuery->where('id', $request->getDataInt('id') ?? 0, '>') - ->where('client', null, '!=') - ->execute(); - } else { - $view->data['bills'] = $mapperQuery->where('id', 0, '>') - ->where('client', null, '!=') - ->execute(); - } + return $view; + } + + /** + * Routing end-point for application behavior. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewBillingStockArchive(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + $view->setTemplate('/Modules/Billing/Theme/Backend/sales-bill-list'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005106001, $request, $response); + + $view->data['bills'] = BillMapper::getAll() + ->with('type') + ->with('type/l11n') + ->with('client') + ->where('status', BillStatus::DRAFT, '!=') + ->where('type/transferType', BillTransferType::STOCK) + ->where('type/l11n/language', $response->header->l11n->language) + ->sort('id', OrderType::DESC) + ->where('unit', $this->app->unitId) + ->limit(25) + ->paginate( + 'id', + $request->getDataString('ptype') ?? '', + $request->getDataInt('offset') + )->executeGetArray(); + + return $view; + } + + /** + * Routing end-point for application behavior. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewBillingPurchaseArchive(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + $view->setTemplate('/Modules/Billing/Theme/Backend/purchase-bill-list'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005105001, $request, $response); + + $view->data['bills'] = BillMapper::getAll() + ->with('type') + ->with('type/l11n') + ->with('supplier') + ->where('status', BillStatus::DRAFT, '!=') + ->where('type/transferType', BillTransferType::PURCHASE) + ->where('type/l11n/language', $response->header->l11n->language) + ->sort('id', OrderType::DESC) + ->where('unit', $this->app->unitId) + ->where('supplier', null, '!=') + ->limit(25) + ->paginate( + 'id', + $request->getDataString('ptype') ?? '', + $request->getDataInt('offset') + )->executeGetArray(); return $view; } @@ -162,7 +221,7 @@ final class BackendController extends Controller $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005104001, $request, $response); /** @var \Modules\Billing\Models\Bill $bill */ - $bill = SalesBillMapper::get() + $bill = BillMapper::get() ->with('client') ->with('elements') ->with('elements/container') @@ -179,7 +238,7 @@ final class BackendController extends Controller ->where('isTemplate', false) ->where('transferType', BillTransferType::SALES) ->where('l11n/language', $request->header->l11n->language) - ->execute(); + ->executeGetArray(); $view->data['billtypes'] = $billTypes; @@ -198,7 +257,7 @@ final class BackendController extends Controller ->where('module', 'Billing') ->where('type', StringUtils::intHash(BillMapper::class)) ->where('ref', $bill->id) - ->execute(); + ->executeGetArray(); if (!empty($bill->elements)) { /** @var \Modules\Auditor\Models\Audit[] $logsElements */ @@ -207,7 +266,7 @@ final class BackendController extends Controller ->where('module', 'Billing') ->where('type', StringUtils::intHash(BillElementMapper::class)) ->where('ref', \array_keys($bill->elements), 'IN') - ->execute(); + ->executeGetArray(); $logs = \array_merge($logs, $logsElements); } @@ -242,7 +301,7 @@ final class BackendController extends Controller ->where('isTemplate', false) ->where('transferType', BillTransferType::SALES) ->where('l11n/language', $request->header->l11n->language) - ->execute(); + ->executeGetArray(); $view->data['billtypes'] = $billTypes; @@ -267,7 +326,9 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/Billing/Theme/Backend/bill-create'); - $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005104001, $request, $response); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005105001, $request, $response); + + $view->data['media-upload'] = new \Modules\Media\Theme\Backend\Components\Upload\BaseView($this->app->l11nManager, $request, $response); return $view; } @@ -288,7 +349,9 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/Billing/Theme/Backend/bill-create'); - $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005104001, $request, $response); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005106001, $request, $response); + + $view->data['media-upload'] = new \Modules\Media\Theme\Backend\Components\Upload\BaseView($this->app->l11nManager, $request, $response); return $view; } @@ -311,32 +374,21 @@ final class BackendController extends Controller $view->setTemplate('/Modules/Billing/Theme/Backend/purchase-bill-list'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005105001, $request, $response); - $mapperQuery = PurchaseBillMapper::getAll() + $view->data['bills'] = BillMapper::getAll() ->with('type') ->with('type/l11n') ->with('supplier') ->where('type/transferType', BillTransferType::PURCHASE) ->sort('id', OrderType::DESC) ->where('unit', $this->app->unitId) - ->limit(25); - - if ($request->getData('ptype') === 'p') { - $view->data['bills'] = $mapperQuery - ->where('id', $request->getDataInt('id') ?? 0, '<') - ->where('supplier', null, '!=') - ->where('type/l11n/language', $response->header->l11n->language) - ->execute(); - } elseif ($request->getData('ptype') === 'n') { - $view->data['bills'] = $mapperQuery->where('id', $request->getDataInt('id') ?? 0, '>') - ->where('supplier', null, '!=') - ->where('type/l11n/language', $response->header->l11n->language) - ->execute(); - } else { - $view->data['bills'] = $mapperQuery->where('id', 0, '>') - ->where('supplier', null, '!=') - ->where('type/l11n/language', $response->header->l11n->language) - ->execute(); - } + ->where('supplier', null, '!=') + ->where('type/l11n/language', $response->header->l11n->language) + ->limit(25) + ->paginate( + 'id', + $request->getDataString('ptype') ?? '', + $request->getDataInt('offset') + )->executeGetArray(); return $view; } @@ -359,7 +411,7 @@ final class BackendController extends Controller $view->setTemplate('/Modules/Billing/Theme/Backend/purchase-bill'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005105001, $request, $response); - $view->data['bill'] = PurchaseBillMapper::get() + $view->data['bill'] = BillMapper::get() ->with('supplier') ->with('elements') ->with('elements/container') @@ -374,7 +426,7 @@ final class BackendController extends Controller ->where('isTemplate', false) ->where('transferType', BillTransferType::PURCHASE) ->where('l11n/language', $request->header->l11n->language) - ->execute(); + ->executeGetArray(); $logs = []; if ($this->app->accountManager->get($request->header->account)->hasPermission( @@ -391,7 +443,7 @@ final class BackendController extends Controller ->where('module', 'Billing') ->where('type', StringUtils::intHash(BillMapper::class)) ->where('ref', $view->data['bill']->id) - ->execute(); + ->executeGetArray(); if (!empty($view->data['bill']->elements)) { /** @var \Modules\Auditor\Models\Audit[] $logsElements */ @@ -400,7 +452,7 @@ final class BackendController extends Controller ->where('module', 'Billing') ->where('type', StringUtils::intHash(BillElementMapper::class)) ->where('ref', \array_keys($view->data['bill']->elements), 'IN') - ->execute(); + ->executeGetArray(); $logs = \array_merge($logs, $logsElements); } @@ -428,14 +480,14 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/Billing/Theme/Backend/purchase-bill-list'); - $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005106001, $request, $response); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005105001, $request, $response); if ($request->getData('ptype') === 'p') { - $view->data['bills'] = StockBillMapper::getAll()->where('id', $request->getDataInt('id') ?? 0, '<')->where('unit', $this->app->unitId)->limit(25)->execute(); + $view->data['bills'] = BillMapper::getAll()->where('id', $request->getDataInt('offset') ?? 0, '<')->where('unit', $this->app->unitId)->limit(25)->executeGetArray(); } elseif ($request->getData('ptype') === 'n') { - $view->data['bills'] = StockBillMapper::getAll()->where('id', $request->getDataInt('id') ?? 0, '>')->where('unit', $this->app->unitId)->limit(25)->execute(); + $view->data['bills'] = BillMapper::getAll()->where('id', $request->getDataInt('offset') ?? 0, '>')->where('unit', $this->app->unitId)->limit(25)->executeGetArray(); } else { - $view->data['bills'] = StockBillMapper::getAll()->where('id', 0, '>')->where('unit', $this->app->unitId)->limit(25)->execute(); + $view->data['bills'] = BillMapper::getAll()->where('id', 0, '>')->where('unit', $this->app->unitId)->limit(25)->executeGetArray(); } return $view; @@ -459,7 +511,7 @@ final class BackendController extends Controller $view->setTemplate('/Modules/Billing/Theme/Backend/purchase-bill'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005106001, $request, $response); - $bill = StockBillMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $bill = BillMapper::get()->where('id', (int) $request->getData('id'))->execute(); $view->data['bill'] = $bill; $view->data['media-upload'] = new \Modules\Media\Theme\Backend\Components\Upload\BaseView($this->app->l11nManager, $request, $response); @@ -483,7 +535,7 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/Billing/Theme/Backend/purchase-bill-upload'); - $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002901101, $request, $response); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005105001, $request, $response); return $view; } @@ -503,7 +555,7 @@ final class BackendController extends Controller public function viewPrivatePurchaseBillUpload(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface { $view = new View($this->app->l11nManager, $request, $response); - $view->setTemplate('/Modules/Billing/Theme/Backend/user-purchase-bill-upload'); + $view->setTemplate('/Modules/Billing/Theme/Backend/purchase-bill-upload'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005109001, $request, $response); return $view; @@ -527,7 +579,7 @@ final class BackendController extends Controller $view->setTemplate('/Modules/Billing/Theme/Backend/purchase-bill-list'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005109001, $request, $response); - $mapperQuery = PurchaseBillMapper::getAll() + $view->data['bills'] = BillMapper::getAll() ->with('type') ->with('type/l11n') ->with('supplier') @@ -535,22 +587,13 @@ final class BackendController extends Controller ->where('status', BillStatus::UNPARSED) ->sort('id', OrderType::DESC) ->where('unit', $this->app->unitId) - ->limit(25); - - if ($request->getData('ptype') === 'p') { - $view->data['bills'] = $mapperQuery - ->where('id', $request->getDataInt('id') ?? 0, '<') - ->where('type/l11n/language', $response->header->l11n->language) - ->execute(); - } elseif ($request->getData('ptype') === 'n') { - $view->data['bills'] = $mapperQuery->where('id', $request->getDataInt('id') ?? 0, '>') - ->where('type/l11n/language', $response->header->l11n->language) - ->execute(); - } else { - $view->data['bills'] = $mapperQuery->where('id', 0, '>') - ->where('type/l11n/language', $response->header->l11n->language) - ->execute(); - } + ->where('type/l11n/language', $response->header->l11n->language) + ->limit(25) + ->paginate( + 'id', + $request->getDataString('ptype') ?? '', + $request->getDataInt('offset') + )->executeGetArray(); return $view; } @@ -573,7 +616,7 @@ final class BackendController extends Controller $view->setTemplate('/Modules/Billing/Theme/Backend/purchase-bill'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005109001, $request, $response); - $bill = PurchaseBillMapper::get() + $bill = BillMapper::get() ->with('elements') ->with('files') ->with('files/types') @@ -619,12 +662,12 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/Billing/Theme/Backend/payment-type-list'); - $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002901101, $request, $response); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005104001, $request, $response); $view->data['types'] = PaymentTermMapper::getAll() ->with('l11n') ->where('l11n/language', $response->header->l11n->language) - ->execute(); + ->executeGetArray(); return $view; } @@ -658,7 +701,7 @@ final class BackendController extends Controller /** @var \phpOMS\Localization\BaseStringL11n[] $l11nValues */ $l11nValues = PaymentTermL11nMapper::getAll() ->where('ref', $view->data['type']->id) - ->execute(); + ->executeGetArray(); $view->data['l11nValues'] = $l11nValues; @@ -681,12 +724,12 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/Billing/Theme/Backend/shipping-type-list'); - $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002901101, $request, $response); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005104001, $request, $response); $view->data['types'] = ShippingTermMapper::getAll() ->with('l11n') ->where('l11n/language', $response->header->l11n->language) - ->execute(); + ->executeGetArray(); return $view; } @@ -720,7 +763,7 @@ final class BackendController extends Controller /** @var \phpOMS\Localization\BaseStringL11n[] $l11nValues */ $l11nValues = ShippingTermL11nMapper::getAll() ->where('ref', $view->data['type']->id) - ->execute(); + ->executeGetArray(); $view->data['l11nValues'] = $l11nValues; diff --git a/Controller/CliController.php b/Controller/CliController.php index fc1b4f7..2c8b743 100755 --- a/Controller/CliController.php +++ b/Controller/CliController.php @@ -122,7 +122,7 @@ final class CliController extends Controller ->with('mainAddress') ->with('attributes/type') ->where('attributes/type/name', ['bill_match_pattern', 'bill_date_format'], 'IN') - ->execute(); + ->executeGetArray(); $supplierId = $this->matchSupplier($content, $suppliers); $bill->supplier = new NullSupplier($supplierId); diff --git a/Models/BillMapper.php b/Models/BillMapper.php index 067dd19..dd15b92 100755 --- a/Models/BillMapper.php +++ b/Models/BillMapper.php @@ -141,7 +141,7 @@ class BillMapper extends DataMapperFactory 'referral' => [ 'mapper' => AccountMapper::class, 'external' => 'billing_bill_referral', - ] + ], ]; /** diff --git a/Models/PurchaseBillMapper.php b/Models/PurchaseBillMapper.php index a9d4ed1..dabaf64 100755 --- a/Models/PurchaseBillMapper.php +++ b/Models/PurchaseBillMapper.php @@ -53,7 +53,7 @@ final class PurchaseBillMapper extends BillMapper ->where('id', $pivot, '<') ->where('transferType', BillTransferType::PURCHASE) ->limit($limit) - ->execute(); + ->executeGetArray(); } /** @@ -72,7 +72,7 @@ final class PurchaseBillMapper extends BillMapper ->where('id', $pivot, '>') ->where('transferType', BillTransferType::PURCHASE) ->limit($limit) - ->execute(); + ->executeGetArray(); } /** @@ -253,7 +253,7 @@ final class PurchaseBillMapper extends BillMapper ->groupBy(SupplierMapper::TABLE . '_d1.suppliermgmt_supplier_id'); $suppliers = SupplierMapper::getAll()->execute($query); - $data = SupplierMapper::getRaw()->execute(); + $data = SupplierMapper::getRaw()->executeGetArray(); return [$suppliers, $data]; } @@ -326,4 +326,161 @@ final class PurchaseBillMapper extends BillMapper return $result ?? []; } + + /** + * Placeholder + * @todo Implement + */ + public static function getSupplierNetSales(int $supplier, \DateTime $start, \DateTime $end) : FloatInt + { + $sql = <<= '{$start->format('Y-m-d H:i:s')}' + AND billing_bill_performance_date <= '{$end->format('Y-m-d H:i:s')}'; + SQL; + + $query = new Builder(self::$db); + $result = $query->raw($sql)->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? []; + + return new FloatInt(-((int) ($result[0]['net_sales'] ?? 0))); + } + + /** + * Placeholder + * @todo Implement + */ + public static function getSupplierLastOrder(int $supplier) : ?\DateTime + { + $sql = <<raw($sql)->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? []; + + return isset($result[0]['billing_bill_created_at']) + ? new \DateTime(($result[0]['billing_bill_created_at'])) + : null; + } + + /** + * Placeholder + * @todo Implement + */ + public static function getSLVHistoric(int $supplier) : FloatInt + { + $sql = <<raw($sql)->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? []; + + return new FloatInt(-((int) ($result[0]['net_sales'] ?? 0))); + } + + /** + * Placeholder + * @todo Implement + */ + public static function getSupplierMonthlySalesCosts(int $supplier, \DateTime $start, \DateTime $end) : array + { + $sql = <<= '{$start->format('Y-m-d H:i:s')}' + AND billing_bill_performance_date <= '{$end->format('Y-m-d H:i:s')}' + GROUP BY year, month + ORDER BY year ASC, month ASC; + SQL; + + $query = new Builder(self::$db); + $result = $query->raw($sql)->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? []; + + return $result ?? []; + } + + /** + * Placeholder + * @todo Implement + */ + public static function getSupplierAttributeNetSales( + int $supplier, + string $attribute, + string $language, + \DateTime $start, + \DateTime $end + ) : array + { + $sql = <<= '{$start->format('Y-m-d H:i:s')}' + AND billing_bill_performance_date <= '{$end->format('Y-m-d H:i:s')}' + AND itemmgmt_attr_type_name = '{$attribute}' + GROUP BY + itemmgmt_attr_value_l11n_title; + SQL; + + $query = new Builder(self::$db); + $result = $query->raw($sql)->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? []; + + return $result; + } + + /** + * Placeholder + * @todo Implement + */ + public static function getSupplierItem(int $supplier, \DateTime $start, \DateTime $end) : array + { + return BillElementMapper::getAll() + ->with('bill') + ->with('bill/type') + ->where('bill/supplier', $supplier) + ->where('bill/type/transferStock', true) + ->executeGetArray(); + } } diff --git a/Models/SalesBillMapper.php b/Models/SalesBillMapper.php index e68d7ce..91fe30c 100755 --- a/Models/SalesBillMapper.php +++ b/Models/SalesBillMapper.php @@ -54,7 +54,7 @@ final class SalesBillMapper extends BillMapper ->where('id', $pivot, '<') ->where('type/transferType', BillTransferType::SALES) ->limit($limit) - ->execute(); + ->executeGetArray(); } /** @@ -74,7 +74,7 @@ final class SalesBillMapper extends BillMapper ->where('id', $pivot, '>') ->where('type/transferType', BillTransferType::SALES) ->limit($limit) - ->execute(); + ->executeGetArray(); } /** @@ -287,7 +287,7 @@ final class SalesBillMapper extends BillMapper ->with('account') ->with('mainAddress') ->where('id', $clientIds, 'IN') - ->execute(); + ->executeGetArray(); } return [$clients, $data]; @@ -334,7 +334,7 @@ final class SalesBillMapper extends BillMapper ->where('type/l11n/language', $language) ->where('billDate', $start, '>=') ->where('billDate', $end, '<=') - ->execute(); + ->executeGetArray(); } /** @@ -348,7 +348,7 @@ final class SalesBillMapper extends BillMapper ->with('bill/type') ->where('bill/client', $client) ->where('bill/type/transferStock', true) - ->execute(); + ->executeGetArray(); } /** @@ -376,7 +376,7 @@ final class SalesBillMapper extends BillMapper LIMIT {$limit}; SQL; - $query = new Builder(self::$db); + $query = new Builder(self::$db); $results = $query->raw($sql)->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? []; if ($results === false) { @@ -425,7 +425,7 @@ final class SalesBillMapper extends BillMapper ORDER BY billing_bill_element_item, year ASC, month ASC; SQL; - $query = new Builder(self::$db); + $query = new Builder(self::$db); $results = $query->raw($sql)->execute()?->fetchAll(\PDO::FETCH_ASSOC) ?? []; if ($results === false) { @@ -637,8 +637,10 @@ final class SalesBillMapper extends BillMapper public static function getClientNetSales(int $client, \DateTime $start, \DateTime $end) : FloatInt { $sql = <<= '{$start->format('Y-m-d H:i:s')}' @@ -658,8 +660,10 @@ final class SalesBillMapper extends BillMapper public static function getCLVHistoric(int $client) : FloatInt { $sql = <<where('id', $pivot, '<') ->where('transferType', BillTransferType::SALES) ->limit($limit) - ->execute(); + ->executeGetArray(); } /** @@ -69,6 +69,6 @@ final class StockBillMapper extends BillMapper ->where('id', $pivot, '>') ->where('transferType', BillTransferType::SALES) ->limit($limit) - ->execute(); + ->executeGetArray(); } } diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index 0df065f..b88e1e8 100755 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -13,84 +13,87 @@ declare(strict_types=1); return ['Billing' => [ - 'Address' => 'Adresse', - 'Addresses' => 'Adressen', - 'AlreadyPaid' => 'Bereits bezahlt', - 'Amount' => 'Betrag', - 'Archive' => 'Archiev', - 'Internal' => 'Intern', - 'Error' => 'Fehler', - 'Billing' => 'Rechnungsstellung', - 'External' => 'Extern', - 'Bills' => 'Rechnungen', - 'Bonus' => 'Bonus', - 'Cashback' => 'Kennzeichnen', - 'City' => 'Stadt', - 'Client' => 'Kunde', - 'ClientID' => 'Kunden ID', - 'Confirmation' => 'Bestätigung', - 'Country' => 'Land', - 'Created' => 'Erstellt', - 'CreditCard' => 'Kreditkarte', - 'CreditNote' => 'Rechnungskorrektur', - 'Currency' => 'Währung', - 'Date' => 'Datum', - 'Delivery' => 'Lieferung', - 'DeliveryNote' => 'Lieferschein', - 'DirectDebit' => 'Direktüberweisung.', - 'Discount' => 'Rabatt', - 'DiscountP' => 'Rabatt %', - 'Due' => 'Fällig', - 'Email' => 'Email', - 'Freightage' => 'Fracht', - 'Gross' => 'Brutto', - 'Invoice' => 'Rechnung', - 'Item' => 'Artikel', - 'Items' => 'Produkte', - 'Language' => 'Sprache', - 'Log' => 'Protokoll', - 'Logs' => 'Protokolle', - 'Media' => 'Medien', - 'MoneyTransfer' => 'Überweisung', - 'Name' => 'Name', - 'Net' => 'Netz', - 'Parse' => 'Rechnungserkennung', - 'Offer' => 'Angebot', - 'Original' => 'Original', - 'Payment' => 'Zahlung', - 'PaymentPlan' => 'Zahlungsplan', - 'Postal' => 'Post', - 'Prepaid' => 'Vorausbezahlt', - 'Preview' => 'Vorschau', - 'Price' => 'Preis', - 'Profit' => 'Gewinn', - 'Quantity' => 'Menge', - 'Recipient' => 'Empfänger', - 'Select' => 'Wählen', - 'Shipment' => 'Sendung', - 'Source' => 'Quelle', - 'Supplier' => 'Anbieter', - 'SupplierID' => 'Lieferanten ID', - 'Tax' => 'Steuer', - 'TaxP' => 'Steuer %', - 'Margin' => 'Marge', - 'TermsOfDelivery' => 'Lieferbedingungen', - 'Total' => 'Gesamt', - 'Type' => 'Typ', - 'Types' => 'Typen', - 'Upload' => 'Hochladen', - 'Zip' => 'Zip', - 'Files' => 'Files', - 'TaxCode' => 'Steuerkz.', - 'PL' => 'GuV', - 'TaxCombinations' => 'Steuerkomb.', - 'PaymentTerms' => 'Zahlungsbedingungen', - 'ShippingTerms' => 'Lieferbedingungen', - 'PaymentTerm' => 'Zahlungsbedingung', - 'ShippingTerm' => 'Lieferbedingung', - 'E_bill_items' => 'Es gibt ein Problem mit Ihren Artikeln.', - 'E_bill_taxes' => 'Der Gesamtsteuerbetrag stimmt nicht mit dem Steuerbetrag der Elemente überein. Möglicherweise gibt es ein Problem mit den Steuersätzen oder zusätzlichen Posten.', - 'E_bill_net' => 'Der Gesamtnettobetrag stimmt nicht mit dem Nettobetrag der Elemente überein. Mögliches Problem mit Steuersätzen oder zusätzlichen Positionen.', - 'E_bill_gross' => 'Der Gesamtbruttobetrag stimmt nicht mit dem Bruttobetrag der Elemente überein. Mögliches Problem mit Steuersätzen oder zusätzlichen Positionen.', - 'E_bill_unit' => 'Stückpreis stimmt nicht mit Gesamtpreis überein. Mögliche Probleme mit Preis, Menge oder Rabatten.', + 'Address' => 'Adresse', + 'Addresses' => 'Adressen', + 'AlreadyPaid' => 'Bereits bezahlt', + 'Amount' => 'Betrag', + 'Archive' => 'Archiev', + 'Internal' => 'Intern', + 'Error' => 'Fehler', + 'Billing' => 'Rechnungsstellung', + 'External' => 'Extern', + 'Bills' => 'Rechnungen', + 'Bonus' => 'Bonus', + 'Cashback' => 'Kennzeichnen', + 'City' => 'Stadt', + 'Client' => 'Kunde', + 'ClientID' => 'Kunden ID', + 'Confirmation' => 'Bestätigung', + 'Country' => 'Land', + 'Created' => 'Erstellt', + 'CreditCard' => 'Kreditkarte', + 'CreditNote' => 'Rechnungskorrektur', + 'Currency' => 'Währung', + 'Date' => 'Datum', + 'Delivery' => 'Lieferung', + 'DeliveryNote' => 'Lieferschein', + 'DirectDebit' => 'Direktüberweisung.', + 'Discount' => 'Rabatt', + 'DiscountP' => 'Rabatt %', + 'Due' => 'Fällig', + 'Email' => 'Email', + 'Freightage' => 'Fracht', + 'Gross' => 'Brutto', + 'Invoice' => 'Rechnung', + 'Item' => 'Artikel', + 'Items' => 'Produkte', + 'Language' => 'Sprache', + 'Log' => 'Protokoll', + 'Logs' => 'Protokolle', + 'Media' => 'Medien', + 'MoneyTransfer' => 'Überweisung', + 'Name' => 'Name', + 'Net' => 'Netz', + 'Parse' => 'Rechnungserkennung', + 'Offer' => 'Angebot', + 'Original' => 'Original', + 'Payment' => 'Zahlung', + 'PaymentPlan' => 'Zahlungsplan', + 'Postal' => 'Post', + 'Prepaid' => 'Vorausbezahlt', + 'Preview' => 'Vorschau', + 'Price' => 'Preis', + 'Profit' => 'Gewinn', + 'Quantity' => 'Menge', + 'Recipient' => 'Empfänger', + 'Select' => 'Wählen', + 'Shipment' => 'Sendung', + 'Source' => 'Quelle', + 'Supplier' => 'Anbieter', + 'SupplierID' => 'Lieferanten ID', + 'Tax' => 'Steuer', + 'TaxP' => 'Steuer %', + 'Margin' => 'Marge', + 'TermsOfDelivery' => 'Lieferbedingungen', + 'Total' => 'Gesamt', + 'Type' => 'Typ', + 'Types' => 'Typen', + 'Upload' => 'Hochladen', + 'Zip' => 'Zip', + 'Files' => 'Files', + 'TaxCode' => 'Steuerkz.', + 'PL' => 'GuV', + 'TaxCombinations' => 'Steuerkomb.', + 'PaymentTerms' => 'Zahlungsbedingungen', + 'ShippingTerms' => 'Lieferbedingungen', + 'PaymentTerm' => 'Zahlungsbedingung', + 'ShippingTerm' => 'Lieferbedingung', + 'RecognitionUpload1' => 'Einzelne Rechnung', + 'RecognitionUpload2' => 'Mehrere Rechnungen in getrennten Dateien', + 'RecognitionUpload3' => 'Mehrere Rechnungen in einer Datei ABER getrennt mit einer farbigen Zwischenseite', + 'E_bill_items' => 'Es gibt ein Problem mit Ihren Artikeln.', + 'E_bill_taxes' => 'Der Gesamtsteuerbetrag stimmt nicht mit dem Steuerbetrag der Elemente überein. Möglicherweise gibt es ein Problem mit den Steuersätzen oder zusätzlichen Posten.', + 'E_bill_net' => 'Der Gesamtnettobetrag stimmt nicht mit dem Nettobetrag der Elemente überein. Mögliches Problem mit Steuersätzen oder zusätzlichen Positionen.', + 'E_bill_gross' => 'Der Gesamtbruttobetrag stimmt nicht mit dem Bruttobetrag der Elemente überein. Mögliches Problem mit Steuersätzen oder zusätzlichen Positionen.', + 'E_bill_unit' => 'Stückpreis stimmt nicht mit Gesamtpreis überein. Mögliche Probleme mit Preis, Menge oder Rabatten.', ]]; diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 9d8cf50..de7ef43 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -13,84 +13,87 @@ declare(strict_types=1); return ['Billing' => [ - 'Address' => 'Address', - 'Addresses' => 'Addresses', - 'AlreadyPaid' => 'Already Paid', - 'Amount' => 'Amount', - 'Archive' => 'Archive', - 'Internal' => 'Internal', - 'Error' => 'Error', - 'Billing' => 'Billing', - 'External' => 'External', - 'Bills' => 'Bills', - 'Bonus' => 'Bonus', - 'Cashback' => 'Cash Back', - 'City' => 'City', - 'Client' => 'Client', - 'ClientID' => 'Client ID', - 'Confirmation' => 'Confirmation', - 'Country' => 'Country', - 'Created' => 'Created', - 'CreditCard' => 'CreditCard', - 'CreditNote' => 'Credit Note', - 'Currency' => 'Currency', - 'Date' => 'Date', - 'Delivery' => 'Delivery', - 'DeliveryNote' => 'Delivery Note', - 'DirectDebit' => 'DirectDebit', - 'Discount' => 'Discount', - 'DiscountP' => 'Discount %', - 'Due' => 'Due', - 'Email' => 'Email', - 'Freightage' => 'Freightage', - 'Gross' => 'Gross', - 'Invoice' => 'Invoice', - 'Item' => 'Item', - 'Items' => 'Items', - 'Language' => 'Language', - 'Log' => 'Log', - 'Logs' => 'Logs', - 'Media' => 'Media', - 'MoneyTransfer' => 'Money Transfer', - 'Name' => 'Name', - 'Net' => 'Net', - 'Parse' => 'Invoice recognition', - 'Offer' => 'Offer', - 'Original' => 'Original', - 'Payment' => 'Payment', - 'PaymentPlan' => 'Payment Plan', - 'Postal' => 'Postal', - 'Prepaid' => 'Prepaid', - 'Preview' => 'Preview', - 'Price' => 'Price', - 'Profit' => 'Profit', - 'Quantity' => 'Quantity', - 'Recipient' => 'Recipient', - 'Select' => 'Select', - 'Shipment' => 'Shipment', - 'Source' => 'Source', - 'Supplier' => 'Supplier', - 'SupplierID' => 'Supplier ID', - 'Tax' => 'Tax', - 'TaxP' => 'Tax %', - 'Margin' => 'Margin', - 'TermsOfDelivery' => 'Terms Of Delivery', - 'Total' => 'Total', - 'Type' => 'Type', - 'Types' => 'Types', - 'Upload' => 'Upload', - 'Zip' => 'Zip', - 'Files' => 'Files', - 'TaxCode' => 'Tax Code', - 'PL' => 'PL', - 'TaxCombinations' => 'Tax Combinations', - 'PaymentTerms' => 'Payment Terms', - 'ShippingTerms' => 'Shipping Terms', - 'PaymentTerm' => 'Payment Term', - 'ShippingTerm' => 'Shipping Term', - 'E_bill_items' => 'There is an issue with your bill items.', - 'E_bill_taxes' => 'The total tax amount doesn\'t match the tax amount of the elements. Potential issue with tax rates or additional items.', - 'E_bill_net' => 'The total net amount doesn\'t match the net amount of the elements. Potential issue with tax rates or additional items.', - 'E_bill_gross' => 'The total gross amount doesn\'t match the gross amount of the elements. Potential issue with tax rates or additional items.', - 'E_bill_unit' => 'Unit price doesn\'t match total price. Potential issues with price, quantity or discounts.', + 'Address' => 'Address', + 'Addresses' => 'Addresses', + 'AlreadyPaid' => 'Already Paid', + 'Amount' => 'Amount', + 'Archive' => 'Archive', + 'Internal' => 'Internal', + 'Error' => 'Error', + 'Billing' => 'Billing', + 'External' => 'External', + 'Bills' => 'Bills', + 'Bonus' => 'Bonus', + 'Cashback' => 'Cash Back', + 'City' => 'City', + 'Client' => 'Client', + 'ClientID' => 'Client ID', + 'Confirmation' => 'Confirmation', + 'Country' => 'Country', + 'Created' => 'Created', + 'CreditCard' => 'CreditCard', + 'CreditNote' => 'Credit Note', + 'Currency' => 'Currency', + 'Date' => 'Date', + 'Delivery' => 'Delivery', + 'DeliveryNote' => 'Delivery Note', + 'DirectDebit' => 'DirectDebit', + 'Discount' => 'Discount', + 'DiscountP' => 'Discount %', + 'Due' => 'Due', + 'Email' => 'Email', + 'Freightage' => 'Freightage', + 'Gross' => 'Gross', + 'Invoice' => 'Invoice', + 'Item' => 'Item', + 'Items' => 'Items', + 'Language' => 'Language', + 'Log' => 'Log', + 'Logs' => 'Logs', + 'Media' => 'Media', + 'MoneyTransfer' => 'Money Transfer', + 'Name' => 'Name', + 'Net' => 'Net', + 'Parse' => 'Invoice recognition', + 'Offer' => 'Offer', + 'Original' => 'Original', + 'Payment' => 'Payment', + 'PaymentPlan' => 'Payment Plan', + 'Postal' => 'Postal', + 'Prepaid' => 'Prepaid', + 'Preview' => 'Preview', + 'Price' => 'Price', + 'Profit' => 'Profit', + 'Quantity' => 'Quantity', + 'Recipient' => 'Recipient', + 'Select' => 'Select', + 'Shipment' => 'Shipment', + 'Source' => 'Source', + 'Supplier' => 'Supplier', + 'SupplierID' => 'Supplier ID', + 'Tax' => 'Tax', + 'TaxP' => 'Tax %', + 'Margin' => 'Margin', + 'TermsOfDelivery' => 'Terms Of Delivery', + 'Total' => 'Total', + 'Type' => 'Type', + 'Types' => 'Types', + 'Upload' => 'Upload', + 'Zip' => 'Zip', + 'Files' => 'Files', + 'TaxCode' => 'Tax Code', + 'PL' => 'PL', + 'TaxCombinations' => 'Tax Combinations', + 'PaymentTerms' => 'Payment Terms', + 'ShippingTerms' => 'Shipping Terms', + 'PaymentTerm' => 'Payment Term', + 'ShippingTerm' => 'Shipping Term', + 'RecognitionUpload1' => 'Individual file upload', + 'RecognitionUpload2' => 'Multiple invoices in separate files', + 'RecognitionUpload3' => 'Multiple invoices in one file BUT separated with a colored spacer paper', + 'E_bill_items' => 'There is an issue with your bill items.', + 'E_bill_taxes' => 'The total tax amount doesn\'t match the tax amount of the elements. Potential issue with tax rates or additional items.', + 'E_bill_net' => 'The total net amount doesn\'t match the net amount of the elements. Potential issue with tax rates or additional items.', + 'E_bill_gross' => 'The total gross amount doesn\'t match the gross amount of the elements. Potential issue with tax rates or additional items.', + 'E_bill_unit' => 'Unit price doesn\'t match total price. Potential issues with price, quantity or discounts.', ]]; diff --git a/Theme/Backend/finance-taxcombination-list.tpl.php b/Theme/Backend/finance-taxcombination-list.tpl.php index 1aa6472..518e22e 100644 --- a/Theme/Backend/finance-taxcombination-list.tpl.php +++ b/Theme/Backend/finance-taxcombination-list.tpl.php @@ -20,8 +20,8 @@ use phpOMS\Uri\UriFactory; */ $taxcombination = $this->data['taxcombination']; -$previous = empty($taxcombination) ? '{/base}/finance/tax/combination/list' : '{/base}/finance/tax/combination/list?{?}&id=' . \reset($taxcombination)->id . '&ptype=p'; -$next = empty($taxcombination) ? '{/base}/finance/tax/combination/list' : '{/base}/finance/tax/combination/list?{?}&id=' . \end($taxcombination)->id . '&ptype=n'; +$previous = empty($taxcombination) ? '{/base}/finance/tax/combination/list' : '{/base}/finance/tax/combination/list?{?}&offset=' . \reset($taxcombination)->id . '&ptype=p'; +$next = empty($taxcombination) ? '{/base}/finance/tax/combination/list' : '{/base}/finance/tax/combination/list?{?}&offset=' . \end($taxcombination)->id . '&ptype=n'; echo $this->data['nav']->render(); ?>
diff --git a/Theme/Backend/purchase-bill-list.tpl.php b/Theme/Backend/purchase-bill-list.tpl.php index 9781419..589ac22 100755 --- a/Theme/Backend/purchase-bill-list.tpl.php +++ b/Theme/Backend/purchase-bill-list.tpl.php @@ -166,7 +166,7 @@ echo $this->data['nav']->render(); ?> $value) : ++$count; - $url = UriFactory::build('{/base}/purchase/bill?{?}&id=' . $value->id); + $url = UriFactory::build('{/base}/purchase/bill/view?{?}&id=' . $value->id); ?>
From feb477afe7885618eef14c7ea517388788ada95d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 19 Apr 2024 02:08:37 +0000 Subject: [PATCH 10/11] general fixes --- Controller/BackendController.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 6f2af92..131a3d3 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -871,6 +871,33 @@ final class BackendController extends Controller ->where('id', (int) $request->getData('id')) ->execute(); + $view->data['client_codes'] = ClientAttributeTypeMapper::get() + ->with('defaults') + ->where('name', 'sales_tax_code') + ->limit(1) + ->execute(); + + $view->data['supplier_codes'] = SupplierAttributeTypeMapper::get() + ->with('defaults') + ->where('name', 'purchase_tax_code') + ->limit(1) + ->execute(); + + $view->data['item_codes_sales'] = ItemAttributeTypeMapper::get() + ->with('defaults') + ->where('name', 'sales_tax_code') + ->limit(1) + ->execute(); + + $view->data['item_codes_purchase'] = ItemAttributeTypeMapper::get() + ->with('defaults') + ->where('name', 'purchase_tax_code') + ->limit(1) + ->execute(); + + $view->data['tax_codes'] = TaxCodeMapper::getAll() + ->executeGetArray(); + return $view; } } From deff2a005ac0dd977e64c3e0ea3b77d38ebb313a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 24 Apr 2024 03:20:46 +0000 Subject: [PATCH 11/11] more tests and some fixes --- .github/workflows/main.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1e05f8..278096d 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,10 +13,15 @@ on: - cron: '0 0 1,15 * *' jobs: - general_module_workflow: + general_module_workflow_php: uses: Karaka-Management/Karaka/.github/workflows/php_template.yml@develop secrets: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_PAT: ${{ secrets.GH_PAT }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - + general_module_workflow_js: + uses: Karaka-Management/Karaka/.github/workflows/js_template.yml@develop + secrets: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_PAT: ${{ secrets.GH_PAT }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file