-
Notifications
You must be signed in to change notification settings - Fork 8
Calculate contracts in first billing cycle #4297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Conversation
why? If you have enough balance, you will get the discount no matter the billing cycle number |
@@ -305,8 +309,10 @@ class TFContracts extends Contracts { | |||
const gqlConsumption: GqlConsumption = response["data"] as GqlConsumption; | |||
const billReports = gqlConsumption.contractBillReports; | |||
if (billReports.length === 0) { | |||
const contractCostUSD = await this.getContractCost(contract, proxy); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to pass the contract only proxy client can handle that
const contract = (await proxy.contracts.list({ contractId: options.id }))[0];
async getConsumption( | ||
options: GetConsumptionOptions, | ||
contract: Contract, | ||
proxy: GridProxyClient, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may have a new function called, for example, getConsumptionWithEstimation
,
As these changes will break the current usage of this function in other places, and maybe in other clients
Test scenarios:
|
Description
Calculated the contract cost to be used as the billing rate instead of the consumption in the first billing cycle
Changes
Related Issues
Tested Scenarios
Documentation PR
For UI changes, Please provide the Documentation PR on info_grid
To consider
Preliminary Checks:
UI Checks:
Code Quality Checks:
Testing Checklist
General Checklist