|
@@ -36,6 +36,14 @@ public class SupplierBillLineGrid : DynamicOneToManyGrid<Bill, BillLine>
|
|
HiddenColumns.Add(x => x.IncTax);
|
|
HiddenColumns.Add(x => x.IncTax);
|
|
HiddenColumns.Add(x => x.Description);
|
|
HiddenColumns.Add(x => x.Description);
|
|
|
|
|
|
|
|
+ HiddenColumns.Add(x=>x.Product.ID);
|
|
|
|
+ HiddenColumns.Add(x=>x.Product.Code);
|
|
|
|
+ HiddenColumns.Add(x=>x.Product.Name);
|
|
|
|
+ HiddenColumns.Add(x=>x.Product.TaxCode.ID);
|
|
|
|
+ HiddenColumns.Add(x=>x.Product.PurchaseGL.ID);
|
|
|
|
+ HiddenColumns.Add(x=>x.Product.SellGL.ID);
|
|
|
|
+ HiddenColumns.Add(x=>x.Product.CostCentre.ID);
|
|
|
|
+
|
|
HiddenColumns.Add(x=>x.Consignment.ID);
|
|
HiddenColumns.Add(x=>x.Consignment.ID);
|
|
HiddenColumns.Add(x=>x.Consignment.Number);
|
|
HiddenColumns.Add(x=>x.Consignment.Number);
|
|
|
|
|
|
@@ -54,8 +62,8 @@ public class SupplierBillLineGrid : DynamicOneToManyGrid<Bill, BillLine>
|
|
new DynamicTextColumn(DisplayLinkText,DisplayLinkClick)
|
|
new DynamicTextColumn(DisplayLinkText,DisplayLinkClick)
|
|
{
|
|
{
|
|
Position = DynamicActionColumnPosition.Start,
|
|
Position = DynamicActionColumnPosition.Start,
|
|
- Width = 50,
|
|
|
|
- HeaderText = "Link",
|
|
|
|
|
|
+ Width = 30,
|
|
|
|
+ HeaderText = "?",
|
|
ToolTip = DisplayLinkToolTip,
|
|
ToolTip = DisplayLinkToolTip,
|
|
Alignment = Alignment.MiddleCenter
|
|
Alignment = Alignment.MiddleCenter
|
|
}
|
|
}
|
|
@@ -68,13 +76,16 @@ public class SupplierBillLineGrid : DynamicOneToManyGrid<Bill, BillLine>
|
|
{
|
|
{
|
|
if (row == null)
|
|
if (row == null)
|
|
return "";
|
|
return "";
|
|
|
|
+ var prodid = row.Get<BillLine, Guid>(x => x.Product.ID);
|
|
var poid = row.Get<BillLine, Guid>(x => x.OrderItem.PurchaseOrderLink.ID);
|
|
var poid = row.Get<BillLine, Guid>(x => x.OrderItem.PurchaseOrderLink.ID);
|
|
var conid = row.Get<BillLine, Guid>(x => x.Consignment.ID);
|
|
var conid = row.Get<BillLine, Guid>(x => x.Consignment.ID);
|
|
return !Guid.Equals(poid,Guid.Empty)
|
|
return !Guid.Equals(poid,Guid.Empty)
|
|
- ? "PO"
|
|
|
|
|
|
+ ? "O"
|
|
: !Guid.Equals(conid,Guid.Empty)
|
|
: !Guid.Equals(conid,Guid.Empty)
|
|
? "C"
|
|
? "C"
|
|
- : "--";
|
|
|
|
|
|
+ : !Guid.Equals(prodid,Guid.Empty)
|
|
|
|
+ ? "P"
|
|
|
|
+ : "--";
|
|
}
|
|
}
|
|
|
|
|
|
private bool DisplayLinkClick(CoreRow? row)
|
|
private bool DisplayLinkClick(CoreRow? row)
|
|
@@ -85,17 +96,21 @@ public class SupplierBillLineGrid : DynamicOneToManyGrid<Bill, BillLine>
|
|
private FrameworkElement? DisplayLinkToolTip(DynamicActionColumn column, CoreRow? row)
|
|
private FrameworkElement? DisplayLinkToolTip(DynamicActionColumn column, CoreRow? row)
|
|
{
|
|
{
|
|
var text = !Guid.Equals(Guid.Empty, row?.Get<BillLine, Guid>(x => x.OrderItem.PurchaseOrderLink.ID) ?? Guid.Empty)
|
|
var text = !Guid.Equals(Guid.Empty, row?.Get<BillLine, Guid>(x => x.OrderItem.PurchaseOrderLink.ID) ?? Guid.Empty)
|
|
- ? String.Format("PO {0}: {1:F2} x {2}",
|
|
|
|
|
|
+ ? String.Format("Purchase Order: {0}: {1:F2} x {2}",
|
|
row?.Get<BillLine, String>(x => x.OrderItem.PurchaseOrderLink.PONumber),
|
|
row?.Get<BillLine, String>(x => x.OrderItem.PurchaseOrderLink.PONumber),
|
|
row?.Get<BillLine, double>(x => x.OrderItem.Qty),
|
|
row?.Get<BillLine, double>(x => x.OrderItem.Qty),
|
|
row?.Get<BillLine, String>(x => x.OrderItem.Description)
|
|
row?.Get<BillLine, String>(x => x.OrderItem.Description)
|
|
)
|
|
)
|
|
: !Guid.Equals(Guid.Empty, row?.Get<BillLine, Guid>(x => x.Consignment.ID) ?? Guid.Empty)
|
|
: !Guid.Equals(Guid.Empty, row?.Get<BillLine, Guid>(x => x.Consignment.ID) ?? Guid.Empty)
|
|
- ? String.Format("Cons. {0}: {1}",
|
|
|
|
|
|
+ ? String.Format("Consignment: {0}: {1}",
|
|
row?.Get<BillLine, String>(x => x.Consignment.Number),
|
|
row?.Get<BillLine, String>(x => x.Consignment.Number),
|
|
row?.Get<BillLine, String>(x => x.Consignment.Description)
|
|
row?.Get<BillLine, String>(x => x.Consignment.Description)
|
|
)
|
|
)
|
|
- : "";
|
|
|
|
|
|
+ : !Guid.Equals(Guid.Empty, row?.Get<BillLine, Guid>(x => x.Product.ID) ?? Guid.Empty)
|
|
|
|
+ ? String.Format("Product: {0}: {1}",
|
|
|
|
+ row?.Get<BillLine, String>(x => x.Product.Code),
|
|
|
|
+ row?.Get<BillLine, String>(x => x.Product.Name))
|
|
|
|
+ : "";
|
|
|
|
|
|
return String.IsNullOrWhiteSpace(text)
|
|
return String.IsNullOrWhiteSpace(text)
|
|
? column.TextToolTip(text)
|
|
? column.TextToolTip(text)
|