order kupon filtre

This commit is contained in:
merdan 2023-02-16 17:13:28 +05:00
parent 8ee5238884
commit fc5d11f9a5
1 changed files with 10 additions and 1 deletions

View File

@ -38,7 +38,7 @@ class OrderDataGrid extends DataGrid
$leftJoin->on('order_address_billing.order_id', '=', 'orders.id')
->where('order_address_billing.address_type', OrderAddress::ADDRESS_TYPE_BILLING);
})
->addSelect('orders.id', 'orders.increment_id', 'orders.sub_total', 'orders.grand_total', 'orders.created_at', 'shipping_title', 'status')
->addSelect('orders.id', 'orders.increment_id', 'orders.sub_total', 'orders.grand_total', 'orders.created_at', 'shipping_title', 'status','orders.coupon_code')
->addSelect(DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_billing.first_name, " ", ' . DB::getTablePrefix() . 'order_address_billing.last_name) as billed_to'))
->addSelect(DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_shipping.first_name, " ", ' . DB::getTablePrefix() . 'order_address_shipping.last_name) as shipped_to'));
@ -152,6 +152,15 @@ class OrderDataGrid extends DataGrid
'sortable' => true,
'filterable' => true,
]);
$this->addColumn([
'index' => 'coupon_code',
'label' => 'Coupon Code',
'type' => 'string',
'searchable' => true,
'sortable' => true,
'filterable' => true,
]);
}
/**