diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
deleted file mode 100644
index 898c4821..00000000
--- a/.idea/deploymentTargetDropDown.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index e9e0a471..6041670f 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -83,25 +83,15 @@
-
-
+
+
-
-
-
-
+
-
-
-
-
-
-
-
-
+
@@ -112,7 +102,7 @@
-
+
@@ -278,7 +268,7 @@
-
+
diff --git a/app/build.gradle b/app/build.gradle
index 43f03c97..c7403ac2 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -13,8 +13,9 @@ android {
applicationId "es.verdnatura"
minSdkVersion 24 //21
targetSdkVersion 30
- versionCode 151
+ versionCode 152
//versionName = "9.8Beta" version 148
+ //versionName = "23.2Beta" 150
versionName = "23.2Beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json
index 572dbbbb..6d750865 100644
--- a/app/release/output-metadata.json
+++ b/app/release/output-metadata.json
@@ -11,7 +11,7 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
- "versionCode": 151,
+ "versionCode": 152,
"versionName": "23.2Beta",
"outputFile": "app-release.apk"
}
diff --git a/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt b/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt
index 5f41f94b..f73b039e 100644
--- a/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt
+++ b/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt
@@ -246,7 +246,7 @@ interface VerdnaturaService {
fun collection_getUncheckedTicket(
@Body vararg params: Any
):
- Call
+ Call
//sergio: de momento se separa para ir viendo como funciona. El precontrol llamara a collectionTicketGet con otro parametro.
@POST("almacennew/collection_getTickets")//REVISADA
@@ -292,7 +292,7 @@ interface VerdnaturaService {
):
Call
- @POST("almacennew/collectionStickerPrint")//REVISADA
+ @POST("almacennew/collection_printSticker")//REVISADA
fun collectionStickerPrint(
@Body vararg params: Any?
):
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt
index db39e269..a99eaa69 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt
@@ -2471,9 +2471,8 @@ class CollectionFragment(
//tarea#4672
var isTicket = false
/* for (t in collection.tickets) {
- if (!t.ticketFk.equals(collection.collectionFk)) {
- isTicket = false
- break
+ if (t.ticketFk.toInt()==(collection.collectionFk)) {
+ isTicket = true
}
}*/
if (isTicket) {
@@ -2481,12 +2480,11 @@ class CollectionFragment(
builder.setTitle(getString(R.string.selectLabeltoPrint))
val labelCount = arrayOf("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")
builder.setItems(labelCount) { dialog, which ->
- d("VERDNATURA::", "EL ELEGIDO ES" + which)
viewModel.collectionStickerPrint(
collectionFk = collection.collectionFk,
labelCount = (which + 1)
)
- (getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
+
}
val dialog = builder.create()
dialog.show()
@@ -2494,11 +2492,9 @@ class CollectionFragment(
viewModel.collectionStickerPrint(
collectionFk = collection.collectionFk,
null
-
)
- (getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
}
-
+ (getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
}
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt
index 071b2927..10f9c4c6 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt
@@ -923,7 +923,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
silex.collection_getUncheckedTicket(
collectionFk
).enqueue(object :
- SilexCallback(context) {
+ SilexCallback(context) {
override fun onError(t: Throwable) {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = true,
@@ -931,12 +931,12 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
)
}
- override fun onSuccess(response: Response) {
+ override fun onSuccess(response: Response) {
if (response.body() != null) {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = false,
- response = response.body()!!.toString(),
+ response = response.body()!!,
errorMessage = ""
)
} else {
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt
index 9e53f907..4ff5c0de 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt
@@ -139,9 +139,8 @@ class CollectionShowTicketFragment(
//tarea#4672
var isTicket = false
/* for (t in collection.tickets) {
- if (!t.ticketFk.equals(collection.collectionFk)) {
- isTicket = false
- break
+ if (t.ticketFk.toInt()==(collection.collectionFk)) {
+ isTicket = true
}
}*/
if (isTicket){
@@ -153,34 +152,20 @@ class CollectionShowTicketFragment(
collectionFk = collection.collectionFk,
labelCount = (which+1)
)
- (getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
}
val dialog = builder.create()
dialog.show()
}else{
- /* viewModel.collectionStickerPrint(
+ viewModel.collectionStickerPrint(
collectionFk = collection.collectionFk,
labelCount = null
)
- (getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())*/
}
- if (ma.havePrinter() && ma.haveSector()) {
- viewModel.collectionStickerPrint(
- collectionFk = collection.collectionFk,
- labelCount = getDataInt(SECTORFK)
-
- )
-
- (getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
- }else{
-
- ma.messageWithSound(getString(R.string.printerFault),isError = true,true,getString(R.string.error),false)
-
- }
+ (getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
}
private fun setEvents() {