|
|
@@ -28,13 +28,29 @@ namespace Comal.Classes
|
|
|
[TextBoxEditor(Visible = Visible.Hidden)]
|
|
|
[EditorSequence(4)]
|
|
|
public string ClientName { get; set; }
|
|
|
-
|
|
|
+
|
|
|
[TextBoxEditor]
|
|
|
[EditorSequence(5)]
|
|
|
public string Title { get; set; }
|
|
|
+
|
|
|
+ [MemoEditor(Visible = Visible.Hidden)]
|
|
|
+ [EditorSequence(6)]
|
|
|
+ public string Street { get; set; }
|
|
|
+
|
|
|
+ [TextBoxEditor]
|
|
|
+ [EditorSequence(7)]
|
|
|
+ public string City { get; set; }
|
|
|
+
|
|
|
+ [TextBoxEditor]
|
|
|
+ [EditorSequence(8)]
|
|
|
+ public string State { get; set; }
|
|
|
+
|
|
|
+ [TextBoxEditor]
|
|
|
+ [EditorSequence(9)]
|
|
|
+ public string PostCode { get; set; }
|
|
|
|
|
|
[CurrencyEditor]
|
|
|
- [EditorSequence(6)]
|
|
|
+ [EditorSequence(10)]
|
|
|
public double SellPrice {get; set; }
|
|
|
|
|
|
public override void ValidateQuery(string sql, List<string> errors)
|
|
|
@@ -46,6 +62,10 @@ namespace Comal.Classes
|
|
|
ValidateField(sql, nameof(ClientID), errors);
|
|
|
ValidateField(sql, nameof(ClientName), errors);
|
|
|
ValidateField(sql, nameof(Title), errors);
|
|
|
+ ValidateField(sql, nameof(Street), errors);
|
|
|
+ ValidateField(sql, nameof(City), errors);
|
|
|
+ ValidateField(sql, nameof(State), errors);
|
|
|
+ ValidateField(sql, nameof(PostCode), errors);
|
|
|
ValidateField(sql, nameof(SellPrice), errors);
|
|
|
}
|
|
|
|
|
|
@@ -57,15 +77,19 @@ namespace Comal.Classes
|
|
|
+ $" q.quote_num_suff as {nameof(Variation)}, \n"
|
|
|
+ $" c.cust_code as {nameof(ClientID)}, \n"
|
|
|
+ $" c.cust_name as {nameof(ClientName)}, \n"
|
|
|
+ + $" concat_ws(a.addr_1,chr(13),a.addr_2) as {nameof(Street)}, \n"
|
|
|
+ + $" a.addr_3 as {nameof(City)}, \n"
|
|
|
+ + $" a.addr_4 as {nameof(State)}, \n"
|
|
|
+ + $" a.addr_5 as {nameof(PostCode)}, \n"
|
|
|
+ $" q.quote_title as {nameof(Title)}, \n"
|
|
|
+ $" q.nett_sell_price + q.nett_sell_prc_lab as {nameof(SellPrice)} \n"
|
|
|
+ "from quote q \n"
|
|
|
+ " left outer join customer c on q.cust_id = c.cust_id \n"
|
|
|
+ + " left outer join addr a on quote.cust_addr_id = a.addr_id \n"
|
|
|
+ "where \n"
|
|
|
+ " q.quote_vers = (select max(quote_vers) from quote where quote_id = q.quote_id) \n"
|
|
|
+ "order by \n"
|
|
|
+ " q.quote_num, \n"
|
|
|
+ " q.quote_num_suff";
|
|
|
-
|
|
|
}
|
|
|
}
|