Refactor partner dropdowns to utilize authorization permissions across various management pages. Enhance invoice creation in webhooks to include account hierarchy. Add marketing system migration script for transitioning files to database structure.
This commit is contained in:
@@ -250,8 +250,8 @@ try {
|
||||
|
||||
if (!$existing_invoice) {
|
||||
// Create invoice
|
||||
$sql = 'INSERT INTO invoice (txn_id, payment_status, payment_amount, shipping_amount, discount_amount, tax_amount, created)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)';
|
||||
$sql = 'INSERT INTO invoice (txn_id, payment_status, payment_amount, shipping_amount, discount_amount, tax_amount, created,accounthierarchy)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?,?)';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([
|
||||
$transaction['txn_id'],
|
||||
@@ -260,7 +260,8 @@ try {
|
||||
$transaction['shipping_amount'] ?? 0.00,
|
||||
$transaction['discount_amount'] ?? 0.00,
|
||||
$transaction['tax_amount'] ?? 0.00,
|
||||
date('Y-m-d H:i:s')
|
||||
date('Y-m-d H:i:s'),
|
||||
'{"salesid":"21-Total Safety Solutions B.V.","soldto":""}'
|
||||
]);
|
||||
$invoice_id = $pdo->lastInsertId();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user