diff --git a/app/src/main/java/es/verdnatura/domain/SalixService.kt b/app/src/main/java/es/verdnatura/domain/SalixService.kt index c8538606..d1daca44 100644 --- a/app/src/main/java/es/verdnatura/domain/SalixService.kt +++ b/app/src/main/java/es/verdnatura/domain/SalixService.kt @@ -73,6 +73,14 @@ interface SalixService { ): Call + @POST("Entries/{id}/addFromBuy") + fun addFromBuy( + @Path("id") id: Number, + @Query("item") item: Number, + @Query("printedStickers") printedStickers: Number + ): + Call + @POST("tickets/{idTicket}/transferSales") //-->saleMove en Silex fun transferSalesSalix( diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingViewModel/SupplierViewModel.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingViewModel/SupplierViewModel.kt index a8c17202..9d885516 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingViewModel/SupplierViewModel.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingViewModel/SupplierViewModel.kt @@ -140,4 +140,9 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) { salix.uploadEntryPhoto(id, warehouseId, companyId, dmsTypeId, reference, description, hasFile, file) .enqueue(object : SilexCallback(context){}) } + + fun entry_addFromBuy(id: Number, item: Number, printedStickers: Number) { + salix.addFromBuy(id, item, printedStickers) + .enqueue(object : SilexCallback(context){}) + } } diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/SupplierFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/SupplierFragment.kt index 95a1fd0c..66f6e9d4 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/SupplierFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/SupplierFragment.kt @@ -66,7 +66,7 @@ class SupplierFragment( false, file = filePart )*/ - + // viewModel.entry_addFromBuy(8,1,100) super.onCreate(savedInstanceState) }