|
@@ -444,23 +444,6 @@ namespace Comal.Classes
|
|
|
[ComplexFormula(typeof(TotalAllocatedFormula))]
|
|
|
public double TotalAllocated { get; set; }
|
|
|
|
|
|
- private class ShortageFormula : ComplexFormulaGenerator<JobRequisitionItem, bool>
|
|
|
- {
|
|
|
- public override IComplexFormulaNode<JobRequisitionItem, bool> GetFormula() =>
|
|
|
- If<JobRequisitionItem, double, bool>(
|
|
|
- Property<JobRequisitionItem, double>(x => x.TotalQty)
|
|
|
- , Condition.GreaterThan,
|
|
|
- Formula(FormulaOperator.Add,
|
|
|
- Property<JobRequisitionItem, double>(x => x.TotalAllocated),
|
|
|
- Property<JobRequisitionItem, double>(x => x.TotalIssued)))
|
|
|
- .Then(Constant(true))
|
|
|
- .Else(Constant(false));
|
|
|
- //Formula(FormulaOperator.Subtract, Property(x => x.InStock), Property(x => x.Allocated));
|
|
|
- }
|
|
|
- [ComplexFormula(typeof(ShortageFormula))]
|
|
|
- [CheckBoxEditor(Editable = Editable.Hidden)]
|
|
|
- public bool Shortage { get; set; }
|
|
|
-
|
|
|
[EntityRelationship(DeleteAction.SetNull)]
|
|
|
[RequiredColumn]
|
|
|
[Obsolete("Replaced with JobRequisitionItemPurchaseOrderItem")]
|