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:                
  INVOICE BALANCE = 0  // since invoice is in DRAFT status               
  ----
                  
  [start=2]
  . Next, when a https://killbill.github.io/slate/#credit-create-credits[credit is added] to the invoice (say `$20`), the invoice is modified.  A new invoice item is added of type `CREDIT_ADJ` and amount `-20`. In this case, an invoice item of type `CBA_ADJ` is NOT added as the credit is directly consumed.
  
  So, `CHARGED AMOUNT` and `BALANCE` are calculated as follows:
  
  [source,java]
  ----
  
negative.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]
  ----
  