mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
fix payment invalid-number issue
This commit is contained in:
@@ -268,7 +268,7 @@ class Payment extends Model implements HasMedia
|
||||
{
|
||||
// Get the last created order
|
||||
$payment = Payment::where('payment_number', 'LIKE', $value . '-%')
|
||||
->orderBy('created_at', 'desc')
|
||||
->orderBy('payment_number', 'desc')
|
||||
->first();
|
||||
if (!$payment) {
|
||||
// We get here if there is no order at all
|
||||
|
||||
Reference in New Issue
Block a user