|
@@ -292,6 +292,22 @@ public class TsbShoplinkerStockJob extends TsbAbstractJob<Collection<ShoplinkerG
|
|
|
{
|
|
{
|
|
|
resultQty = (int)Math.floor(qty * 0.4);
|
|
resultQty = (int)Math.floor(qty * 0.4);
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ if (qty >= 0 && qty <= 2)
|
|
|
|
|
+ {
|
|
|
|
|
+ resultQty = isFirst ? 1 : 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (qty >= 3 && qty <= 29)
|
|
|
|
|
+ {
|
|
|
|
|
+ resultQty = (int)Math.ceil(qty * 0.25);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (qty >= 30)
|
|
|
|
|
+ {
|
|
|
|
|
+ resultQty = (int)Math.floor(qty * 0.4);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return resultQty;
|
|
return resultQty;
|