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

View File

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

View File

@ -354,7 +354,7 @@ echo $this->data['nav']->render(); ?>
<button type="button" formaction=""> <button type="button" formaction="">
<i class="g-icon">book</i> <i class="g-icon">book</i>
</button><input name="item_number" autocomplete="off" type="text" value="<?= $element->itemNumber; ?>"<?= $disabled; ?>></span> </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_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_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; ?>> <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="tab">
<div class="row"> <div class="row">
<div class="col-xs-12"> <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> <div class="portlet-head"><?= $this->getHtml('Logs'); ?><i class="g-icon download btn end-xs">download</i></div>
<table class="default sticky"> <table class="default sticky">
<thead> <thead>
@ -585,7 +585,7 @@ echo $this->data['nav']->render(); ?>
<td><a href="<?= $url; ?>"><?= $audit->createdAt->format('Y-m-d H:i'); ?></a> <td><a href="<?= $url; ?>"><?= $audit->createdAt->format('Y-m-d H:i'); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
</div> </section>
</div> </div>
</div> </div>
</div> </div>

View File

@ -26,7 +26,7 @@ $next = empty($taxcombination) ? '{/base}/finance/tax/combination/list' : '{
echo $this->data['nav']->render(); ?> echo $this->data['nav']->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12"> <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> <div class="portlet-head"><?= $this->getHtml('TaxCombinations'); ?><i class="g-icon download btn end-xs">download</i></div>
<table class="default sticky"> <table class="default sticky">
<thead> <thead>
@ -68,5 +68,6 @@ echo $this->data['nav']->render(); ?>
<a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a> <a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
</div> </div>
--> -->
</section>
</div> </div>
</div> </div>

View File

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

View File

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

View File

@ -352,7 +352,7 @@ echo $this->data['nav']->render(); ?>
<button type="button" formaction=""> <button type="button" formaction="">
<i class="g-icon">book</i> <i class="g-icon">book</i>
</button><input name="item_number" autocomplete="off" type="text" value="<?= $element->itemNumber; ?>"<?= $disabled; ?>></span> </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_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_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; ?>> <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="tab">
<div class="row"> <div class="row">
<div class="col-xs-12"> <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> <div class="portlet-head"><?= $this->getHtml('Logs'); ?><i class="g-icon download btn end-xs">download</i></div>
<table class="default sticky"> <table class="default sticky">
<thead> <thead>
@ -603,7 +603,7 @@ echo $this->data['nav']->render(); ?>
<td><a href="<?= $url; ?>"><?= $audit->createdAt->format('Y-m-d H:i'); ?></a> <td><a href="<?= $url; ?>"><?= $audit->createdAt->format('Y-m-d H:i'); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
</div> </section>
</div> </div>
</div> </div>
</div> </div>

View File

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

View File

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