fix templates

This commit is contained in:
Dennis Eichhorn 2024-04-17 17:45:07 +00:00
parent eb4b435e41
commit 260b9dfda8
9 changed files with 48 additions and 49 deletions

View File

@ -60,7 +60,7 @@
},
{
"id": 1005104401,
"pid": "/sales/bill",
"pid": "/bill/payment",
"type": 3,
"subtype": 1,
"name": "PaymentTerms",
@ -75,7 +75,7 @@
},
{
"id": 1005104501,
"pid": "/sales/bill",
"pid": "/bill/shipping",
"type": 3,
"subtype": 1,
"name": "ShippingTerms",
@ -258,7 +258,7 @@
"children": [
{
"id": 1005109101,
"pid": "/",
"pid": "/private/purchase/recognition",
"type": 3,
"subtype": 1,
"name": "List",
@ -274,7 +274,7 @@
},
{
"id": 1005109201,
"pid": "/",
"pid": "/private/purchase/recognition",
"type": 3,
"subtype": 1,
"name": "Upload",
@ -306,7 +306,7 @@
"children": [
{
"id": 1005110101,
"pid": "/",
"pid": "/purchase/recognition",
"type": 3,
"subtype": 1,
"name": "List",
@ -322,7 +322,7 @@
},
{
"id": 1005110201,
"pid": "/",
"pid": "/purchase/recognition",
"type": 3,
"subtype": 1,
"name": "Upload",

View File

@ -68,7 +68,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 = BillMapper::getAll()
$view->data['bills'] = BillMapper::getAll()
->with('type')
->with('type/l11n')
->with('client')
@ -78,17 +78,13 @@ final class BackendController extends Controller
->sort('id', OrderType::DESC)
->where('unit', $this->app->unitId)
->where('client', null, '!=')
->limit(25);
if ($request->getData('ptype') === 'p') {
$mapperQuery->where('id', $request->getDataInt('offset') ?? 0, '<');
} elseif ($request->getData('ptype') === 'n') {
$mapperQuery->where('id', $request->getDataInt('offset') ?? 0, '>');
} else {
$mapperQuery->where('id', 0, '>');
}
$view->data['bills'] = $mapperQuery->execute();
->limit(25)
->paginate(
'id',
$request->getData('ptype'),
$request->getDataInt('offset')
)
->execute();
return $view;
}
@ -486,13 +482,15 @@ 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);
if ($request->getData('ptype') === 'p') {
$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'] = BillMapper::getAll()->where('id', $request->getDataInt('offset') ?? 0, '>')->where('unit', $this->app->unitId)->limit(25)->executeGetArray();
} else {
$view->data['bills'] = BillMapper::getAll()->where('id', 0, '>')->where('unit', $this->app->unitId)->limit(25)->executeGetArray();
}
$view->data['bills'] = BillMapper::getAll()
->where('unit', $this->app->unitId)
->limit(25)
->paginate(
'id',
$request->getData('ptype'),
$request->getDataInt('offset')
)
->executeGetArray();
return $view;
}
@ -692,7 +690,7 @@ final class BackendController extends Controller
{
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Billing/Theme/Backend/payment-view');
$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['type'] = PaymentTermMapper::get()
->with('l11n')
@ -754,7 +752,7 @@ final class BackendController extends Controller
{
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Billing/Theme/Backend/shipping-view');
$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['type'] = ShippingTermMapper::get()
->with('l11n')

View File

@ -354,7 +354,7 @@ echo $this->data['nav']->render(); ?>
<button type="button" formaction="">
<i class="g-icon">book</i>
</button><input name="item_number" autocomplete="off" type="text" value="<?= $element->itemNumber; ?>"<?= $disabled; ?>></span>
<td><textarea name="item_description" autocomplete="off"<?= $disabled; ?>><?= $element->itemName; ?></textarea>
<td><textarea name="item_description" autocomplete="off"<?= $disabled; ?>><?= $this->printTextarea($element->itemName); ?></textarea>
<td><input name="item_quantity" autocomplete="off" type="number" step="any" value="<?= $element->quantity->sub($element->discountQ)->getAmount($element->container->quantityDecimals); ?>"<?= $disabled; ?>>
<td><input name="item_discountp" autocomplete="off" type="number" step="any" value="<?= $element->singleDiscountP->getAmount(); ?>"<?= $disabled; ?>>
<td><input name="item_discountr" autocomplete="off" type="number" step="any" value="<?= $element->singleDiscountR->getAmount(); ?>"<?= $disabled; ?>>
@ -555,7 +555,7 @@ echo $this->data['nav']->render(); ?>
<div class="tab">
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Logs'); ?><i class="g-icon download btn end-xs">download</i></div>
<table class="default sticky">
<thead>
@ -585,7 +585,7 @@ echo $this->data['nav']->render(); ?>
<td><a href="<?= $url; ?>"><?= $audit->createdAt->format('Y-m-d H:i'); ?></a>
<?php endforeach; ?>
</table>
</div>
</section>
</div>
</div>
</div>

View File

@ -26,7 +26,7 @@ $next = empty($taxcombination) ? '{/base}/finance/tax/combination/list' : '{
echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('TaxCombinations'); ?><i class="g-icon download btn end-xs">download</i></div>
<table class="default sticky">
<thead>
@ -61,12 +61,13 @@ echo $this->data['nav']->render(); ?>
<?php if ($count === 0) : ?>
<tr><td colspan="7" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
<!--
<div class="portlet-foot">
<a tabindex="0" class="button" href="<?= UriFactory::build($previous); ?>"><?= $this->getHtml('Previous', '0', '0'); ?></a>
<a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
</div>
-->
</table>
<!--
<div class="portlet-foot">
<a tabindex="0" class="button" href="<?= UriFactory::build($previous); ?>"><?= $this->getHtml('Previous', '0', '0'); ?></a>
<a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
</div>
-->
</section>
</div>
</div>

View File

@ -21,7 +21,7 @@ $type = $this->data['type'];
echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<section class="portlet">
<form id="paymentForm" method="POST" action="<?= UriFactory::build('{/api}bill/payment?csrf={$CSRF}'); ?>"
data-ui-container="#paymentTable tbody"
data-add-form="paymentForm"
@ -39,7 +39,7 @@ echo $this->data['nav']->render(); ?>
<input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
</div>
</form>
</div>
</section>
</div>
</div>

View File

@ -20,7 +20,7 @@ echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Bills'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider">
<table id="billList" class="default sticky">
@ -191,6 +191,6 @@ echo $this->data['nav']->render(); ?>
<?php endif; ?>
</table>
</div>
</div>
</section>
</div>
</div>

View File

@ -352,7 +352,7 @@ echo $this->data['nav']->render(); ?>
<button type="button" formaction="">
<i class="g-icon">book</i>
</button><input name="item_number" autocomplete="off" type="text" value="<?= $element->itemNumber; ?>"<?= $disabled; ?>></span>
<td><textarea name="item_description" autocomplete="off"<?= $disabled; ?>><?= $element->itemName; ?></textarea>
<td><textarea name="item_description" autocomplete="off"<?= $disabled; ?>><?= $this->printTextarea($element->itemName); ?></textarea>
<td><input name="item_quantity" autocomplete="off" type="number" step="any" value="<?= $element->quantity->sub($element->discountQ)->getAmount($element->container->quantityDecimals); ?>"<?= $disabled; ?>>
<td><input name="item_discountp" autocomplete="off" type="number" step="any" value="<?= $element->singleDiscountP->getAmount(); ?>"<?= $disabled; ?>>
<td><input name="item_discountr" autocomplete="off" type="number" step="any" value="<?= $element->singleDiscountR->getAmount(); ?>"<?= $disabled; ?>>
@ -573,7 +573,7 @@ echo $this->data['nav']->render(); ?>
<div class="tab">
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Logs'); ?><i class="g-icon download btn end-xs">download</i></div>
<table class="default sticky">
<thead>
@ -603,7 +603,7 @@ echo $this->data['nav']->render(); ?>
<td><a href="<?= $url; ?>"><?= $audit->createdAt->format('Y-m-d H:i'); ?></a>
<?php endforeach; ?>
</table>
</div>
</section>
</div>
</div>
</div>

View File

@ -20,7 +20,7 @@ echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Bills'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider">
<table id="billList" class="default sticky">
@ -190,6 +190,6 @@ echo $this->data['nav']->render(); ?>
<?php endif; ?>
</table>
</div>
</div>
</section>
</div>
</div>

View File

@ -21,7 +21,7 @@ $type = $this->data['type'];
echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<section class="portlet">
<form id="shippingForm" method="POST" action="<?= UriFactory::build('{/api}bill/shipping?csrf={$CSRF}'); ?>"
data-ui-container="#shippingTable tbody"
data-add-form="shippingForm"
@ -39,7 +39,7 @@ echo $this->data['nav']->render(); ?>
<input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
</div>
</form>
</div>
</section>
</div>
</div>