From b4c27b65e96bc1dd2a1174a9a44c735dcc3d775c Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 7 Apr 2024 17:31:41 +0000 Subject: [PATCH] ui fixes --- Admin/Installer.php | 11 +- Admin/Routes/Web/Api.php | 5 + Admin/Routes/Web/Backend.php | 37 +++++ Controller/ApiAttributeController.php | 20 +-- Controller/ApiBillController.php | 6 +- Controller/ApiBillTypeController.php | 10 +- Controller/ApiPriceController.php | 10 +- Controller/ApiPurchaseController.php | 6 +- Controller/ApiTaxController.php | 6 +- Controller/BackendController.php | 57 ++++++- Models/BillElementMapper.php | 2 +- Models/BillMapper.php | 2 +- Models/PaymentTermL11nMapper.php | 2 +- Models/PaymentTermMapper.php | 2 +- Models/PurchaseBillMapper.php | 2 +- Models/SalesBillMapper.php | 2 +- Models/ShippingTermL11nMapper.php | 2 +- Models/ShippingTermMapper.php | 2 +- Models/StockBillMapper.php | 2 +- Models/SubscriptionMapper.php | 2 +- Theme/Backend/Lang/de.lang.php | 5 + Theme/Backend/Lang/en.lang.php | 5 + .../finance-taxcombination-view.tpl.php | 146 ++++++++++++++++++ 23 files changed, 304 insertions(+), 40 deletions(-) create mode 100644 Theme/Backend/finance-taxcombination-view.tpl.php diff --git a/Admin/Installer.php b/Admin/Installer.php index 98b9c49..4cd261e 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -285,6 +285,12 @@ final class Installer extends InstallerAbstract ->where('name', 'sales_tax_code') ->execute(); + /** @var \Modules\Attribute\Models\AttributeType $itemAttributePurchase */ + $itemAttributePurchase = ItemAttributeTypeMapper::get() + ->with('defaults') + ->where('name', 'purchase_tax_code') + ->execute(); + /** @var \Modules\Attribute\Models\AttributeType $clientAttributeSales */ $clientAttributeSales = ClientAttributeTypeMapper::get() ->with('defaults') @@ -298,7 +304,10 @@ final class Installer extends InstallerAbstract ->execute(); foreach ($taxes as $tax) { - $itemValue = $itemAttributeSales->getDefaultByValue($tax['item_code']); + $itemValue = $tax['type'] === 1 + ? $itemAttributeSales->getDefaultByValue($tax['item_code']) + : $itemAttributePurchase->getDefaultByValue($tax['item_code']); + $accountValue = $tax['type'] === 1 ? $clientAttributeSales->getDefaultByValue($tax['account_code']) : $supplierAttributeSales->getDefaultByValue($tax['account_code']); diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index 379c6ef..da6937c 100755 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -23,6 +23,7 @@ return [ 'dest' => '\Modules\Billing\Controller\ApiBillController:apiMediaRender', 'verb' => RouteVerb::GET, 'csrf' => true, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, @@ -35,6 +36,7 @@ return [ 'dest' => '\Modules\Billing\Controller\ApiBillController:apiPreviewRender', 'verb' => RouteVerb::GET, 'csrf' => true, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, @@ -47,6 +49,7 @@ return [ 'dest' => '\Modules\Billing\Controller\ApiPriceController:apiPriceCreate', 'verb' => RouteVerb::GET, 'csrf' => true, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, @@ -59,6 +62,7 @@ return [ 'dest' => '\Modules\Billing\Controller\ApiPurchaseController:apiInvoiceParse', 'verb' => RouteVerb::SET, 'csrf' => true, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::MODIFY, @@ -71,6 +75,7 @@ return [ 'dest' => '\Modules\Billing\Controller\ApiPurchaseController:apiPurchaseBillUpload', 'verb' => RouteVerb::SET, 'csrf' => true, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 5124c41..30e57dc 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -22,6 +22,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingSalesInvoiceCreate', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, @@ -33,6 +34,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingSalesList', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -44,6 +46,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingSalesArchive', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -55,6 +58,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingSalesInvoice', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -67,6 +71,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseInvoiceCreate', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, @@ -78,6 +83,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseList', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -89,6 +95,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseArchive', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -100,6 +107,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseInvoice', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -111,6 +119,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingPurchaseInvoiceUpload', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, @@ -123,6 +132,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingStockInvoiceCreate', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, @@ -134,6 +144,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingStockList', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -145,6 +156,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingStockArchive', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -156,6 +168,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewBillingStockInvoice', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -168,6 +181,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPrivatePurchaseBillDashboard', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -179,6 +193,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPrivatePurchaseBillUpload', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, @@ -190,6 +205,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPrivateBillingPurchaseInvoice', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -201,6 +217,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPrivatePurchaseBillDashboard', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -212,6 +229,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPrivatePurchaseBillUpload', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -223,6 +241,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPrivateBillingPurchaseInvoice', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -235,6 +254,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPaymentList', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -246,6 +266,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewPaymentView', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -257,6 +278,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewShippingList', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -268,6 +290,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewShippingView', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -280,6 +303,7 @@ return [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewTaxCombinationList', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, @@ -287,10 +311,23 @@ return [ ], ], ], + '^/finance/tax/combination/view(\?.*$|$)' => [ + [ + 'dest' => '\Modules\Billing\Controller\BackendController:viewTaxCombinationView', + 'verb' => RouteVerb::GET, + 'active' => true, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::TAX, + ], + ], + ], '^/finance/tax/combination/create(\?.*$|$)' => [ [ 'dest' => '\Modules\Billing\Controller\BackendController:viewTaxCombinationCreate', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::CREATE, diff --git a/Controller/ApiAttributeController.php b/Controller/ApiAttributeController.php index 69a92c4..8e36469 100755 --- a/Controller/ApiAttributeController.php +++ b/Controller/ApiAttributeController.php @@ -40,7 +40,7 @@ final class ApiAttributeController extends Controller use \Modules\Attribute\Controller\ApiAttributeTraitController; /** - * Api method to create item attribute + * Api method to create Attribute * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -217,7 +217,7 @@ final class ApiAttributeController extends Controller } /** - * Api method to update BillAttribute + * Api method to update bill Attribute * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -268,7 +268,7 @@ final class ApiAttributeController extends Controller } /** - * Api method to delete BillAttribute + * Api method to delete bill Attribute * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -305,7 +305,7 @@ final class ApiAttributeController extends Controller } /** - * Api method to update BillAttributeTypeL11n + * Api method to update bill AttributeTypeL11n * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -363,7 +363,7 @@ final class ApiAttributeController extends Controller } /** - * Api method to update BillAttributeType + * Api method to update bill AttributeType * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -393,7 +393,7 @@ final class ApiAttributeController extends Controller } /** - * Api method to delete BillAttributeType + * Api method to delete bill AttributeType * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -423,7 +423,7 @@ final class ApiAttributeController extends Controller } /** - * Api method to update BillAttributeValue + * Api method to update bill AttributeValue * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -460,7 +460,7 @@ final class ApiAttributeController extends Controller } /** - * Api method to delete BillAttributeValue + * Api method to delete bill AttributeValue * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -491,7 +491,7 @@ final class ApiAttributeController extends Controller } /** - * Api method to update BillAttributeValueL11n + * Api method to update bill AttributeValueL11n * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -521,7 +521,7 @@ final class ApiAttributeController extends Controller } /** - * Api method to delete BillAttributeValueL11n + * Api method to delete bill AttributeValueL11n * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response diff --git a/Controller/ApiBillController.php b/Controller/ApiBillController.php index 7e0dceb..91a52fd 100755 --- a/Controller/ApiBillController.php +++ b/Controller/ApiBillController.php @@ -101,6 +101,8 @@ final class ApiBillController extends Controller * * @return void * + * @api + * * @since 1.0.0 */ public function apiBillEmail(RequestAbstract $request, array $data = []) : void @@ -939,7 +941,7 @@ final class ApiBillController extends Controller } /** - * Method to validate bill creation from request + * Method to validate add Media to bill request * * @param RequestAbstract $request Request * @@ -1539,7 +1541,7 @@ final class ApiBillController extends Controller } /** - * Api method to create bill files + * Api method to create Note * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response diff --git a/Controller/ApiBillTypeController.php b/Controller/ApiBillTypeController.php index 7526f1a..b5fc81d 100755 --- a/Controller/ApiBillTypeController.php +++ b/Controller/ApiBillTypeController.php @@ -64,7 +64,7 @@ final class ApiBillTypeController extends Controller } /** - * Method to create item attribute from request. + * Method to create BillType from request. * * @param RequestAbstract $request Request * @@ -98,7 +98,7 @@ final class ApiBillTypeController extends Controller } /** - * Validate item attribute create request + * Validate BillType create request * * @param RequestAbstract $request Request * @@ -119,7 +119,7 @@ final class ApiBillTypeController extends Controller } /** - * Api method to create item attribute l11n + * Api method to create BillType l11n * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -146,7 +146,7 @@ final class ApiBillTypeController extends Controller } /** - * Method to create item attribute l11n from request. + * Method to create BillType l11n from request. * * @param RequestAbstract $request Request * @@ -165,7 +165,7 @@ final class ApiBillTypeController extends Controller } /** - * Validate item attribute l11n create request + * Validate BillType l11n create request * * @param RequestAbstract $request Request * diff --git a/Controller/ApiPriceController.php b/Controller/ApiPriceController.php index bfb0ded..02199d9 100755 --- a/Controller/ApiPriceController.php +++ b/Controller/ApiPriceController.php @@ -228,7 +228,7 @@ final class ApiPriceController extends Controller */ /** @var \Modules\Billing\Models\Price\Price[] $prices */ - $prices = $queryMapper->execute(); + $prices = $queryMapper->executeGetArray(); // Find base price $basePrice = null; @@ -247,7 +247,7 @@ final class ApiPriceController extends Controller && $price->clientsection->id === 0 && $price->clienttype->id === 0 && $price->promocode === '' - && $price->priceNew->value < ($basePrice?->priceNew->value ?? \PHP_INT_MAX) + && $price->priceNew->value < ($basePrice?->priceNew?->value ?? \PHP_INT_MAX) ) { $basePrice = $price; } @@ -362,7 +362,7 @@ final class ApiPriceController extends Controller } /** - * Method to create item attribute from request. + * Method to create Price from request. * * @param RequestAbstract $request Request * @@ -407,14 +407,14 @@ final class ApiPriceController extends Controller } /** - * Validate item attribute create request + * Validate Price create request * * @param RequestAbstract $request Request * * @return array * * @todo consider to prevent name 'default'? - * Might not be possible because it is used internally as well (see apiItemCreate in ItemManagement) + * Might not be possible because it is used internally as well (see apiItemCreate in ItemManagement) * * @since 1.0.0 */ diff --git a/Controller/ApiPurchaseController.php b/Controller/ApiPurchaseController.php index 56d83f1..1343b43 100755 --- a/Controller/ApiPurchaseController.php +++ b/Controller/ApiPurchaseController.php @@ -82,7 +82,7 @@ final class ApiPurchaseController extends Controller } /** - * Method to create item attribute from request. + * Method to upload supplier Bill from request. * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -203,7 +203,7 @@ final class ApiPurchaseController extends Controller } /** - * Validate item attribute create request + * Validate supplier Bill upload request * * @param RequestAbstract $request Request * @@ -284,7 +284,7 @@ final class ApiPurchaseController extends Controller } /** - * Validate item attribute create request + * Validate Bill parse request * * @param RequestAbstract $request Request * diff --git a/Controller/ApiTaxController.php b/Controller/ApiTaxController.php index a5fa161..7a34976 100755 --- a/Controller/ApiTaxController.php +++ b/Controller/ApiTaxController.php @@ -126,6 +126,8 @@ final class ApiTaxController extends Controller * * @return void * + * @api + * * @since 1.0.0 */ public function apiTaxCombinationCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void @@ -143,7 +145,7 @@ final class ApiTaxController extends Controller } /** - * Method to create item attribute from request. + * Method to create TaxCombination from request. * * @param RequestAbstract $request Request * @@ -169,7 +171,7 @@ final class ApiTaxController extends Controller } /** - * Validate item attribute create request + * Validate TaxCombination create request * * @param RequestAbstract $request Request * diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 40627b8..e27bc6a 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -27,6 +27,10 @@ use Modules\Billing\Models\SettingsEnum; use Modules\Billing\Models\ShippingTermL11nMapper; use Modules\Billing\Models\ShippingTermMapper; use Modules\Billing\Models\Tax\TaxCombinationMapper; +use Modules\ClientManagement\Models\Attribute\ClientAttributeTypeMapper; +use Modules\Finance\Models\TaxCodeMapper; +use Modules\ItemManagement\Models\Attribute\ItemAttributeTypeMapper; +use Modules\SupplierManagement\Models\Attribute\SupplierAttributeTypeMapper; use phpOMS\Account\PermissionType; use phpOMS\Contract\RenderableInterface; use phpOMS\DataStorage\Database\Query\OrderType; @@ -797,6 +801,53 @@ 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 viewTaxCombinationCreate(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['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; + } + /** * Method which shows the sales dashboard * @@ -814,11 +865,13 @@ final class BackendController extends Controller $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() + $view->data['taxcombination'] = TaxCombinationMapper::get() ->with('clientCode') ->with('supplierCode') ->with('itemCode') - ->executeGetArray(); + ->with('taxCode') + ->where('id', (int) $request->getData('id')) + ->execute(); return $view; } diff --git a/Models/BillElementMapper.php b/Models/BillElementMapper.php index 99a22a4..1eb5200 100755 --- a/Models/BillElementMapper.php +++ b/Models/BillElementMapper.php @@ -20,7 +20,7 @@ use Modules\ItemManagement\Models\ItemMapper; use phpOMS\DataStorage\Database\Mapper\DataMapperFactory; /** - * Mapper class. + * Billelement mapper class. * * @package Modules\Billing\Models * @license OMS License 2.0 diff --git a/Models/BillMapper.php b/Models/BillMapper.php index dd15b92..d12bfd9 100755 --- a/Models/BillMapper.php +++ b/Models/BillMapper.php @@ -23,7 +23,7 @@ use Modules\SupplierManagement\Models\SupplierMapper; use phpOMS\DataStorage\Database\Mapper\DataMapperFactory; /** - * Mapper class. + * Bill mapper class. * * WARNING: This mapper may use a trigger to update the sequence number on insert. * diff --git a/Models/PaymentTermL11nMapper.php b/Models/PaymentTermL11nMapper.php index 1e1fdfd..d0072f8 100644 --- a/Models/PaymentTermL11nMapper.php +++ b/Models/PaymentTermL11nMapper.php @@ -18,7 +18,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory; use phpOMS\Localization\BaseStringL11n; /** - * Item mapper class. + * PaymentTermL11n mapper class. * * @package Modules\Billing\Models * @license OMS License 2.0 diff --git a/Models/PaymentTermMapper.php b/Models/PaymentTermMapper.php index 3a59fe5..baf5b4c 100644 --- a/Models/PaymentTermMapper.php +++ b/Models/PaymentTermMapper.php @@ -18,7 +18,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory; use phpOMS\Localization\BaseStringL11nType; /** - * Item mapper class. + * PaymentTerm mapper class. * * @package Modules\Billing\Models * @license OMS License 2.0 diff --git a/Models/PurchaseBillMapper.php b/Models/PurchaseBillMapper.php index dabaf64..5796e09 100755 --- a/Models/PurchaseBillMapper.php +++ b/Models/PurchaseBillMapper.php @@ -20,7 +20,7 @@ use phpOMS\Localization\Defaults\CountryMapper; use phpOMS\Stdlib\Base\FloatInt; /** - * Mapper class. + * PurchaseBill mapper class. * * @package Modules\Billing\Models * @license OMS License 2.0 diff --git a/Models/SalesBillMapper.php b/Models/SalesBillMapper.php index 91fe30c..79cc38c 100755 --- a/Models/SalesBillMapper.php +++ b/Models/SalesBillMapper.php @@ -20,7 +20,7 @@ use phpOMS\DataStorage\Database\Query\OrderType; use phpOMS\Stdlib\Base\FloatInt; /** - * Mapper class. + * SalesBill mapper class. * * @package Modules\Billing\Models * @license OMS License 2.0 diff --git a/Models/ShippingTermL11nMapper.php b/Models/ShippingTermL11nMapper.php index 185a818..bee9b76 100644 --- a/Models/ShippingTermL11nMapper.php +++ b/Models/ShippingTermL11nMapper.php @@ -18,7 +18,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory; use phpOMS\Localization\BaseStringL11n; /** - * Item mapper class. + * ShippingTermL11n mapper class. * * @package Modules\Billing\Models * @license OMS License 2.0 diff --git a/Models/ShippingTermMapper.php b/Models/ShippingTermMapper.php index 34e32cc..2a81ea2 100644 --- a/Models/ShippingTermMapper.php +++ b/Models/ShippingTermMapper.php @@ -18,7 +18,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory; use phpOMS\Localization\BaseStringL11nType; /** - * Item mapper class. + * ShippingTerm mapper class. * * @package Modules\Billing\Models * @license OMS License 2.0 diff --git a/Models/StockBillMapper.php b/Models/StockBillMapper.php index 0cce167..4354417 100755 --- a/Models/StockBillMapper.php +++ b/Models/StockBillMapper.php @@ -17,7 +17,7 @@ namespace Modules\Billing\Models; use phpOMS\DataStorage\Database\Query\Builder; /** - * Mapper class. + * StockBill mapper class. * * @package Modules\Billing\Models * @license OMS License 2.0 diff --git a/Models/SubscriptionMapper.php b/Models/SubscriptionMapper.php index a776245..61befbe 100755 --- a/Models/SubscriptionMapper.php +++ b/Models/SubscriptionMapper.php @@ -17,7 +17,7 @@ namespace Modules\Billing\Models; use phpOMS\DataStorage\Database\Mapper\DataMapperFactory; /** - * Mapper class. + * Subscription mapper class. * * @package Modules\Billing\Models * @license OMS License 2.0 diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index b88e1e8..4238eb4 100755 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -83,6 +83,11 @@ return ['Billing' => [ 'Files' => 'Files', 'TaxCode' => 'Steuerkz.', 'PL' => 'GuV', + ':combinationtype-1' => 'Verkauf', + ':combinationtype-2' => 'Einkauf', + 'PLAccount' => 'GuV-Konto', + 'Tax1Account' => 'Steuerkonto 1', + 'Tax2Account' => 'Steuerkonto 2', 'TaxCombinations' => 'Steuerkomb.', 'PaymentTerms' => 'Zahlungsbedingungen', 'ShippingTerms' => 'Lieferbedingungen', diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index de7ef43..6ae7160 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -83,6 +83,11 @@ return ['Billing' => [ 'Files' => 'Files', 'TaxCode' => 'Tax Code', 'PL' => 'PL', + ':combinationtype-1' => 'Sales', + ':combinationtype-2' => 'Purchase', + 'PLAccount' => 'PL Account', + 'Tax1Account' => 'Tax Account 1', + 'Tax2Account' => 'Tax Account 2', 'TaxCombinations' => 'Tax Combinations', 'PaymentTerms' => 'Payment Terms', 'ShippingTerms' => 'Shipping Terms', diff --git a/Theme/Backend/finance-taxcombination-view.tpl.php b/Theme/Backend/finance-taxcombination-view.tpl.php new file mode 100644 index 0000000..ffc7091 --- /dev/null +++ b/Theme/Backend/finance-taxcombination-view.tpl.php @@ -0,0 +1,146 @@ +data['taxcombination'] ?? new NullTaxCombination(); +$isNew = $taxcombination->id === 0; + +$combinationType = BillTaxType::getConstants(); + +/** @var \phpOMS\Views\View $this */ +echo $this->data['nav']->render(); ?> +
+
+
+
+
getHtml('TaxCode'); ?>
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+
+ + + + + +
+
+
+
+