Skip to content

Commit

Permalink
Modified customer billing page update to remove any old per-device bi…
Browse files Browse the repository at this point in the history
…lling info
  • Loading branch information
chrisjantzen committed Jul 21, 2023
1 parent 2938572 commit 49bbd87
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 5 additions & 1 deletion User Audit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Created Date: Tuesday, August 2nd 2022, 10:36:05 am
# Author: Chris Jantzen
# -----
# Last Modified: Tue Mar 28 2023
# Last Modified: Fri Jul 21 2023
# Modified By: Chris Jantzen
# -----
# Copyright (c) 2023 Sea to Sky Network Solutions
Expand Down Expand Up @@ -4127,8 +4127,12 @@ if ($ExportChoice -eq 'Yes') {
}

# Add the new data to be uploaded
$FlexAssetBody.attributes.traits."billed-by" = "User"
$FlexAssetBody.attributes.traits."number-of-billed-users" = $TotalBilled
$FlexAssetBody.attributes.traits."user-breakdown" = $UserBreakdownTable
$FlexAssetBody.attributes.traits.Remove("number-of-billed-computers")
$FlexAssetBody.attributes.traits.Remove("number-of-billed-servers")
$FlexAssetBody.attributes.traits.Remove("device-breakdown")
$FlexAssetBody.attributes.traits."billing-report-user-list" = @{
content = $ReportEncoded
file_name = $FileName
Expand Down
9 changes: 7 additions & 2 deletions User_Billing_Update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Created Date: Tuesday, August 2nd 2022, 10:36:05 am
# Author: Chris Jantzen
# -----
# Last Modified: Fri Jun 23 2023
# Last Modified: Fri Jul 21 2023
# Modified By: Chris Jantzen
# -----
# Copyright (c) 2023 Sea to Sky Network Solutions
Expand All @@ -14,6 +14,7 @@
# HISTORY:
# Date By Comments
# ---------- --- ----------------------------------------------------------
# 2023-07-21 CJ Modified customer billing page update to remove any old per-device billing info.
# 2023-03-20 CJ Fixed bug where we weren't sending O365 unmatched info, and changed to send emails if there are unmatched accounts (AD or O365).
###

Expand Down Expand Up @@ -2397,7 +2398,7 @@ if ($BillingUpdate) {

if ($ExistingFlexAsset -and $ExistingFlexAsset.data.attributes.traits) {
$ExistingFlexAsset.data.attributes.traits.PSObject.Properties | ForEach-Object {
if ($_.name -eq "billing-report-user-list") {
if ($_.name -eq "billing-report-user-list" -or $_.name -eq "billing-report-device-list") {
return
}
$property = $_.name
Expand All @@ -2406,8 +2407,12 @@ if ($BillingUpdate) {
}

# Add the new data to be uploaded
$FlexAssetBody.attributes.traits."billed-by" = "User"
$FlexAssetBody.attributes.traits."number-of-billed-users" = $TotalBilled
$FlexAssetBody.attributes.traits."user-breakdown" = $UserBreakdownTable
$FlexAssetBody.attributes.traits.Remove("number-of-billed-computers")
$FlexAssetBody.attributes.traits.Remove("number-of-billed-servers")
$FlexAssetBody.attributes.traits.Remove("device-breakdown")
$FlexAssetBody.attributes.traits."billing-report-user-list" = @{
content = $ReportEncoded
file_name = $FileName
Expand Down
2 changes: 1 addition & 1 deletion currentversion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.18.1
2.18.2

0 comments on commit 49bbd87

Please sign in to comment.