anchor.diff:  INVOICE BALANCE = 0  //since invoice is still in DRAFT status               
   ----
   
  -[start=3]
  ++
  +
   . Finally, when the invoice is committed, the balance is updated:
  +
  ++
   
   [source,java]
   ----
  
positive.code: 
  . When a https://killbill.github.io/slate/#credit-create-credits[credit is added] (let's say for `$20`), an invoice is generated with two invoice items: `Type=CREDIT_ADJ, Amount=-20` and `Type=CBA_ADJ, Amount=20`. The `CREDIT_ADJ` invoice item is negative and corresponds to the credit while the `CBA_ADJ` item is positive and is automatically inserted by the system to bring the invoice balance to `0`.
  
  So, `CHARGED AMOUNT` and `BALANCE` are calculated as follows:
  
  [source,java]
  ----
  
negative.code:                 = 0
  ----             
  
  +
  
  . When the account is charged (either due to a recurring subscription or an external charge), any existing previously generated credit will be used (consumed). So, for example, if an external charge is created for `$100`, it will have an invoice item of type `EXTERNAL_CHARGE` and amount `100`. In addition, it will also have an invoice item of type `CBA_ADJ` and amount `-20` automatically generated by the system corresponding to the credit adjustment.
  
  +
  
  So, `CHARGED AMOUNT` and `BALANCE` are calculated as follows:
  
  +
  
  [source,java]
  ----
  