mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-15 02:35:47 +00:00
Merge f278d86420 into 29c23e92ea
This commit is contained in:
commit
fde1721f92
2 changed files with 13 additions and 0 deletions
|
|
@ -122,6 +122,9 @@ function New-SnipeitAsset() {
|
||||||
[parameter(mandatory = $false)]
|
[parameter(mandatory = $false)]
|
||||||
[datetime]$purchase_date,
|
[datetime]$purchase_date,
|
||||||
|
|
||||||
|
[parameter(mandatory = $false)]
|
||||||
|
[datetime]$asset_eol_date,
|
||||||
|
|
||||||
[parameter(mandatory = $false)]
|
[parameter(mandatory = $false)]
|
||||||
[int]$supplier_id,
|
[int]$supplier_id,
|
||||||
|
|
||||||
|
|
@ -157,6 +160,10 @@ function New-SnipeitAsset() {
|
||||||
$values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd")
|
$values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($values['asset_eol_date']) {
|
||||||
|
$values['asset_eol_date'] = $values['asset_eol_date'].ToString("yyyy-MM-dd")
|
||||||
|
}
|
||||||
|
|
||||||
if ($customfields) {
|
if ($customfields) {
|
||||||
$Values += $customfields
|
$Values += $customfields
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,8 @@ function Set-SnipeitAsset() {
|
||||||
|
|
||||||
[datetime]$purchase_date,
|
[datetime]$purchase_date,
|
||||||
|
|
||||||
|
[datetime]$asset_eol_date,
|
||||||
|
|
||||||
[parameter(mandatory = $false)]
|
[parameter(mandatory = $false)]
|
||||||
[int]$supplier_id,
|
[int]$supplier_id,
|
||||||
|
|
||||||
|
|
@ -162,6 +164,10 @@ function Set-SnipeitAsset() {
|
||||||
$Values['purchase_date'] = $Values['purchase_date'].ToString("yyyy-MM-dd")
|
$Values['purchase_date'] = $Values['purchase_date'].ToString("yyyy-MM-dd")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($Values['asset_eol_date']) {
|
||||||
|
$Values['asset_eol_date'] = $Values['asset_eol_date'].ToString("yyyy-MM-dd")
|
||||||
|
}
|
||||||
|
|
||||||
if ($customfields) {
|
if ($customfields) {
|
||||||
$Values += $customfields
|
$Values += $customfields
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue