mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
fix next number issue on estimate & invoice
This commit is contained in:
@ -77,7 +77,7 @@ class Estimate extends Model implements HasMedia
|
||||
{
|
||||
// Get the last created order
|
||||
$lastOrder = Estimate::where('estimate_number', 'LIKE', $value . '-%')
|
||||
->orderBy('created_at', 'desc')
|
||||
->orderBy('estimate_number', 'desc')
|
||||
->first();
|
||||
|
||||
if (!$lastOrder) {
|
||||
@ -435,7 +435,7 @@ class Estimate extends Model implements HasMedia
|
||||
|
||||
if ($logo && $isLocalhost && $isSystem) {
|
||||
$logo = $logo->getPath();
|
||||
} else if($logo) {
|
||||
} else if ($logo) {
|
||||
$logo = $logo->getFullUrl();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user