Answer to your questions solely depends on the Local Compliance Rule. In Ideal Scenario you will Issue Debit Note to the Supplier and Not Credit Note. Also, this needs to be done if the vendor has billed you for 30 qty and delivered only 20, If billing is for 20qty no need of issuing Debit Note. From the Customer Perspective, You just have to issue a sales Invoice for the qty you are delivering
This is a common situation, and ERPNext has ways to handle it smoothly. Here’s how you can manage each part:
Credit Note to Supplier for Missing 10 Units:
Since your supplier delivered only 20 out of 30 units, you can create a Purchase Return or a Credit Note against the supplier’s Purchase Invoice for the 10 undelivered units.
Alternatively, you can update the Purchase Receipt to reflect only the 20 units received, so your Purchase Invoice will be based on that quantity.
Then raise a Credit Note or request a refund/adjustment for the missing units.
Sales Invoice for Customer Paying Only for 20 Units:
Your Sales Invoice should match what the customer actually received — so invoice for 20 units only.
If you initially created an invoice for 30 units, you can create a Sales Return or issue a Credit Note for the 10 units not delivered.
Make sure your delivery note and invoice quantities are aligned.
Handling Purchase Invoice:
The Purchase Invoice should be based on the goods actually received (20 units).
If you already created an invoice for 30 units, you can submit a Purchase Invoice Return or Credit Note for the 10 missing units.
Otherwise, only create the Purchase Invoice for the 20 units you have received.
Please check out the below video for more details.