Allow to delete all types of vouchers.
While deleting voucher
First check whether Invoice is associate with vouchers, If Yes , then subtract that amount from amountpaid field in invoice table
While deleting voucher
First check whether Invoice is associate with vouchers, If Yes , then subtract that amount from amountpaid field in invoice table