anchor.diff:  ----             
   
   [start=2]
  -. When the account is charged (either due to a recurring subscription or an external charge), the credit added is adjusted. 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.
  +. 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:
   
  
positive.code: 
  Before we look at each scenario, let us understand how `charged amount` and `balance` are calculated. 
  
  === Charged Amount/Invoice Amount/Amount
  
  The `charged amount` (also known as `invoice amount`, `invoice total` or simply `amount`) specifies the amount that the customer is charged as part of an invoice. It is computed by adding up the amounts on invoice items of type `FIXED`, `RECURRING`, `EXTERNAL_CHARGE`, `USAGE`, `TAX`, `ITEM_ADJ`, `REPAIR_ADJ`, `PARENT_SUMMARY` and `CREDIT_ADJ`. Note that `PARENT_SUMMARY` invoice items are only applicable in the case of https://docs.killbill.io/latest/ha.html[hierarchical accounts] and will be skipped in the rest of this document.
  
  
negative.code: ----
                  
  [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:
  
  