This commit is contained in:
2022-12-25 00:44:05 +00:00
parent e59e2c142e
commit 67ee432a2f
8 changed files with 753 additions and 22 deletions

View File

@@ -372,6 +372,25 @@ namespace Sockeye.Biz
}
#endregion
#region Purchase
{
List<FormField> l = new List<FormField>();
l.Add(new FormField { TKey = "PurchaseExpireDate", FieldKey = "PurchaseExpireDate" });
l.Add(new FormField { TKey = "PurchaseCancelDate", FieldKey = "PurchaseCancelDate" });
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 = "Tags", FieldKey = "Tags" });
l.Add(new FormField { TKey = "Wiki", FieldKey = "Wiki" });
l.Add(new FormField { TKey = "Attachments", FieldKey = "Attachments", Requireable = false });
_formFields.Add(SockType.Purchase.ToString(), l);
}
#endregion
//******************************************************
}

View File

@@ -898,7 +898,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
await ExecQueryAsync("CREATE TABLE apurchase (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, customerid BIGINT NOT NULL REFERENCES acustomer(id) ON DELETE CASCADE, "
+ "vendorid BIGINT NOT NULL REFERENCES avendor(id), productid BIGINT NOT NULL REFERENCES aproduct(id), salesordernumber TEXT, "
+ "vendorid BIGINT NOT NULL REFERENCES avendor(id), productid BIGINT NOT NULL REFERENCES aproduct(id), 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, "