Activado impresion labelCount

This commit is contained in:
Sergio De la torre 2023-02-16 16:50:24 +01:00
parent d386374c90
commit 8abea66221
5 changed files with 41 additions and 38 deletions

View File

@ -84,21 +84,11 @@
</component>
<component name="ChangeListManager">
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Version 23.4Beta Buscar item, isScanned preparado">
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/release/output-metadata.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/release/output-metadata.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/itemScanned.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/itemScanned.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/component/CustomDialogList.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/component/CustomDialogList.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/PreSacadorViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/PreSacadorViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -195,7 +185,7 @@
</option>
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="testBeta_5109_qr" />
<entry key="$PROJECT_DIR$" value="testBeta_5109_qr_Agrupar_sales" />
</map>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />

View File

@ -13,11 +13,9 @@ android {
applicationId "es.verdnatura"
minSdkVersion 24 //21
targetSdkVersion 33
versionCode 160
//versionName = "9.8Beta" version 148
//versionName = "23.2Beta" 154
//versionName = "23.2" 157
versionName = "23.3Beta"
versionCode 161
//versionName = "23.3Beta" versionCode 160
versionName = "23.4Beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -461,6 +461,8 @@ class CollectionFragment(
it.errorMessage,
it.isError, true
)
}else{
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
}
}
@ -1273,11 +1275,11 @@ class CollectionFragment(
if (type.equals(CONTROLADOR)) {
//Tarea #4280 cambiar a ticket_isOutClosureZone
/* viewModel.ticket_checkFullyControlled(
getData(USER),
getData(PASSWORD),
txtscan
getData(USER),
getData(PASSWORD),
txtscan
)*/
)*/
}
}
@ -1625,7 +1627,8 @@ class CollectionFragment(
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
/*Tarea 4729*/
isScanned = event != null && event.action == ACTION_DOWN && event.keyCode == KeyEvent.KEYCODE_ENTER
isScanned =
event != null && event.action == ACTION_DOWN && event.keyCode == KeyEvent.KEYCODE_ENTER
customDialogList.setValueTwo(
itemScanValue(
@ -2502,11 +2505,11 @@ class CollectionFragment(
private fun showDialogLabelCount() {
//tarea#4672
var isTicket = false
/* for (t in collection.tickets) {
if (t.ticketFk.toInt()==(collection.collectionFk)) {
isTicket = true
}
}*/
for (t in collection.tickets) {
if (t.ticketFk.toInt() == (collection.collectionFk)) {
isTicket = true
}
}
if (isTicket) {
val builder = AlertDialog.Builder(context)
builder.setTitle(getString(R.string.selectLabeltoPrint))
@ -2516,6 +2519,7 @@ class CollectionFragment(
collectionFk = collection.collectionFk,
labelCount = (which + 1)
)
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
}
val dialog = builder.create()
@ -2525,8 +2529,9 @@ class CollectionFragment(
collectionFk = collection.collectionFk,
null
)
}
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
}

View File

@ -385,7 +385,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
)
}
override fun onSuccess(response: Response<Any>) {
override fun onSuccess(response: Response<Any>) {
_responsePrint.value =
ResponseItemVO(isError = false, response = response.message())
@ -865,13 +865,9 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
fun ticket_isOutClosureZone(
usuario: String,
password: String,
ticketFk: String
ticketFk: Int
) {
silex.ticket_isOutClosureZone(
usuario,
password,
ticketFk
).enqueue(object :
SilexCallback<Any>(context) {

View File

@ -138,11 +138,11 @@ class CollectionShowTicketFragment(
//tarea#4672
var isTicket = false
/* for (t in collection.tickets) {
for (t in collection.tickets) {
if (t.ticketFk.toInt()==(collection.collectionFk)) {
isTicket = true
}
}*/
}
if (isTicket){
val builder = AlertDialog.Builder(context)
builder.setTitle(getString(R.string.selectLabeltoPrint))
@ -165,7 +165,6 @@ class CollectionShowTicketFragment(
}
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
}
private fun setEvents() {
@ -241,6 +240,21 @@ class CollectionShowTicketFragment(
}
})
responsePrint.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) {
ma.messageWithSound(
it.errorMessage,
it.isError, true
)
}else{
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
}
})
}
}