Billing: raise max sent weight (الوزن المرسل) from 50000 to 60000
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
91d6416198
commit
514a76d7c7
|
|
@ -34,7 +34,7 @@ public static class OrdersErrors
|
||||||
new("BILLING_DNW_MISSING", "الوزن المستلم مطلوب");
|
new("BILLING_DNW_MISSING", "الوزن المستلم مطلوب");
|
||||||
|
|
||||||
public static BusinessException SentWeightRange() =>
|
public static BusinessException SentWeightRange() =>
|
||||||
new("BILLING_LNW_RANGE", "يجب أن يكون الوزن بين 0 - 50000");
|
new("BILLING_LNW_RANGE", "يجب أن يكون الوزن بين 0 - 60000");
|
||||||
|
|
||||||
public static BusinessException PriceNotDefined() =>
|
public static BusinessException PriceNotDefined() =>
|
||||||
new("BILLING_PRICE_NOT_DEFINED", "لا تسطيع الإضافة - السعر لهذه الوجهة غير معرف");
|
new("BILLING_PRICE_NOT_DEFINED", "لا تسطيع الإضافة - السعر لهذه الوجهة غير معرف");
|
||||||
|
|
@ -176,8 +176,8 @@ public static class BillingCalculator
|
||||||
/// <summary>Page JS checkDate: discharge date must not be before load date.</summary>
|
/// <summary>Page JS checkDate: discharge date must not be before load date.</summary>
|
||||||
public static bool IsDischargeAfterLoad(DateTime load, DateTime discharge) => discharge.Date >= load.Date;
|
public static bool IsDischargeAfterLoad(DateTime load, DateTime discharge) => discharge.Date >= load.Date;
|
||||||
|
|
||||||
/// <summary>Page JS checkNumber: sent weight between 0 and 50000.</summary>
|
/// <summary>Page JS checkNumber: sent weight between 0 and 60000 (legacy limit was 50000).</summary>
|
||||||
public static bool IsSentWeightInRange(decimal lnw) => lnw >= 0 && lnw <= 50000;
|
public static bool IsSentWeightInRange(decimal lnw) => lnw >= 0 && lnw <= 60000;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GrainsWeightRules
|
public static class GrainsWeightRules
|
||||||
|
|
|
||||||
|
|
@ -114,8 +114,8 @@ public class BillingCalculatorTests
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(0, true)]
|
[InlineData(0, true)]
|
||||||
[InlineData(50000, true)]
|
[InlineData(60000, true)]
|
||||||
[InlineData(50001, false)]
|
[InlineData(60001, false)]
|
||||||
[InlineData(-1, false)]
|
[InlineData(-1, false)]
|
||||||
public void Sent_weight_range(int w, bool ok) => Assert.Equal(ok, BillingCalculator.IsSentWeightInRange(w));
|
public void Sent_weight_range(int w, bool ok) => Assert.Equal(ok, BillingCalculator.IsSentWeightInRange(w));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ export const billingForm: FormMeta = {
|
||||||
{ name: 'destination', type: 'select', label: { en: 'To', ar: 'الى' }, required: true, options: billingDestinationOptions },
|
{ name: 'destination', type: 'select', label: { en: 'To', ar: 'الى' }, required: true, options: billingDestinationOptions },
|
||||||
{ name: 'cargoType', type: 'select', label: { en: 'Cargo type', ar: 'نوع المادة' }, required: true, options: cargoTypeOptions },
|
{ name: 'cargoType', type: 'select', label: { en: 'Cargo type', ar: 'نوع المادة' }, required: true, options: cargoTypeOptions },
|
||||||
{ name: 'tn', type: 'text', label: { en: 'Truck number', ar: 'رقم السيارة' }, required: true, inputKind: 'plate', maxLength: 20 },
|
{ name: 'tn', type: 'text', label: { en: 'Truck number', ar: 'رقم السيارة' }, required: true, inputKind: 'plate', maxLength: 20 },
|
||||||
{ name: 'lnw', type: 'number', label: { en: 'Sent weight', ar: 'الوزن المرسل' }, required: true, min: 0, max: 50000 },
|
{ name: 'lnw', type: 'number', label: { en: 'Sent weight', ar: 'الوزن المرسل' }, required: true, min: 0, max: 60000 },
|
||||||
{ name: 'dnw', type: 'number', label: { en: 'Received weight', ar: 'الوزن المستلم' }, required: true, min: 0 },
|
{ name: 'dnw', type: 'number', label: { en: 'Received weight', ar: 'الوزن المستلم' }, required: true, min: 0 },
|
||||||
{ name: 'demurrageFine', type: 'number', label: { en: 'Delay fine', ar: 'غرامة التاخير' }, min: 0 },
|
{ name: 'demurrageFine', type: 'number', label: { en: 'Delay fine', ar: 'غرامة التاخير' }, min: 0 },
|
||||||
{ name: 'otherFine', type: 'number', label: { en: 'Other fines', ar: 'غرامات أخرى' }, min: 0 },
|
{ name: 'otherFine', type: 'number', label: { en: 'Other fines', ar: 'غرامات أخرى' }, min: 0 },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue