mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-11-02 10:38:48 -05:00
Add invoice item description in product report
This commit is contained in:
parent
fb92a3cfbc
commit
ff5911ff60
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Ninja\Presenters;
|
namespace App\Ninja\Presenters;
|
||||||
|
|
||||||
|
use Str;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
|
|
||||||
class InvoiceItemPresenter extends EntityPresenter
|
class InvoiceItemPresenter extends EntityPresenter
|
||||||
@ -16,4 +17,9 @@ class InvoiceItemPresenter extends EntityPresenter
|
|||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function notes()
|
||||||
|
{
|
||||||
|
return Str::limit($this->entity->notes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ class ProductReport extends AbstractReport
|
|||||||
'invoice_number',
|
'invoice_number',
|
||||||
'invoice_date',
|
'invoice_date',
|
||||||
'product',
|
'product',
|
||||||
|
'description',
|
||||||
'qty',
|
'qty',
|
||||||
'cost',
|
'cost',
|
||||||
//'tax_rate1',
|
//'tax_rate1',
|
||||||
@ -45,6 +46,7 @@ class ProductReport extends AbstractReport
|
|||||||
$this->isExport ? $invoice->invoice_number : $invoice->present()->link,
|
$this->isExport ? $invoice->invoice_number : $invoice->present()->link,
|
||||||
$invoice->present()->invoice_date,
|
$invoice->present()->invoice_date,
|
||||||
$item->product_key,
|
$item->product_key,
|
||||||
|
$this->isExport ? $item->notes : $item->present()->notes,
|
||||||
Utils::roundSignificant($item->qty, 0),
|
Utils::roundSignificant($item->qty, 0),
|
||||||
Utils::roundSignificant($item->cost, 2),
|
Utils::roundSignificant($item->cost, 2),
|
||||||
];
|
];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user