Changes to generic fields

Malaysia specific fields

type CreditNote {
  // ... all generic credit note fields
  lines: InvoiceLine[];
  invoiceRefs: string[],
  recipient: CreditNoteRecipient,
  customInfo: {
    mys: {
      placeHolder?: string;
    }
  }
}

type CreditNoteRecipient {
  taxId: string;
  name: string;
  customInfo?: StringStringTMap<string | number>;
  contact: {
    phone: string;
  };
  
  customInfo: {
    mys:{
      sstRegistrationNumber?: string;
      identification: {
        type:  'ARMY' | 'BRN' | 'NRIC' | 'Passport',
        value: string 
      }
    }
  };
}

type InvoiceLine {
  description: string;
  itemCode: string;
  quantity?: number;
  vat: {
    type: 'fixed' | 'percent';
    code: TaxCode;
    amount: number;
  };
  price: {
    amount: number;
  };
}
NameTypeRequiredDescription
lines[].itemCodestringYesLine item code (3 character) as specified on [Insert Item Code List]
lines[].vat.codestringYesA value from an enumerated list of types:
01: Sales Tax,
02: Service Tax',
03: Tourism Tax',
04: High-Value Goods Tax',
05: Sales Tax on Low Value Goods',
06: Outside of scope',
E: Exempt'
lines[].vat.exemptReasonstringConditionalIf the line VAT amount is 0, an exemption reason is required.
invoiceRefsstringYesAn array of existing invoices
recipient.contact.phonestringYesContact number of recipient.
customInfo.mys.sstRegistrationNumberstringNoSST registration number of the recipients that are SST-registered. The input of special characters is not allowed, except for dash (-) and semicolon (;). A maximum of two SST registration numbers is allowed.
customInfo.mys.identification.typestringYesARMY: For Malaysian individuals MyKad / MyTentera identification number (12 characters).
BRN: For Businesses. Business registration number (20 characters).
NRIC: For MyPR and MyKAS use NRIC scheme (12 characters).
Passport: For Non-Malaysian individual. Passport number / MyPR / MyKAS identification number (12 characters).
customInfo.mys.identification.valuestringYesIdentification number based on type

Example CSV file

Credit note - Malaysia.csv