Difference between revisions of "Customer:OnPac"

From Freeside
Jump to: navigation, search
(Schema changes)
(Usage import)
Line 9: Line 9:
 
= Usage import =
 
= Usage import =
  
* Import usage charges into elec_usage table (Usage charges)
+
* Import usage charges into usage_elec table (Usage charges)
** Add import subroutine to elec_usage.pm
+
** Add import subroutine to usage_elec.pm
 
** Add page to web UI to accept upload
 
** Add page to web UI to accept upload
 
** Add menu entry and ACL for new page ''Tools->Importing->Import electricity usage from CSV file''
 
** Add menu entry and ACL for new page ''Tools->Importing->Import electricity usage from CSV file''

Revision as of 08:01, 2 November 2006

Schema changes

  • Add usage_elec table and class (see Schema Changes)
    • id serial primary_key
    • _date @date_type
    • kwatts int
    • tdsp @money_type

Usage import

  • Import usage charges into usage_elec table (Usage charges)
    • Add import subroutine to usage_elec.pm
    • Add page to web UI to accept upload
    • Add menu entry and ACL for new page Tools->Importing->Import electricity usage from CSV file
  • Associate usage charges with specific customer/package (Static mapping)
  • Trigger billing for that customer package (Billing)

Usage charges

  • KW -> kwatts
  • Invoice date -> _date

Static mapping

  • CUSTOMER NAME -> informational only, or sanity check w/ Freeside data
  • CUSTOMER ACCOUNT -> cust_main.agent_custid
  • ESIID -> svc_external.id (associates with customer)

Unknown

Still have to determine how to handle these fields in import:

  • Invoice number -> need to store/use somehow instead of autogenerated invoice number?
  • Cross reference -> what is this for?
  • ESSID -> what is this for?

Billing

  • Add a rate plan to bill on demand
  • Calculate Kw difference & multiply by a rate (rate stored in part_pkg_option)
  • Pass through the desired details as cust_bill_pkg_detail

Add'l work

  • Handle Due Date
    • Add new cust_bill column to store per-invoice due dates
    • Have import associate this with the bills it triggers