refs #5890
This commit is contained in:
parent
4a6d0a2d73
commit
ff3a9c72e8
|
@ -55,7 +55,6 @@ class SacadorFragmentNew(
|
|||
setToolBar()
|
||||
setEvents()
|
||||
callBack(type)
|
||||
println("El sacador new y type $type")
|
||||
super.init()
|
||||
}
|
||||
|
||||
|
@ -149,32 +148,19 @@ class SacadorFragmentNew(
|
|||
customDialogInput.setDescription(getString(R.string.printPreviousGroup))
|
||||
.setValue("")
|
||||
.setOkButton(getString(R.string.print)) {
|
||||
try {
|
||||
if (customDialogInput.getValue().isNotEmpty()
|
||||
) {
|
||||
|
||||
print()
|
||||
}
|
||||
} catch (ex: Exception) {
|
||||
getString(R.string.errorInput)
|
||||
}
|
||||
customDialogInput.setValue("")
|
||||
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
customDialogInput.dismiss()
|
||||
}.show()
|
||||
customDialogInput.setFocusText()
|
||||
|
||||
|
||||
customDialogInput.setFocusText()
|
||||
ma.hideKeyboard(customDialogInput.getEditText())
|
||||
|
||||
customDialogInput.getEditText().setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
|
||||
|
||||
if (customDialogInput.getValue().isNotEmpty()
|
||||
) {
|
||||
print()
|
||||
}
|
||||
|
||||
return@setOnEditorActionListener true
|
||||
}
|
||||
|
@ -185,6 +171,10 @@ class SacadorFragmentNew(
|
|||
}
|
||||
|
||||
private fun print() {
|
||||
|
||||
try {
|
||||
if (customDialogInput.getValue().isNotEmpty()
|
||||
) {
|
||||
if (ma.havePrinter()) {
|
||||
viewModel.ticket_printLabelPrevious(customDialogInput.getValue().toInt())
|
||||
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(
|
||||
|
@ -195,6 +185,15 @@ class SacadorFragmentNew(
|
|||
}
|
||||
}
|
||||
|
||||
} catch (ex: Exception) {
|
||||
getString(R.string.errorInput)
|
||||
}
|
||||
customDialogInput.setValue("")
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun setEvents() {
|
||||
binding.sacadorSwipe.setOnRefreshListener {
|
||||
callBack(type)
|
||||
|
|
|
@ -370,8 +370,7 @@
|
|||
android:layout_marginStart="5dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toStartOf="@+id/linearLayoutColor"
|
||||
|
||||
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/packingTopicker"
|
||||
|
@ -381,7 +380,8 @@
|
|||
android:textSize="26sp"
|
||||
android:gravity="end"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textColor="@color/verdnatura_white">
|
||||
android:textColor="@color/verdnatura_white"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
</TextView>
|
||||
|
||||
|
@ -413,12 +413,12 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="100"
|
||||
android:layout_weight="0.5"
|
||||
android:layout_weight="0.30"
|
||||
android:textSize="22sp"
|
||||
android:gravity="right"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_marginEnd="5dp"
|
||||
tool:text="20/30">
|
||||
tool:text="2000/3000">
|
||||
|
||||
</TextView>
|
||||
|
||||
|
@ -433,11 +433,12 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/item_ticketColor"
|
||||
android:id="@+id/item_ticketColors"
|
||||
android:layout_width="@dimen/semaforo_width"
|
||||
android:layout_height="@dimen/ticketColor_height"
|
||||
android:layout_marginBottom="1dp"
|
||||
|
|
|
@ -218,7 +218,7 @@
|
|||
tool:text="25 x 1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/item_ticket_color"
|
||||
android:id="@+id/item_ticket_colors"
|
||||
android:layout_width="@dimen/semaforo_width"
|
||||
android:layout_height="@dimen/ticketColor_height"
|
||||
android:layout_marginBottom="1dp"
|
||||
|
|
Loading…
Reference in New Issue