This commit is contained in:
2021-06-28 19:15:50 +00:00
parent 8b3f1f8c22
commit 1f03d8c232
3 changed files with 20 additions and 11 deletions

View File

@@ -23,7 +23,7 @@ namespace AyaNova.DataList
+ "left join aworkorderitemlabor on aworkorderitem.id=aworkorderitemlabor.workorderitemid "
+ "left join auser on (aworkorderitemlabor.userid=auser.id) "
+ "left join aservicerate on (aworkorderitemlabor.servicerateid=aservicerate.id) "
+ "left join ataxcode on (aworkorderitemlabor.taxcodesaleid=ataxcode.id) "
;
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
@@ -124,6 +124,17 @@ namespace AyaNova.DataList
SqlValueColumnName = "aworkorderitemlabor.nochargequantity"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "WorkOrderItemLaborTaxRateSaleID",
FieldKey = "WorkOrderItemLaborTaxRateSaleID",
UiFieldDataType = (int)UiFieldDataType.Text,
AType = (int)AyaType.TaxCode,
SqlIdColumnName = "aworkorderitemlabor.taxcodesaleid",
SqlValueColumnName = "ataxcode.name"
});
//META column
FieldDefinitions.Add(new DataListFieldDefinition
@@ -490,7 +501,7 @@ namespace AyaNova.DataList
UiFieldDataType = (int)UiFieldDataType.DateTime,
SqlValueColumnName = "aworkorder.closebydate"
});
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom1", FieldKey = "workordercustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields", TKeySection = "WorkOrder" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom2", FieldKey = "workordercustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields", TKeySection = "WorkOrder" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom3", FieldKey = "workordercustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields", TKeySection = "WorkOrder" });

View File

@@ -114,8 +114,6 @@ namespace AyaNova.DataList
SqlValueColumnName = "aworkorderitempart.serials"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "WorkOrderItemPartTaxPartSaleID",

View File

@@ -529,7 +529,7 @@ namespace AyaNova.Util
}
long TCSales = 0, TCGoods = 0, TCBoth = 0;
long TCServices = 0, TCGoods = 0, TCBoth = 0;
public Decimal TimeZoneOffset = 0;
@@ -1354,8 +1354,8 @@ namespace AyaNova.Util
{
{
TaxCode tc = new TaxCode();
tc.Name = "Sales only";
tc.Notes = "Example sales only tax";
tc.Name = "Services only";
tc.Notes = "Example service only tax";
tc.Active = true;
tc.Tags = RandomTags();
tc.TaxAPct = 5m;
@@ -1372,7 +1372,7 @@ namespace AyaNova.Util
log.LogError(err);
throw new System.Exception(err);
}
TCSales = NewObject.Id;
TCServices = NewObject.Id;
}
}
{
@@ -1401,9 +1401,9 @@ namespace AyaNova.Util
}
{
TaxCode tc = new TaxCode();
tc.Name = "Sales & Goods";
tc.Name = "Services & Goods";
tc.Active = true;
tc.Notes = "Example sales and goods tax";
tc.Notes = "Example services and goods tax";
tc.Tags = RandomTags();
tc.TaxAPct = 5m;
tc.TaxBPct = 7m;
@@ -1436,7 +1436,7 @@ namespace AyaNova.Util
var gbiz = await biz.GetAsync(false);
gbiz.TaxPartPurchaseId = TCGoods;
gbiz.TaxPartSaleId = TCGoods;
gbiz.TaxRateSaleId = TCSales;
gbiz.TaxRateSaleId = TCServices;
await biz.PutAsync(gbiz);
}
}