This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace rockfishCore.Models
|
||||
{
|
||||
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 CustomerId { get; set; }
|
||||
public long SiteId { get; set; }
|
||||
|
||||
@@ -132,9 +132,11 @@ app.customerSiteEdit = (function () {
|
||||
app.utilB.formData(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
//set customer name
|
||||
//app.nav.setContextTitle(title);
|
||||
} else {
|
||||
//it's a new record, set default
|
||||
$("#legacyV7").val(true);
|
||||
$("#dbId").val("v7_no_dbid");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -216,8 +216,9 @@ app.purchaseEdit = (function() {
|
||||
.attr("name", "customerId")
|
||||
.attr("value", res.customerId)
|
||||
.appendTo("#frm");
|
||||
|
||||
title = "Purchase - " + res.name;
|
||||
|
||||
|
||||
if (stateMap.id != "new") {
|
||||
//fetch existing record
|
||||
app.api.get("purchase/" + stateMap.id, function(res) {
|
||||
@@ -230,10 +231,18 @@ app.purchaseEdit = (function() {
|
||||
});
|
||||
} else {
|
||||
//it's a new record, set default
|
||||
$("#quantity").val(1);
|
||||
$("#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="form-group">
|
||||
<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 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 --}}
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
|
||||
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