This commit is contained in:
@@ -14,7 +14,7 @@ namespace Sockeye.DataList
|
||||
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
DefaultColumns = new List<string>() { "PurchaseDate", "PurchaseSalesOrderNumber", "Customer", "Product", "PurchaseProcessedDate" };
|
||||
DefaultColumns = new List<string>() { "PurchaseDate", "PurchaseSalesOrderNumber", "Customer", "Product", "PurchaseProcessed" };
|
||||
DefaultSortBy = new Dictionary<string, string>() { { "PurchaseDate", "-" } };
|
||||
FieldDefinitions = new List<DataListFieldDefinition>();
|
||||
|
||||
@@ -120,10 +120,10 @@ namespace Sockeye.DataList
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "PurchaseProcessedDate",
|
||||
FieldKey = "PurchaseProcessedDate",
|
||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
SqlValueColumnName = "apurchase.processeddate"
|
||||
TKey = "PurchaseProcessed",
|
||||
FieldKey = "PurchaseProcessed",
|
||||
UiFieldDataType = (int)UiFieldDataType.Bool,
|
||||
SqlValueColumnName = "apurchase.processed"
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ namespace Sockeye.Biz
|
||||
l.Add(new FormField { TKey = "PurchaseCouponCode", FieldKey = "PurchaseCouponCode" });
|
||||
l.Add(new FormField { TKey = "PurchaseNotes", FieldKey = "PurchaseNotes" });
|
||||
l.Add(new FormField { TKey = "PurchaseVendorData", FieldKey = "PurchaseVendorData" });
|
||||
l.Add(new FormField { TKey = "PurchaseProcessedDate", FieldKey = "PurchaseProcessedDate" });
|
||||
l.Add(new FormField { TKey = "PurchaseProcessed", FieldKey = "PurchaseProcessed" });
|
||||
|
||||
l.Add(new FormField { TKey = "Tags", FieldKey = "Tags" });
|
||||
l.Add(new FormField { TKey = "Wiki", FieldKey = "Wiki" });
|
||||
|
||||
@@ -285,7 +285,8 @@ namespace Sockeye.Biz
|
||||
s.CouponCode = jPurchase["couponCode"].Value<string>();
|
||||
s.ExpireDate = DateUtil.EpochToDateNullIsNull(jPurchase["expireDate"].Value<long?>());
|
||||
s.Name = p.Name;
|
||||
s.ProcessedDate = s.PurchaseDate = DateUtil.EpochToDateNullIsMin(jPurchase["purchaseDate"].Value<long?>());
|
||||
s.Processed = true;
|
||||
s.PurchaseDate = DateUtil.EpochToDateNullIsMin(jPurchase["purchaseDate"].Value<long?>());
|
||||
s.Quantity = jPurchase["quantity"].Value<int>();
|
||||
s.RenewNoticeSent = jPurchase["renewNoticeSent"].Value<bool>();
|
||||
s.SalesOrderNumber = jPurchase["salesOrderNumber"].Value<string>();
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Sockeye.Models
|
||||
public bool RenewNoticeSent { get; set; } = false;
|
||||
public int Quantity { get; set; } = 1;
|
||||
public string VendorData { get; set; }
|
||||
public DateTime? ProcessedDate { get; set; }
|
||||
public bool Processed { get; set; } = false;//indicates it was processed, false means it should be processed
|
||||
public string Wiki { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
//workaround for notification
|
||||
|
||||
@@ -902,7 +902,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
+ "vendorid BIGINT NOT NULL REFERENCES avendor(id), productid BIGINT REFERENCES aproduct(id), pgroup INTEGER NOT NULL DEFAULT 4, salesordernumber TEXT NOT NULL, "
|
||||
+ "purchasedate TIMESTAMPTZ NOT NULL, expiredate TIMESTAMPTZ, canceldate TIMESTAMPTZ, couponcode text, notes text, "
|
||||
+ "renewnoticesent BOOL NOT NULL DEFAULT false, quantity INTEGER NOT NULL DEFAULT 1, "
|
||||
+ "vendordata TEXT, processeddate TIMESTAMPTZ, "
|
||||
+ "vendordata TEXT, processed BOOL NOT NULL DEFAULT false, "
|
||||
+ "wiki TEXT, tags VARCHAR(255) ARRAY )");
|
||||
|
||||
|
||||
@@ -1206,7 +1206,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseRenewNoticeSent', 'Renew notice sent' FROM atranslation t where t.baselanguage = 'en'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseQuantity', 'Quantity' FROM atranslation t where t.baselanguage = 'en'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseVendorData', 'Vendor data' FROM atranslation t where t.baselanguage = 'en'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseProcessedDate', 'Processed' FROM atranslation t where t.baselanguage = 'en'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseProcessed', 'Processed' FROM atranslation t where t.baselanguage = 'en'");
|
||||
|
||||
//spanish translations
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'Purchase', 'Purchase' FROM atranslation t where t.baselanguage = 'es'");
|
||||
@@ -1220,7 +1220,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseRenewNoticeSent', 'Renew notice sent' FROM atranslation t where t.baselanguage = 'es'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseQuantity', 'Quantity' FROM atranslation t where t.baselanguage = 'es'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseVendorData', 'Vendor data' FROM atranslation t where t.baselanguage = 'es'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseProcessedDate', 'Processed' FROM atranslation t where t.baselanguage = 'es'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseProcessed', 'Processed' FROM atranslation t where t.baselanguage = 'es'");
|
||||
|
||||
//french translations
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'Purchase', 'Purchase' FROM atranslation t where t.baselanguage = 'fr'");
|
||||
@@ -1234,7 +1234,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseRenewNoticeSent', 'Renew notice sent' FROM atranslation t where t.baselanguage = 'fr'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseQuantity', 'Quantity' FROM atranslation t where t.baselanguage = 'fr'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseVendorData', 'Vendor data' FROM atranslation t where t.baselanguage = 'fr'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseProcessedDate', 'Processed' FROM atranslation t where t.baselanguage = 'fr'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseProcessed', 'Processed' FROM atranslation t where t.baselanguage = 'fr'");
|
||||
|
||||
|
||||
//german translations
|
||||
@@ -1249,7 +1249,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseRenewNoticeSent', 'Renew notice sent' FROM atranslation t where t.baselanguage = 'de'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseQuantity', 'Quantity' FROM atranslation t where t.baselanguage = 'de'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseVendorData', 'Vendor data' FROM atranslation t where t.baselanguage = 'de'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseProcessedDate', 'Processed' FROM atranslation t where t.baselanguage = 'de'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'PurchaseProcessed', 'Processed' FROM atranslation t where t.baselanguage = 'de'");
|
||||
|
||||
#endregion purchase
|
||||
|
||||
|
||||
4
todo.txt
4
todo.txt
@@ -1,8 +1,6 @@
|
||||
TODO:
|
||||
|
||||
- JOB: notify user active license saved
|
||||
this should go out immediately on save once when state is changed from inactive to active
|
||||
can manually re-send by toggling active
|
||||
|
||||
- JOB: Process purchases that are from vendor notification
|
||||
- create customer if necessary from purchase notification or add to existing
|
||||
- if v7 needs to account for there being a delay sometimes in order completeness
|
||||
|
||||
Reference in New Issue
Block a user