Sales module changes : GWM
This commit is contained in:
parent
540f4cc9c3
commit
261286d9c1
@ -24,16 +24,18 @@ class Ipinvoice_model extends Model
|
||||
ip_payment_methods.payment_method_name, ip_users.user_name,
|
||||
ip_products.product_name, ip_invoice_items.item_price, ip_products.cgst, ip_products.sgst,
|
||||
ip_invoice_items.item_quantity, ip_invoice_items.item_price, ip_invoice_items.item_name, ip_invoice_items.item_quantity,
|
||||
ip_invoice_amounts.invoice_total, ip_invoice_amounts.invoice_item_subtotal, ip_invoice_amounts.invoice_item_tax_total')
|
||||
ip_invoice_amounts.invoice_total, ip_invoice_amounts.invoice_item_subtotal, ip_invoice_amounts.invoice_item_tax_total
|
||||
,ip_invoice_attachment.file_name')
|
||||
->join('ip_payment_methods', 'ip_invoices.payment_method = ip_payment_methods.payment_method_id', 'left')
|
||||
->join('ip_clients', 'ip_invoices.client_id = ip_clients.client_id', 'left')
|
||||
->join('ip_users', 'ip_invoices.user_id = ip_users.user_id', 'left')
|
||||
->join('ip_invoice_items', 'ip_invoices.invoice_id = ip_invoice_items.invoice_id', 'left')
|
||||
->join('ip_products', 'ip_invoice_items.item_product_id = ip_products.product_id', 'left')
|
||||
->join('ip_invoice_amounts', 'ip_invoices.invoice_id = ip_invoice_amounts.invoice_id', 'left');
|
||||
->join('ip_invoice_amounts', 'ip_invoices.invoice_id = ip_invoice_amounts.invoice_id', 'left')
|
||||
->join('ip_invoice_attachment', 'ip_invoices.invoice_id = ip_invoice_attachment.invoice_id and ip_invoice_attachment.is_active = 1' , 'left');
|
||||
$builder->where('ip_invoices.invoice_date_created >=', $fromDate );
|
||||
$builder->where('ip_invoices.invoice_date_created <=', $toDate );
|
||||
$builder->orderBy('ip_invoices.invoice_date_created', 'DESC');
|
||||
$builder->orderBy('ip_invoices.invoice_number', 'DESC');
|
||||
|
||||
$query = $builder->get();
|
||||
$result = $query->getResult();
|
||||
|
||||
@ -169,6 +169,7 @@
|
||||
<tr>
|
||||
<th>Invoice Date</th>
|
||||
<th>Invoice No</th>
|
||||
<th>Received File</th>
|
||||
<th>Client Name</th>
|
||||
<th>Product</th>
|
||||
<th>Quantity</th>
|
||||
@ -203,6 +204,13 @@
|
||||
</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<?php if (!empty($invoice->file_name)) { ?>
|
||||
<a title="click to preview" href=" <?php echo base_url('public/uploads/images/invoice_files/').$invoice->file_name; ?>">
|
||||
<i class="fa-solid fa-file-pdf"></i>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td><?php echo $invoice->client_name ?></td>
|
||||
<td><?php echo $invoice->item_name ?></td>
|
||||
<td align="right"><?php echo number_format($invoice->item_quantity, 2, '.', ',') ?></td>
|
||||
@ -346,12 +354,12 @@
|
||||
console.log(JSON.parse(response).invoiceAttachment);
|
||||
var list = JSON.parse(response).invoiceAttachment;
|
||||
var attachmentsHtml = '';
|
||||
|
||||
if(list.length){ $('#day').hide(); }
|
||||
list.forEach(element => {
|
||||
console.log(element);
|
||||
var fileName = element.file_name;
|
||||
var attachmentName = element.attachment_name;
|
||||
attachmentsHtml += `
|
||||
attachmentsHtml += ` <br>
|
||||
<div class="row pad">
|
||||
<div class="col-md-4">
|
||||
<span>File Name</span>
|
||||
@ -395,7 +403,6 @@
|
||||
</div>
|
||||
<div class="col-md-4" style="margin-top: 23px;">
|
||||
<button type="button" class="btn btn-danger btn-sm" onclick="removeContact(this)">Remove</button>
|
||||
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()">Add</button>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
@ -474,6 +481,7 @@
|
||||
console.log(response);
|
||||
if (response.success) {
|
||||
$('#invoiceModal').modal('hide');
|
||||
window.location.reload();
|
||||
// Handle success
|
||||
} else {
|
||||
alert(response.message);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user