|
@@ -48,6 +48,7 @@ $payment_status = 0; // 默认为"未付款"
|
|
|
$currency = "CNY"; // 默认为人民币
|
|
|
$notes = mysqli_real_escape_string($conn, htmlspecialchars($_POST['notes'], ENT_QUOTES, 'UTF-8'));
|
|
|
$internal_notes = ""; // 默认为空
|
|
|
+$no_cashback = isset($_POST['no_cashback']) ? (int)$_POST['no_cashback'] : 0; // 获取是否不参与返现
|
|
|
|
|
|
// 获取订单项信息
|
|
|
$items = $_POST['items'] ?? [];
|
|
@@ -163,6 +164,7 @@ if ($isedit) {
|
|
|
total_amount = $total_amount,
|
|
|
notes = '$notes',
|
|
|
internal_notes = '$internal_notes',
|
|
|
+ no_cashback = $no_cashback,
|
|
|
updated_at = NOW()
|
|
|
WHERE id = $id";
|
|
|
|
|
@@ -207,13 +209,13 @@ if ($isedit) {
|
|
|
order_date,shipping_date, delivery_date, actual_delivery_date,
|
|
|
order_status, payment_status, currency,
|
|
|
subtotal, discount_amount, total_amount,
|
|
|
- notes, internal_notes, created_at, updated_at
|
|
|
+ notes, internal_notes, no_cashback, created_at, updated_at
|
|
|
) VALUES (
|
|
|
'$order_code', $order_type, $customer_id, $contact_id, $employee_id,
|
|
|
'$order_date','$shipping_date', $delivery_date, $actual_delivery_date,
|
|
|
$order_status, $payment_status, '$currency',
|
|
|
$subtotal, $discount_amount, $total_amount,
|
|
|
- '$notes', '$internal_notes', NOW(), NOW()
|
|
|
+ '$notes', '$internal_notes', $no_cashback, NOW(), NOW()
|
|
|
)";
|
|
|
|
|
|
mysqli_query($conn, $sql);
|