EH
Reported
I cant make a purchase, it gives me ksort error something.
Attachments
- EHAnsweredTested on your demo site but different warning.Attachments
- MSAnsweredHello,
Let me check this tomorrow.
Thank you - MSAnsweredHello,
I have checked. The issue is caused due to item serials. You have enabled serials on item and didn't provide any on add purchase. I will add the validation for this to stop the process at validation with proper error message and not to escalate. If you get this again that mean you need to provide serial numbers.
Thank you - EHAnswered**[Mian Saleem](/u/saleem)** I dont have the serial item enabled and in my purchase i dont see where can i put my serial number on
- MSAnsweredThat's strange. Let me check it again.
- MSAnsweredHello,
Please edit `modules/MPS/Models/PurchaseItem.php` and change line no 37 from `if ($pId && $serials) {` to
```php
if ($pId && $serials && $serials[0]['number']) {
```
I hope that will fix the issue.
Thank you - EHAnswered**[Mian Saleem](/u/saleem)** It give me different error now. I tried to add item with supplier and without supplier is giving me the same error.Attachments
- EHAnsweredWell, with that error i can make a purchase but my product quantity is not increasing.
- MSAnsweredHello,
I will correct the test. As I know there is no option for default supplier.
Can you please edit `modules/MPS/Listeners/PurchaseEventListener.php` and change the link no 51 `if (safe_email($this->purchase->supplier->email) && !default_supplier($this->purchase->supplier_id)) {` to
```php
if (safe_email($this->purchase->supplier->email)) {
```
I am not sure if that's the reason for quantity job failing. You can try after change and let me know the result.
Thank you - EHAnswered**[Mian Saleem](/u/saleem)** New error 500 and the quantity still not increasing.Attachments
- Login to Reply