You cannot cancel an e-invoice partially. If you must cancel the e-invoice, then it must be done completely or fully.
When you do this, you must report it to the IRN within 24 hours of the cancellation. If you try to cancel an e-invoice after that period, then you cannot use the IRN. Instead, you need to use the GST portal for cancellation, and it must be done manually. This has to be done prior to filing the returns. When you cancel, you cannot re-use the invoice number, and a new one must be generated else the IRP will reject it.