JezK
Edit File: invoicesView.php
<?php // include_once("./app/adminObj.php"); include_once("./app/checkSession.php"); if(!isset($_REQUEST['inid'])) { header("Location: ./dashboard.php"); } $invid = $_REQUEST['inid']; include("header.php"); $invoiceInfo=$customerObj->getInvoiceInfo($invid); // print_r($invoiceInfo); $company_id=isset($invoiceInfo['company_id'])?$invoiceInfo['company_id']:""; $companyInfo=$customerObj->getComapnyInfo($company_id); // print_r($companyInfo); $itemDetails=$customerObj->getInvoicesItemsInfo($invid); $itemDetails1=$itemDetails ? $itemDetails :[]; $warehouseNumber = isset($invoiceInfo['warehouse_number'])?$invoiceInfo['warehouse_number']:""; $invoiceValue = isset($invoiceInfo['invoice_value'])?$invoiceInfo['invoice_value']:""; $invoiceNumber = isset($invoiceInfo['invoice_number'])?$invoiceInfo['invoice_number']:""; $createdDate = isset($invoiceInfo['created_date'])?$invoiceInfo['created_date']:""; $date=date_create($createdDate); $modifiedDate=date_format($date,"d-m-Y"); $warehouseName = isset($invoiceInfo['warehouse_name'])?$invoiceInfo['warehouse_name']:""; $customerName = $invoiceInfo['first_name'].' '.$invoiceInfo['last_name']; $currencyType = isset($invoiceInfo['currency'])?$invoiceInfo['currency']:""; $descript=isset($invoiceInfo['description'])?$invoiceInfo['description']:""; $grandtotal=isset($invoiceInfo['grandtotal'])?$invoiceInfo['grandtotal']:""; $tableHTML =""; if($itemDetails1==0) { $tableHTML ="<tr class='text-center'> <td colspan='7' ><p class='p-2'>No data avilable</p></td> </tr>"; } foreach($itemDetails1 as $item) { $tableHTML .= '<tr> <td><input type="text" value="'.$item['item_number'].'" readonly></td> <td><input type="text" value="'.$item['description'].'" readonly></td> <td><input type="text" value="'.$item['quotation_id'].'" readonly></td> <td><input type="text" value="'.$item['numberof_pallets'].'" readonly></td> <td><input type="text" value="'.$item['quantity'].'" readonly></td> <td><input type="text" value="'.$item['price'].'" readonly></td> <td><input type="text" value="'.$item['total'].'" readonly></td> </tr>'; } ?> <div class="container customMargin"> <a href="dashboard.php" ><img src="images/back_main.png" class="pb-3"></a> <h4><?php echo $lang['INVOICES'];?></h4> <div class="containercontent"> <div class="card-1 shadow-sm p-3 mb-5 bg-white rounded"> <div class="card-body invoices_page_div"> <div class="row align-items-center"> <div class="col-md-5 col-lg-2 col-sm-6"> <label for="invoices" class="custom-label"><?php echo $lang['INVOICE_NUMBER'];?></label> </div> <div class="col-md-5 col-lg-3 col-sm-6 d-flex align-itens-start"> <span class="colon">:</span> <input type="text" class="" id="invoices" placeholder="" name="invoices" value="<?php echo $invoiceNumber; ?>" readonly> </div> <div class="col-md-5 col-lg-3 col-sm-6"> <label for="whnumber" class="custom-label"><?php echo $lang['WAREHOUSE_NUMBER'];?></label> </div> <div class="col-md-5 col-lg-2 col-sm-6 d-flex align-itens-start"> <span class="colon">:</span> <input type="text" class="" id="whnumber" placeholder="" value="<?php echo $warehouseNumber; ?>" name="whnumber" readonly> </div> </div> <div class="row align-items-center"> <div class="col-md-5 col-lg-2 col-sm-6"> <label for="whname" class="custom-label"><?php echo $lang['WAREHOUSE_NAME'];?></label> </div> <div class="col-md-5 col-lg-3 col-sm-6 d-flex align-itens-start"> <span class="colon">:</span> <input type="text" class="" id="whname" placeholder="" value="<?php echo $warehouseName; ?>" name="whname" readonly> </div> <div class="col-md-5 col-lg-3 col-sm-6"> <label for="invoices" class="custom-label"><?php echo $lang['QUOTATION_VALUE'];?></label> </div> <div class="col-md-5 col-lg-2 col-sm-6 d-flex align-itens-start" > <span class="colon">:</span> <span class="currencyType"><?php echo $currencyType ?></span> <input type="text" class="" id="Invoicevalue" value="<?php echo $invoiceValue; ?>" placeholder="" name="Invoicevalue" readonly> </div> </div> <div class="row align-items-center" > <div class="col-md-5 col-lg-2 col-sm-6 col-6"> <label for="customer" class="custom-label"><?php echo $lang['CUSTOMER_NAME'];?></label> </div> <div class="col-md-5 col-lg-3 col-sm-6 d-flex align-itens-start"> <span class="colon">:</span> <input type="text" class="" id="customer" placeholder="" value="<?php echo $customerName; ?>" name="customer" readonly> </div> <div class="col-md-5 col-lg-3 col-sm-6 col-6"> <!-- <div class="d-flex flex-row"> --> <label for="whnumber" class="custom-label"><?php echo $lang['DATE'];?></label></div> <div class="col-md-5 col-lg-2 col-sm-6 d-flex align-itens-start"> <span class="colon">:</span> <input type="text" class=" " value="<?php echo $modifiedDate; ?>" id="whnumber" placeholder="" name="whnumber" readonly> </div> </div> </div> <div class="row mb-3"> <div class="col-md-5 col-lg-2 pl-4 mt-2"> <label for="customer" class="custom-label"><?php echo $lang['DESCRIPTION'];?></label> </div> <div class="col-md-6 col-lg-8 d-flex "> <span class="colon">:</span><textarea id="DescriptionMsg" name="DescriptionMsg" rows="2" class="form-control "readonly><?php echo $descript; ?></textarea> <div class="error customer_error"></div> </div> </div> <!-- <div class="row"> <div class="col-md-2"> <label for="whname">Description:</label> </div> <div class="col-md-2"> <input type="text" class="" id="description" placeholder="Description" name="description" readonly> </div> </div> --> <div class="table-responsive"> <table class="table table-bordered table_body invoice_add"> <thead class="theadcolor"> <tr> <th><?php echo $lang['INVOICE_NUMBER'];?></th> <!-- <th>Customer</th> --> <th><?php echo $lang['DESCRIPTION'];?></th> <th><?php echo $lang['QUOTATION_ID'];?></th> <!-- <th>Value</th> --> <th><?php echo $lang['NUMBER_OF_PALLET'];?></th> <th><?php echo $lang['QUANTITY'];?></th> <th> <?php echo $lang['PRICE'];?> (<?php echo $currencyType;?>) </th> <th><?php echo $lang['TOTAL'];?></th> </tr> </thead> <tbody> <?php echo $tableHTML; ?> </tbody> </table> </div> <!--<div class="d-flex justify-content-end"> <div>Total 150 Dinar </div> </div>--> <div class="d-flex justify-content-between align-items-baseline borderdashed"> <div> <label><strong><?php echo $lang['Grand_Total_value'];?><strong></label> </div> <div class="inputwid"> <span class="inputWidth"> <input type="text" class="form-control" id="totalvalue" name="totalvalue" value="<?php echo $grandtotal ?>" readonly/> </span> </div> </div> </div> </div> <?php include("footer.php"); ?> <style> .invoice_add tr td { padding: 0px !important; width: 100px; } .invoice_add tr td input{ width:100% !important;border:none;background:#eaeffa;padding: 10px;border-bottom: 1px solid #3663c88c; } button#addRow ,button#addRowSave{ background: #3663c8; border: none; padding: 5px 15px; color: #fff; } .invoices_page_div input { /* width: 100%;*/ border:none; padding: 0px 5px; } .currencyType { position: absolute; margin-left: 100px !important; color: #2c60d0; font-weight: bold; } .inputwid{ width: 149px; } span.inputWidth input.form-control { background: #eaeffa; border:none; outline:none; color:black; font-weight:bold; } .borderdashed { margin-bottom: 10px; border-top: 1px dashed; border-bottom: 1px dashed; padding: 3px; } table#myTable input,span.inputWidth input { text-align: center; } table.table.table-bordered.table_body.invoice_add input { text-align: center; } .custom-label{ font-size: 16px; font-family: 'Barlow'; font-weight: 600; } .containercontent{ margin: 12px ; } </style>