This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user