|
@@ -37,6 +37,7 @@ $customer_id = (int)$_POST['customer_id'];
|
|
|
$contact_id = !empty($_POST['contact_id']) ? (int)$_POST['contact_id'] : "NULL";
|
|
|
$employee_id = $_SESSION['employee_id'];
|
|
|
$order_date = mysqli_real_escape_string($conn, $_POST['order_date']);
|
|
|
+$shipping_date = mysqli_real_escape_string($conn, $_POST['shipping_date']);
|
|
|
$order_type = (int)$_POST['order_type'];
|
|
|
|
|
|
// 设置已删除字段的默认值
|
|
@@ -150,7 +151,8 @@ if ($isedit) {
|
|
|
customer_id = $customer_id,
|
|
|
contact_id = $contact_id,
|
|
|
employee_id = $employee_id,
|
|
|
- order_date = '$order_date',
|
|
|
+ order_date = '$order_date',
|
|
|
+ shipping_date = '$shipping_date',
|
|
|
delivery_date = $delivery_date,
|
|
|
actual_delivery_date = $actual_delivery_date,
|
|
|
order_status = $order_status,
|
|
@@ -201,13 +203,13 @@ if ($isedit) {
|
|
|
// 创建新订单
|
|
|
$sql = "INSERT INTO orders (
|
|
|
order_code, order_type, customer_id, contact_id, employee_id,
|
|
|
- order_date, delivery_date, actual_delivery_date,
|
|
|
+ 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
|
|
|
) VALUES (
|
|
|
'$order_code', $order_type, $customer_id, $contact_id, $employee_id,
|
|
|
- '$order_date', $delivery_date, $actual_delivery_date,
|
|
|
+ '$order_date','$shipping_date', $delivery_date, $actual_delivery_date,
|
|
|
$order_status, $payment_status, '$currency',
|
|
|
$subtotal, $discount_amount, $total_amount,
|
|
|
'$notes', '$internal_notes', NOW(), NOW()
|