mirror of
https://github.com/crater-invoice/crater.git
synced 2025-12-15 18:02:55 -05:00
fix item reports issue
This commit is contained in:
@@ -78,7 +78,8 @@ class InvoiceItem extends Model
|
||||
public function scopeItemAttributes($query)
|
||||
{
|
||||
$query->select(
|
||||
DB::raw('sum(quantity) as total_quantity, sum(total) as total_amount, item_id')
|
||||
)->groupBy('item_id');
|
||||
DB::raw('sum(quantity) as total_quantity, sum(total) as total_amount, invoice_items.name')
|
||||
)->groupBy('invoice_items.name');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user