The discount code is initialized using the discount code of the invoicing supplier. It can still be modified.
Only a discount code consistent with the legislation and company group of the document site can be entered.The general principles linked to the multi-legislation setup are detailed here.
Specificities linked to inter-companies: for an intercompany invoice generated from a sales invoices, the payment condition is intialized from the one of the sales invoice.