Add a item (with default values) to the invoice

i want add a new line (with default values) to the invoice.
I succeeded but the line-total is not updated.

My Button
<div><a class="pointer" onClick="invoice.addItem();invoice.addStamp();">{{ trans('texts.add_stamp') }}</a></div>

My function
` self.addStamp = function() {

        var lastRow = self.invoice_items_without_tasks().length-1;

        $('textarea[name="invoice_items['+lastRow+'][notes]"').text('{{ env('STAMP_DESC') }}');

        $('input[name="invoice_items['+lastRow+'][cost]"').val('{{ env('STAMP') }}');

        $('input[name="invoice_items['+lastRow+'][cost]"').closest('tr').find('select[name="itemTaxes1"]').val('{{ env('STAMP_TAX') }}');


Help me please.

Sorry, we aren’t able to provide developer support.

If you’d like to hire a developer we recommend this company: