mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 13:24:34 -04:00
Fixes for vendors
This commit is contained in:
parent
974d614075
commit
ace8c64162
@ -66,6 +66,8 @@ class UpdateVendorRequest extends Request
|
|||||||
$input['assigned_user_id'] = $this->decodePrimaryKey($input['assigned_user_id']);
|
$input['assigned_user_id'] = $this->decodePrimaryKey($input['assigned_user_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$input = $this->decodePrimaryKeys($input);
|
||||||
|
|
||||||
$this->replace($input);
|
$this->replace($input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ class VendorContactRepository extends BaseRepository
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get array of IDs which have been removed from the contacts array and soft delete each contact */
|
/* Get array of IDs which have been removed from the contacts array and soft delete each contact */
|
||||||
$vendor->contacts->pluck('hashed_id')->diff($contacts->pluck('id'))->each(function ($contact) {
|
$vendor->contacts->pluck('id')->diff($contacts->pluck('id'))->each(function ($contact) {
|
||||||
VendorContact::destroy($contact);
|
VendorContact::destroy($contact);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ class VendorContactRepository extends BaseRepository
|
|||||||
$update_contact = null;
|
$update_contact = null;
|
||||||
|
|
||||||
if (isset($contact['id'])) {
|
if (isset($contact['id'])) {
|
||||||
$update_contact = VendorContact::find($this->decodePrimaryKey($contact['id']));
|
$update_contact = VendorContact::find($contact['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $update_contact) {
|
if (! $update_contact) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user