Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-1258

Billing Overview: Overdue balance does not consider partial payments

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.2.1
    • Component/s: Staff Interface
    • Labels:
      None

      Description

      The Overdue Balance value in the Billing Overview widget shows the invoice total amount for all open invoices, regardless of whether some of those invoices have partial payments applied to them.

        Activity

        Hide
        tyson Tyson Phillips (Inactive) added a comment -

        To fix this yourself, find /plugins/bulling_overview/models/billing_overview_statistics.php (line 111):
        Change

        $amount = $this->Record->select(array("SUM(IFNULL(invoices.total,0))" => "total"), false)->

        to:

        $amount = $this->Record->select(array("SUM(GREATEST(0, IFNULL(invoices.total,0) - IFNULL(invoices.paid,0)))" => "total"), false)->

        Show
        tyson Tyson Phillips (Inactive) added a comment - To fix this yourself, find /plugins/bulling_overview/models/billing_overview_statistics.php (line 111): Change $amount = $this->Record->select(array("SUM(IFNULL(invoices.total,0))" => "total"), false)-> to: $amount = $this->Record->select(array("SUM(GREATEST(0, IFNULL(invoices.total,0) - IFNULL(invoices.paid,0)))" => "total"), false)->

          People

          • Assignee:
            tyson Tyson Phillips (Inactive)
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              25/Jun/14