This commit is contained in:
@@ -1,11 +1,15 @@
|
|||||||
using System;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
namespace rockfishCore.Models
|
namespace rockfishCore.Models
|
||||||
{
|
{
|
||||||
public partial class Purchase
|
public partial class Purchase
|
||||||
{
|
{
|
||||||
|
public Purchase()
|
||||||
|
{
|
||||||
|
Quantity = 1;
|
||||||
|
VendorName="ShareIT";
|
||||||
|
ExpireDate=Util.DateUtil.DateToEpoch(System.DateTime.Today.AddYears(1));
|
||||||
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public long CustomerId { get; set; }
|
public long CustomerId { get; set; }
|
||||||
public long SiteId { get; set; }
|
public long SiteId { get; set; }
|
||||||
|
|||||||
@@ -132,9 +132,11 @@ app.customerSiteEdit = (function () {
|
|||||||
app.utilB.formData(res);
|
app.utilB.formData(res);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
//set customer name
|
//it's a new record, set default
|
||||||
//app.nav.setContextTitle(title);
|
$("#legacyV7").val(true);
|
||||||
|
$("#dbId").val("v7_no_dbid");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -216,8 +216,9 @@ app.purchaseEdit = (function() {
|
|||||||
.attr("name", "customerId")
|
.attr("name", "customerId")
|
||||||
.attr("value", res.customerId)
|
.attr("value", res.customerId)
|
||||||
.appendTo("#frm");
|
.appendTo("#frm");
|
||||||
|
|
||||||
title = "Purchase - " + res.name;
|
title = "Purchase - " + res.name;
|
||||||
|
|
||||||
|
|
||||||
if (stateMap.id != "new") {
|
if (stateMap.id != "new") {
|
||||||
//fetch existing record
|
//fetch existing record
|
||||||
app.api.get("purchase/" + stateMap.id, function(res) {
|
app.api.get("purchase/" + stateMap.id, function(res) {
|
||||||
@@ -230,10 +231,18 @@ app.purchaseEdit = (function() {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//it's a new record, set default
|
//it's a new record, set default
|
||||||
|
$("#quantity").val(1);
|
||||||
$("#purchaseDate").val(new Date().toISOString().substring(0, 10));
|
$("#purchaseDate").val(new Date().toISOString().substring(0, 10));
|
||||||
|
$("#expireDate").val(
|
||||||
|
moment()
|
||||||
|
.add(1, "years")
|
||||||
|
.toISOString()
|
||||||
|
.substring(0, 10)
|
||||||
|
);
|
||||||
|
$("#vendorName").val("ShareIt");
|
||||||
|
|
||||||
}
|
}
|
||||||
//set title
|
|
||||||
//app.nav.setContextTitle(title);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="quantity">Quantity</label>
|
<label for="quantity">Quantity</label>
|
||||||
<input class="form-control" type="text" id="quantity" name="quantity" value="">
|
<input class="form-control" type="number" id="quantity" name="quantity" value="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<nav id="rf-nav" class="navbar fixed-top navbar-expand-lg navbar-light" style="background-color: #e3f2fd;">
|
<nav id="rf-nav" class="navbar fixed-top navbar-expand-lg navbar-dark" style="background-color: #00205B;">
|
||||||
{{!-- navbar-dark bg-success --}}
|
{{!-- navbar-dark bg-success --}}
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
|
||||||
aria-expanded="false" aria-label="Toggle navigation">
|
aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user