Common check on billrun

Check if there are no ongoing locks

SELECT TOP 1000 [transmissionId] ,[server] ,[CreateDateTime] FROM [v4].[dbo].[ZuoraUsagesTransmission]
SELECT TOP 1000 [hotelId] ,[server] ,[CreateDateTime] FROM [v4].[dbo].[ZuoraUsagesCalculationCronProcesses]

if any locks, better delete the locks first before continuing

 

Manually launching script to be sure everything is calculated for current month

From any server, launch the script ForceUsageCalculation on the first day of the month without editing.

If you launch the script on the 2nd of the month, edit the line

$today = new \DateTime('today', new \DateTimeZone($Hotel->TimeZone));

to launch the script:

if for any reason you want to launch only specific calculations on that script, you can overwrite the followin lines:

Force whitelabelId if needed

To force hotels:

Once ForceUsageCalculation script ended, check the status of all usages upload

If a usage stay in Waiting for too long, it means there is a lock to remove in ZuoraUsagesTransmission

should any usages be stuck InProgress or Error, you need to manually check if the usages is in the Zuora account. make sure to set the status to Done if it is already in Zuora

then on next cron of upload it should be uploaded correctly

Checking usages in general

Note this is not needed, just for information

You can do a small comparaison with previous month

(First date : previous start 2 month ago, second date

 

Checking reservations amount usages

this is important

When all are done, you can quickly check the reservations CRS usages with this query:

Note that currently for Avenue6 we also calculate those, you need to manually go in the Zuora account and delete the usages because there is no conversion currently and the amount would be wrong.

For that go in the account itself and under usages, click on “pending process”

then you can delete the usage bottom right

You can list reservation usages : (make sure there are the same number of usages as previous month)

Checking usages for meta + payment transactions:

Startdate = calculation month

 

Checking invoices callouts

 

If you see some line that are InProgress or Error for some sime, it means the process failed.

To unblock:

First remove the local for the “obj_ids” returned in first query

Then update the following fields for the obj_ids: