Merge pull request #195 from bagisto/jitendra

Jitendra
This commit is contained in:
JItendra Singh 2018-11-28 14:49:50 +05:30 committed by GitHub
commit b9178a084e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -123,7 +123,7 @@ class CustomerGroupController extends Controller
{
$group = $this->customerGroup->findOneWhere(['id'=>$id]);
if($group->is_user_defined == 1) {
if(!$group->is_user_defined) {
session()->flash('error', 'This Customer Group can not be deleted');
} else {
$this->customerGroup->delete($id);

View File

@ -38,7 +38,7 @@ class CustomerAddressForm extends FormRequest
'billing.country' => ['required']
];
if(!$this->get('billing')['use_for_shipping']) {
if(isset($this->get('billing')['use_for_shipping']) && !$this->get('billing')['use_for_shipping']) {
$this->rules = array_merge($this->rules, [
'shipping.first_name' => ['required'],
'shipping.last_name' => ['required'],

View File

@ -111,6 +111,7 @@ class InvoiceRepository extends Repository
$invoiceItem = $this->invoiceItem->create([
'invoice_id' => $invoice->id,
'order_item_id' => $orderItem->id,
'state' => 'paid',
'name' => $orderItem->name,
'sku' => $orderItem->sku,
'qty' => $qty,