mirror of
https://github.com/itflow-org/itflow
synced 2026-11-29 15:48:59 +00:00
Contract rates of 0 are a rate of nothing rather than the default: contractFromInput saves an entered 0 as 0.00 and only an empty rate as NULL, for contracts, contract templates and the API; contractTicketRate, contractTermsOn, contractUsualTerms, contractClientTerms and the clients list rate treat a rate as set when it is not NULL instead of above 0, and contractClientTerms gives null for no after-hours rate so a 0 after-hours rate shows on the client overview, terms note and export; the no-rate warnings on Unbilled Time, Unbilled Tickets, Time Detail by Client and the bill-a-ticket window only flag a 0 rate from the default; the contract and template forms say a rate of 0 bills that time at nothing; existing contracts have no 0 rates stored so nothing changes for them; 26.11.9 changelog entries
This commit is contained in:
@@ -464,7 +464,7 @@ function clientExportRows($dataset, $client_id, $options) {
|
||||
'name' => $row['client_name'], 'abbreviation' => $row['client_abbreviation'], 'industry' => $row['client_type'], 'website' => $row['client_website'],
|
||||
'referral' => $row['client_referral'], 'lead' => clientExportYes($row['client_lead']),
|
||||
'tags' => clientExportTags('client_tags', 'client_id', [$client_id])[$client_id] ?? '',
|
||||
'hourly_rate' => $terms ? sprintf('%.2f', $terms['rate']['rate']) : '', 'after_hours_rate' => $terms && $terms['after_hours'][0] > 0 ? sprintf('%.2f', $terms['after_hours'][0]) : '',
|
||||
'hourly_rate' => $terms ? sprintf('%.2f', $terms['rate']['rate']) : '', 'after_hours_rate' => $terms && $terms['after_hours'][0] !== null ? sprintf('%.2f', $terms['after_hours'][0]) : '',
|
||||
'net_terms' => $terms ? $terms['net_terms'][0] : '',
|
||||
'terms_from' => $terms ? (($terms['rate']['contract_name'] ?: ($terms['net_terms'][1] ?: $terms['after_hours'][1])) ?: 'The defaults') : '',
|
||||
'currency' => $billing ? $row['client_currency_code'] : '', 'tax_id' => $billing ? $row['client_tax_id_number'] : '',
|
||||
|
||||
Reference in New Issue
Block a user