<?php

namespace PHPMaker2024\laundrytech;

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

    // Form object
    let form = new ew.FormBuilder()
        .setId("forderarticlesdelete")
        .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="forderarticlesdelete" id="forderarticlesdelete" 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="orderarticles">
<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->orderArticleID->Visible) { // orderArticleID ?>
        <th class="<?= $Page->orderArticleID->headerCellClass() ?>"><span id="elh_orderarticles_orderArticleID" class="orderarticles_orderArticleID"><?= $Page->orderArticleID->caption() ?></span></th>
<?php } ?>
<?php if ($Page->orderId->Visible) { // orderId ?>
        <th class="<?= $Page->orderId->headerCellClass() ?>"><span id="elh_orderarticles_orderId" class="orderarticles_orderId"><?= $Page->orderId->caption() ?></span></th>
<?php } ?>
<?php if ($Page->articleId->Visible) { // articleId ?>
        <th class="<?= $Page->articleId->headerCellClass() ?>"><span id="elh_orderarticles_articleId" class="orderarticles_articleId"><?= $Page->articleId->caption() ?></span></th>
<?php } ?>
<?php if ($Page->qty->Visible) { // qty ?>
        <th class="<?= $Page->qty->headerCellClass() ?>"><span id="elh_orderarticles_qty" class="orderarticles_qty"><?= $Page->qty->caption() ?></span></th>
<?php } ?>
<?php if ($Page->rate->Visible) { // rate ?>
        <th class="<?= $Page->rate->headerCellClass() ?>"><span id="elh_orderarticles_rate" class="orderarticles_rate"><?= $Page->rate->caption() ?></span></th>
<?php } ?>
<?php if ($Page->disc->Visible) { // disc ?>
        <th class="<?= $Page->disc->headerCellClass() ?>"><span id="elh_orderarticles_disc" class="orderarticles_disc"><?= $Page->disc->caption() ?></span></th>
<?php } ?>
<?php if ($Page->calcamount->Visible) { // calcamount ?>
        <th class="<?= $Page->calcamount->headerCellClass() ?>"><span id="elh_orderarticles_calcamount" class="orderarticles_calcamount"><?= $Page->calcamount->caption() ?></span></th>
<?php } ?>
<?php if ($Page->remarks->Visible) { // remarks ?>
        <th class="<?= $Page->remarks->headerCellClass() ?>"><span id="elh_orderarticles_remarks" class="orderarticles_remarks"><?= $Page->remarks->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->orderArticleID->Visible) { // orderArticleID ?>
        <td<?= $Page->orderArticleID->cellAttributes() ?>>
<span id="">
<span<?= $Page->orderArticleID->viewAttributes() ?>>
<?= $Page->orderArticleID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->orderId->Visible) { // orderId ?>
        <td<?= $Page->orderId->cellAttributes() ?>>
<span id="">
<span<?= $Page->orderId->viewAttributes() ?>>
<?= $Page->orderId->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->qty->Visible) { // qty ?>
        <td<?= $Page->qty->cellAttributes() ?>>
<span id="">
<span<?= $Page->qty->viewAttributes() ?>>
<?= $Page->qty->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->disc->Visible) { // disc ?>
        <td<?= $Page->disc->cellAttributes() ?>>
<span id="">
<span<?= $Page->disc->viewAttributes() ?>>
<?= $Page->disc->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->calcamount->Visible) { // calcamount ?>
        <td<?= $Page->calcamount->cellAttributes() ?>>
<span id="">
<span<?= $Page->calcamount->viewAttributes() ?>>
<?= $Page->calcamount->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->remarks->Visible) { // remarks ?>
        <td<?= $Page->remarks->cellAttributes() ?>>
<span id="">
<span<?= $Page->remarks->viewAttributes() ?>>
<?= $Page->remarks->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>
