Add discount per item for invoice
This commit is contained in:
		@@ -98,6 +98,37 @@
 | 
			
		||||
        </td>
 | 
			
		||||
    @stack('price_td_end')
 | 
			
		||||
 | 
			
		||||
    @stack('discount_td_start')
 | 
			
		||||
        <td class="border-right-0 border-bottom-0 w-12"
 | 
			
		||||
            :class="[{'has-error': form.errors.has('items.' + index + '.discount') }]">
 | 
			
		||||
            @stack('discount_input_start')
 | 
			
		||||
            <div class="input-group input-group-merge">
 | 
			
		||||
            <div class="input-group-prepend">
 | 
			
		||||
                    <span class="input-group-text" id="input-discount">
 | 
			
		||||
                        <i class="fa fa-percent"></i>
 | 
			
		||||
                    </span>
 | 
			
		||||
                </div>
 | 
			
		||||
                <input type="number"
 | 
			
		||||
                       max="100"
 | 
			
		||||
                       min="0"
 | 
			
		||||
                       class="form-control text-center"
 | 
			
		||||
                       :name="'items.' + index + '.discount'"
 | 
			
		||||
                       autocomplete="off"
 | 
			
		||||
                       required="required"
 | 
			
		||||
                       data-item="quantity"
 | 
			
		||||
                       v-model="row.discount"
 | 
			
		||||
                       @input="onCalculateTotal"
 | 
			
		||||
                       @change="form.errors.clear('items.' + index + '.discount')">
 | 
			
		||||
 | 
			
		||||
                <div class="invalid-feedback d-block"
 | 
			
		||||
                     v-if="form.errors.has('items.' + index + '.discount')"
 | 
			
		||||
                     v-html="form.errors.get('items.' + index + '.discount')">
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            @stack('discount_input_end')
 | 
			
		||||
        </td>
 | 
			
		||||
    @stack('discount_td_end')
 | 
			
		||||
 | 
			
		||||
    @stack('taxes_td_start')
 | 
			
		||||
        <td class="border-right-0 border-bottom-0"
 | 
			
		||||
            :class="[{'has-error': form.errors.has('items.' + index + '.tax_id') }]">
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user