Zen Cart Edit Orders and my Discounting Mods

Recent versions of Zen Cart Edit Orders (4.3.1, for example) will get the wrong total for orders using my discounting mods (such as Better Together) when they edit an order.   The order is too low by the amount of the tax on the discount.  For example, at a tax rate of 7%, a discount of $25 would produce an order total that was $1.75 too low – for example, $506.50 instead of $508.25.

The fix is to change the function process() in the code file in includes/modules/order_total (e.g. includes/modules/order_total/ot_quantity_discount.php for Quantity Discounts) as follows:

  
if ($this->calculate_tax != 'VAT') {
     $order->info['total'] -= $od_amount[$key];
}

to

               
if (!IS_ADMIN_FLAG) {
   if ($this->calculate_tax != 'VAT') {
      $order->info['total'] -= $od_amount[$key];
   }
}