commit
3ae60bf94e
|
|
@ -28,8 +28,8 @@ class CancelOrderNotification extends Mailable
|
|||
public function build()
|
||||
{
|
||||
return $this->from(core()->getSenderEmailDetails()['email'], core()->getSenderEmailDetails()['name'])
|
||||
->to($this->order->customer_email, $this->order->customer_full_name)
|
||||
->subject(trans('shop::app.mail.order.cancel.subject'))
|
||||
->view('shop::emails.sales.order-cancel');
|
||||
->to($this->order->customer_email, $this->order->customer_full_name)
|
||||
->subject(trans('shop::app.mail.order.cancel.subject'))
|
||||
->view('shop::emails.sales.order-cancel');
|
||||
}
|
||||
}
|
||||
|
|
@ -37,8 +37,8 @@ class NewAdminNotification extends Mailable
|
|||
public function build()
|
||||
{
|
||||
return $this->from(core()->getSenderEmailDetails()['email'], core()->getSenderEmailDetails()['name'])
|
||||
->to(core()->getAdminEmailDetails()['email'])
|
||||
->subject(trans('shop::app.mail.order.subject'))
|
||||
->view('shop::emails.sales.new-admin-order');
|
||||
->to(core()->getAdminEmailDetails()['email'])
|
||||
->subject(trans('shop::app.mail.order.subject'))
|
||||
->view('shop::emails.sales.new-admin-order');
|
||||
}
|
||||
}
|
||||
|
|
@ -50,8 +50,8 @@ class NewCustomerNotification extends Mailable
|
|||
public function build()
|
||||
{
|
||||
return $this->from(core()->getSenderEmailDetails()['email'], core()->getSenderEmailDetails()['name'])
|
||||
->to($this->customer->email)
|
||||
->subject(trans('shop::app.mail.customer.new.subject'))
|
||||
->view('shop::emails.customer.new-customer')->with(['customer' => $this->customer, 'password' => $this->password]);
|
||||
->to($this->customer->email)
|
||||
->subject(trans('shop::app.mail.customer.new.subject'))
|
||||
->view('shop::emails.customer.new-customer')->with(['customer' => $this->customer, 'password' => $this->password]);
|
||||
}
|
||||
}
|
||||
|
|
@ -41,8 +41,8 @@ class NewInventorySourceNotification extends Mailable
|
|||
$inventory = $this->shipment->inventory_source;
|
||||
|
||||
return $this->from(core()->getSenderEmailDetails()['email'], core()->getSenderEmailDetails()['name'])
|
||||
->to($inventory->contact_email, $inventory->name)
|
||||
->subject(trans('shop::app.mail.shipment.subject', ['order_id' => $order->increment_id]))
|
||||
->view('shop::emails.sales.new-inventorysource-shipment');
|
||||
->to($inventory->contact_email, $inventory->name)
|
||||
->subject(trans('shop::app.mail.shipment.subject', ['order_id' => $order->increment_id]))
|
||||
->view('shop::emails.sales.new-inventorysource-shipment');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ class NewInvoiceNotification extends Mailable
|
|||
$order = $this->invoice->order;
|
||||
|
||||
return $this->from(core()->getSenderEmailDetails()['email'], core()->getSenderEmailDetails()['name'])
|
||||
->to($order->customer_email, $order->customer_full_name)
|
||||
->subject(trans('shop::app.mail.invoice.subject', ['order_id' => $order->increment_id]))
|
||||
->view('shop::emails.sales.new-invoice');
|
||||
->to($order->customer_email, $order->customer_full_name)
|
||||
->subject(trans('shop::app.mail.invoice.subject', ['order_id' => $order->increment_id]))
|
||||
->view('shop::emails.sales.new-invoice');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ class NewOrderNotification extends Mailable
|
|||
public function build()
|
||||
{
|
||||
return $this->from(core()->getSenderEmailDetails()['email'], core()->getSenderEmailDetails()['name'])
|
||||
->to($this->order->customer_email, $this->order->customer_full_name)
|
||||
->subject(trans('shop::app.mail.order.subject'))
|
||||
->view('shop::emails.sales.new-order');
|
||||
->to($this->order->customer_email, $this->order->customer_full_name)
|
||||
->subject(trans('shop::app.mail.order.subject'))
|
||||
->view('shop::emails.sales.new-order');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ class NewRefundNotification extends Mailable
|
|||
$order = $this->refund->order;
|
||||
|
||||
return $this->from(core()->getSenderEmailDetails()['email'], core()->getSenderEmailDetails()['name'])
|
||||
->to($order->customer_email, $order->customer_full_name)
|
||||
->subject(trans('shop::app.mail.refund.subject', ['order_id' => $order->increment_id]))
|
||||
->view('shop::emails.sales.new-refund');
|
||||
->to($order->customer_email, $order->customer_full_name)
|
||||
->subject(trans('shop::app.mail.refund.subject', ['order_id' => $order->increment_id]))
|
||||
->view('shop::emails.sales.new-refund');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ class NewShipmentNotification extends Mailable
|
|||
$order = $this->shipment->order;
|
||||
|
||||
return $this->from(core()->getSenderEmailDetails()['email'], core()->getSenderEmailDetails()['name'])
|
||||
->to($order->customer_email, $order->customer_full_name)
|
||||
->subject(trans('shop::app.mail.shipment.subject', ['order_id' => $order->increment_id]))
|
||||
->view('shop::emails.sales.new-shipment');
|
||||
->to($order->customer_email, $order->customer_full_name)
|
||||
->subject(trans('shop::app.mail.shipment.subject', ['order_id' => $order->increment_id]))
|
||||
->view('shop::emails.sales.new-shipment');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ class RefundItemRepository extends Repository
|
|||
|
||||
if ($orderItem->parent) {
|
||||
$shippedQty = $orderItem->qty_ordered
|
||||
? ($orderItem->qty_ordered / $orderItem->parent->qty_ordered) * $shipmentItem->qty
|
||||
: $orderItem->parent->qty_ordered;
|
||||
? ($orderItem->qty_ordered / $orderItem->parent->qty_ordered) * $shipmentItem->qty
|
||||
: $orderItem->parent->qty_ordered;
|
||||
} else {
|
||||
$shippedQty = $shipmentItem->qty;
|
||||
}
|
||||
|
|
@ -69,7 +69,9 @@ class RefundItemRepository extends Repository
|
|||
|
||||
$quantity -= $totalShippedQtyToRefund;
|
||||
}
|
||||
} elseif ($orderItem->getTypeInstance()->showQuantityBox()) {
|
||||
} elseif (! $orderItem->getTypeInstance()->isStockable()
|
||||
&& $orderItem->getTypeInstance()->showQuantityBox()
|
||||
) {
|
||||
$inventory = $orderItem->product->inventories()
|
||||
// ->where('vendor_id', $data['vendor_id'])
|
||||
->whereIn('inventory_source_id', $orderItem->order->channel->inventory_sources()->pluck('id'))
|
||||
|
|
|
|||
Loading…
Reference in New Issue