add support for billable members at contrib level

This commit is contained in:
Jon Goldberg 2019-10-02 12:46:55 -04:00
parent bc15e9e42a
commit 466d68bad1
No known key found for this signature in database
GPG Key ID: C2D2247364F9DB13
1 changed files with 11 additions and 8 deletions

View File

@ -11,16 +11,18 @@ class CRM_Tbusainvoicegen_Timebank {
const DUEDATE = 'custom_245';
const PERIODBEGIN = 'custom_246';
const PERIODEND = 'custom_247';
const BILLABLEMEMBERSCONTRIB = 'custom_249';
// Local dev settings.
// const TBBILLABLEFIELD = 'custom_9';
// const BILLABLEMEMBERFIELD = 'custom_10';
// const BILLINGPERIODFIELD = 'custom_11';
// const TBCREATED = 'custom_27';
// const INVOICEDATE = 'custom_30';
// const DUEDATE = 'custom_31';
// const PERIODBEGIN = 'custom_32';
// const PERIODEND = 'custom_33';
// const TBBILLABLEFIELD = 'custom_14';
// const BILLABLEMEMBERFIELD = 'custom_15';
// const BILLINGPERIODFIELD = 'custom_7';
// const TBCREATED = 'custom_16';
// const INVOICEDATE = 'custom_9';
// const DUEDATE = 'custom_11';
// const PERIODBEGIN = 'custom_12';
// const PERIODEND = 'custom_13';
// const BILLABLEMEMBERSCONTRIB = 'custom_8';
/**
* Set the pricing here.
@ -242,6 +244,7 @@ class CRM_Tbusainvoicegen_Timebank {
self::INVOICEDATE => $this->invoiceDate->format('Y-m-d'),
self::PERIODBEGIN => $this->periodBegin->format('Y-m-d'),
self::PERIODEND => $this->periodEnd->format('Y-m-d'),
self::BILLABLEMEMBERSCONTRIB => $this->memberCount,
'total_amount' => $this->price,
'contact_id' => $this->cid,
'contribution_status_id' => 'Pending',