This commit is contained in:
Suvodip
2025-03-26 11:53:18 +05:30
parent 321e617580
commit 55874583eb
7 changed files with 122 additions and 116 deletions

View File

@@ -56,25 +56,18 @@
// }
// Insert into invoice table
$stmt2 = $db->prepare("UPDATE invoice SET customerName = :customerName, address = :address, frequency = :frequency, invoiceDate = :invoiceDate, paymentMode = :paymentMode, salesAgent = :salesAgent, marketingAgent = :marketingAgent, tenure = :tenure, item = :item, description = :description, qty = :qty, rate = :rate, discount = :discount, totalAmount = :totalAmount, adminNote = :adminNote, discount = :discount WHERE customerId = :customerId AND invoiceId = :invoiceId");
$stmt2 = $db->prepare("UPDATE invoice SET customerName = :customerName, address = :address, invoiceDate = :invoiceDate, paymentMode = :paymentMode, salesAgent = :salesAgent, marketingAgent = :marketingAgent, item = :item, description = :description, adminNote = :adminNote WHERE customerId = :customerId AND invoiceId = :invoiceId");
$stmt2->bindParam(':customerId', $_GET['customerId']);
$stmt2->bindParam(':invoiceId', $invoiceId);
$stmt2->bindParam(':customerName', $customerName);
$stmt2->bindParam(':address', $customerAddress);
$stmt2->bindParam(':frequency', $frequency);
$stmt2->bindParam(':invoiceDate', $bookingDate);
$stmt2->bindParam(':paymentMode', $paymentMode);
$stmt2->bindParam(':salesAgent', $salesAgent);
$stmt2->bindParam(':marketingAgent', $marketingAgentList);
$stmt2->bindParam(':tenure', $tenure);
$stmt2->bindParam(':item', $item);
$stmt2->bindParam(':description', $description);
$stmt2->bindParam(':qty', $quantity);
$stmt2->bindParam(':rate', $rate);
$stmt2->bindParam(':discount', $discount);
$stmt2->bindParam(':totalAmount', $totalAmount);
$stmt2->bindParam(':adminNote', $adminNote);
$stmt2->bindParam(':discountAmount', $discountAmount);
$stmt2->execute();
echo '<div class="alert alert-success">New EMI Plan Saved Successfully!</div>';
echo '<script>
@@ -120,7 +113,7 @@
</div>
<div class="mb-3">
<label for="address" class="form-label">Address:</label>
<input id="address" readonly name="customerAddress" class="form-control bg-white" type="text" value="<?= htmlspecialchars($invoiceData['address']); ?>">
<input id="address" name="customerAddress" class="form-control bg-white" type="text" value="<?= htmlspecialchars($invoiceData['address']); ?>">
</div>
<div class="mb-3">
@@ -214,8 +207,8 @@
<th class="p-2">Description</th>
<th class="p-2">Qty</th>
<th class="p-2">Rate</th>
<th class="p-2">Tax % </th>
<th class="p-2">Tax Amount</th>
<th class="p-2">Discount&nbsp;% </th>
<th class="p-2">Discount&nbsp;&#36;</th>
<th class="p-2">Amount</th>
</tr>
</thead>