<?php

namespace PHPMaker2024\laundrytech;

// Page object
$PricelistdetailsDelete = &$Page;
?>
<script>
var currentTable = <?= JsonEncode($Page->toClientVar()) ?>;
ew.deepAssign(ew.vars, { tables: { pricelistdetails: currentTable } });
var currentPageID = ew.PAGE_ID = "delete";
var currentForm;
var fpricelistdetailsdelete;
loadjs.ready(["wrapper", "head"], function () {
    let $ = jQuery;
    let fields = currentTable.fields;

    // Form object
    let form = new ew.FormBuilder()
        .setId("fpricelistdetailsdelete")
        .setPageId("delete")
        .build();
    window[form.id] = form;
    currentForm = form;
    loadjs.done(form.id);
});
</script>
<script>
loadjs.ready("head", function () {
    // Write your table-specific client script here, no need to add script tags.
});
</script>
<?php $Page->showPageHeader(); ?>
<?php
$Page->showMessage();
?>
<form name="fpricelistdetailsdelete" id="fpricelistdetailsdelete" class="ew-form ew-delete-form" action="<?= CurrentPageUrl(false) ?>" method="post" novalidate autocomplete="off">
<?php if (Config("CHECK_TOKEN")) { ?>
<input type="hidden" name="<?= $TokenNameKey ?>" value="<?= $TokenName ?>"><!-- CSRF token name -->
<input type="hidden" name="<?= $TokenValueKey ?>" value="<?= $TokenValue ?>"><!-- CSRF token value -->
<?php } ?>
<input type="hidden" name="t" value="pricelistdetails">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($Page->RecKeys as $key) { ?>
<?php $keyvalue = is_array($key) ? implode(Config("COMPOSITE_KEY_SEPARATOR"), $key) : $key; ?>
<input type="hidden" name="key_m[]" value="<?= HtmlEncode($keyvalue) ?>">
<?php } ?>
<div class="card ew-card ew-grid <?= $Page->TableGridClass ?>">
<div class="card-body ew-grid-middle-panel <?= $Page->TableContainerClass ?>" style="<?= $Page->TableContainerStyle ?>">
<table class="<?= $Page->TableClass ?>">
    <thead>
    <tr class="ew-table-header">
<?php if ($Page->priceListDetailId->Visible) { // priceListDetailId ?>
        <th class="<?= $Page->priceListDetailId->headerCellClass() ?>"><span id="elh_pricelistdetails_priceListDetailId" class="pricelistdetails_priceListDetailId"><?= $Page->priceListDetailId->caption() ?></span></th>
<?php } ?>
<?php if ($Page->priceListid->Visible) { // priceListid ?>
        <th class="<?= $Page->priceListid->headerCellClass() ?>"><span id="elh_pricelistdetails_priceListid" class="pricelistdetails_priceListid"><?= $Page->priceListid->caption() ?></span></th>
<?php } ?>
<?php if ($Page->articleid->Visible) { // articleid ?>
        <th class="<?= $Page->articleid->headerCellClass() ?>"><span id="elh_pricelistdetails_articleid" class="pricelistdetails_articleid"><?= $Page->articleid->caption() ?></span></th>
<?php } ?>
<?php if ($Page->rate->Visible) { // rate ?>
        <th class="<?= $Page->rate->headerCellClass() ?>"><span id="elh_pricelistdetails_rate" class="pricelistdetails_rate"><?= $Page->rate->caption() ?></span></th>
<?php } ?>
<?php if ($Page->discount->Visible) { // discount ?>
        <th class="<?= $Page->discount->headerCellClass() ?>"><span id="elh_pricelistdetails_discount" class="pricelistdetails_discount"><?= $Page->discount->caption() ?></span></th>
<?php } ?>
<?php if ($Page->discountType->Visible) { // discountType ?>
        <th class="<?= $Page->discountType->headerCellClass() ?>"><span id="elh_pricelistdetails_discountType" class="pricelistdetails_discountType"><?= $Page->discountType->caption() ?></span></th>
<?php } ?>
<?php if ($Page->netAmount->Visible) { // netAmount ?>
        <th class="<?= $Page->netAmount->headerCellClass() ?>"><span id="elh_pricelistdetails_netAmount" class="pricelistdetails_netAmount"><?= $Page->netAmount->caption() ?></span></th>
<?php } ?>
    </tr>
    </thead>
    <tbody>
<?php
$Page->RecordCount = 0;
$i = 0;
while ($Page->fetch()) {
    $Page->RecordCount++;
    $Page->RowCount++;

    // Set row properties
    $Page->resetAttributes();
    $Page->RowType = RowType::VIEW; // View

    // Get the field contents
    $Page->loadRowValues($Page->CurrentRow);

    // Render row
    $Page->renderRow();
?>
    <tr <?= $Page->rowAttributes() ?>>
<?php if ($Page->priceListDetailId->Visible) { // priceListDetailId ?>
        <td<?= $Page->priceListDetailId->cellAttributes() ?>>
<span id="">
<span<?= $Page->priceListDetailId->viewAttributes() ?>>
<?= $Page->priceListDetailId->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->priceListid->Visible) { // priceListid ?>
        <td<?= $Page->priceListid->cellAttributes() ?>>
<span id="">
<span<?= $Page->priceListid->viewAttributes() ?>>
<?= $Page->priceListid->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->articleid->Visible) { // articleid ?>
        <td<?= $Page->articleid->cellAttributes() ?>>
<span id="">
<span<?= $Page->articleid->viewAttributes() ?>>
<?= $Page->articleid->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->rate->Visible) { // rate ?>
        <td<?= $Page->rate->cellAttributes() ?>>
<span id="">
<span<?= $Page->rate->viewAttributes() ?>>
<?= $Page->rate->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->discount->Visible) { // discount ?>
        <td<?= $Page->discount->cellAttributes() ?>>
<span id="">
<span<?= $Page->discount->viewAttributes() ?>>
<?= $Page->discount->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->discountType->Visible) { // discountType ?>
        <td<?= $Page->discountType->cellAttributes() ?>>
<span id="">
<span<?= $Page->discountType->viewAttributes() ?>>
<?= $Page->discountType->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->netAmount->Visible) { // netAmount ?>
        <td<?= $Page->netAmount->cellAttributes() ?>>
<span id="">
<span<?= $Page->netAmount->viewAttributes() ?>>
<?= $Page->netAmount->getViewValue() ?></span>
</span>
</td>
<?php } ?>
    </tr>
<?php
}
$Page->Recordset?->free();
?>
</tbody>
</table>
</div>
</div>
<div class="ew-buttons ew-desktop-buttons">
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit"><?= $Language->phrase("DeleteBtn") ?></button>
<button class="btn btn-default ew-btn" name="btn-cancel" id="btn-cancel" type="button" data-href="<?= HtmlEncode(GetUrl($Page->getReturnUrl())) ?>"><?= $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$Page->showPageFooter();
echo GetDebugMessage();
?>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
