File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
core/src/main/java/io/snabble/sdk Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,10 @@ private static class ApiProduct {
1818 String name ;
1919 String description ;
2020 String subtitle ;
21- String taxCategory ;
22- boolean outOfStock ;
23- boolean deleted ;
2421 boolean weighByCustomer ;
2522 String referenceUnit ;
2623 String encodingUnit ;
2724 String imageUrl ;
28- String [] eans ;
2925 ApiPrice price ;
3026 boolean saleStop ;
3127 ApiScannableCode [] codes ;
@@ -235,10 +231,14 @@ private Product toProduct(ApiProduct apiProduct) {
235231 if (apiProduct .weighByCustomer ) {
236232 builder .setType (Product .Type .UserWeighed );
237233 } else {
238- if (referenceUnit == null || referenceUnit == Unit .PIECE ) {
239- builder .setType (Product .Type .Article );
234+ if (apiProduct .productType == ApiProductType .WEIGHABLE ) {
235+ if (referenceUnit == null || referenceUnit == Unit .PIECE ) {
236+ builder .setType (Product .Type .Article );
237+ } else {
238+ builder .setType (Product .Type .PreWeighed );
239+ }
240240 } else {
241- builder .setType (Product .Type .PreWeighed );
241+ builder .setType (Product .Type .Article );
242242 }
243243 }
244244
You can’t perform that action at this time.
0 commit comments