Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Charge Catalog Status Change Events can be triggered using Custom Logic. When a Status is changed on a Charge Catalog, a prompt gives the option to select a Specified Date or Date To Last Billed. Both options can be generated using Custom Logic. The following parameters are Required to execute each Event.

Date to Last Billed

...

Date to Last Billed
Code Block
linenumberslanguagetruephp
/**
* Event: Available Charges Bulk Update requested
* Listener Class: Application_Model_ChrgCatalog_ChrgCatalog
* Listener Method: eventStopCharges
*/

PCR_Event::attachDb(
    "stop-charges",
    ["Application_Model_ChrgCatalog_ChrgCatalog" => "eventStopCharges"]
);
PCR_Event::trigger(
    "stop-charges", 
	[ 		
		"chgCatalogRecids" => 1761,		//RecID of Charge Catalog selected
		"stopDate" => "12\/14\/2022", 	//Date selected when stopping charges
		"oldAmount" => "10.00000",
		"newAmount" => "5.00",
		"effective" => "backdate",
		"contact" => "216121",			//RecID of Contact that initiated update

		"eventBroadcastBy" => "216121",
		"eventBroadcastTime" => "Sep 29, 2022, 3:29 pm",
		"eventBroadcastDayofWeek" => "4",
		"eventBroadcastHourMin" => "1529",   
	]
);

Specified Date

Specified Date
Code Block
languagephp
titleSpecified Date
linenumberstrue
/**
* Event: Available Charges Bulk Update requested
* Listener Class: Application_Model_ChrgCatalog_ChrgCatalog
* Listener Method: eventStopCharges
*/

PCR_Event::attachDb(
    "stop-charges",
    ["Application_Model_ChrgCatalog_ChrgCatalog" => "eventStopCharges"]
);
PCR_Event::trigger(
    "stop-charges",
	[ 		
		"chgCatalogRecids" => 1761,	 	//RecID of Charge Catalog selected
	 	"stopDate" => "12\/14\/2022",	//Date selected when stopping charges
		"oldAmount" => "15.00000",
		"newAmount" => "10.00",
		"effective" => "today", 
		"contact" => "216121",			//RecID of Contact that initiated the event 

		"eventBroadcastBy" => "216121",
		"eventBroadcastTime" => "Sep 29, 2022, 3:22 pm",
		"eventBroadcastDayofWeek" => "4",
		"eventBroadcastHourMin" => "1522",   
	]
);

...