feat issues refs #7636

This commit is contained in:
Sergio De la torre 2024-08-12 12:32:09 +02:00
parent e2f4a0f43a
commit 3512e61875
1 changed files with 28 additions and 10 deletions

View File

@ -62,7 +62,9 @@ class ControladorFragment :
try { try {
binding.scanInput.setText( binding.scanInput.setText(
itemScanValue( itemScanValue(
binding.scanInput.text.toString(), arrayOf("ticket","saleGroup"), "id" binding.scanInput.text.toString(),
arrayOf("ticket", "saleGroup"),
"id"
).toString().toInt().toString(), ).toString().toInt().toString(),
) )
} catch (ex: Exception) { } catch (ex: Exception) {
@ -77,7 +79,9 @@ class ControladorFragment :
try { try {
collectionViewModel!!.ticketState( collectionViewModel!!.ticketState(
itemScanValue( itemScanValue(
binding.scanInput.text.toString(), arrayOf("ticket","saleGroup"), "id" binding.scanInput.text.toString(),
arrayOf("ticket", "saleGroup"),
"id"
).toString().toInt() ).toString().toInt()
) )
} catch (ex: Exception) { } catch (ex: Exception) {
@ -105,14 +109,26 @@ class ControladorFragment :
.setOkButton(getString(R.string.aware)) { .setOkButton(getString(R.string.aware)) {
customDialogWarning.dismiss() customDialogWarning.dismiss()
try {
viewModel.getSales( viewModel.getSales(
collectionFk = itemScanValue( collectionFk = itemScanValue(
binding.scanInput.text.toString(), arrayOf("ticket","saleGroup"), "id" binding.scanInput.text.toString(),
arrayOf("ticket", "saleGroup"),
"id"
).toString().toInt(), ).toString().toInt(),
print = false, print = false,
source = ConstAndValues.ON_CHECKING source = ConstAndValues.ON_CHECKING
) )
} catch (ex: Exception) {
ma.messageWithSound(
message = getString(R.string.errorScanItem),
isError = true,
isToasted = true,
isPlayed = true
)
}
/* viewModel.getSales( /* viewModel.getSales(
collectionFk = binding.scanInput.text.toString() collectionFk = binding.scanInput.text.toString()
.toInt(), .toInt(),
@ -128,7 +144,9 @@ class ControladorFragment :
} else { } else {
viewModel.getSales( viewModel.getSales(
collectionFk = itemScanValue( collectionFk = itemScanValue(
binding.scanInput.text.toString(), arrayOf("ticket","saleGRoup"), "id" binding.scanInput.text.toString(),
arrayOf("ticket", "saleGRoup"),
"id"
).toString().toInt(), ).toString().toInt(),
print = false, print = false,
source = ConstAndValues.ON_CHECKING source = ConstAndValues.ON_CHECKING