do not erase barcode on 'no barcode present' checkbox
This commit is contained in:
parent
c6def13eb4
commit
ec7062602d
|
@ -98,9 +98,7 @@ class AddAbstractProductActivity : AppCompatActivity() {
|
|||
fillupUnitsSpinner()
|
||||
|
||||
noBarcodeCheckBox.setOnClickListener {
|
||||
if (noBarcodeCheckBox.isChecked) {
|
||||
barcodeText.setText("")
|
||||
}
|
||||
barcodeText.isEnabled = !noBarcodeCheckBox.isChecked
|
||||
}
|
||||
|
||||
barcodeText.addTextChangedListener {
|
||||
|
@ -165,7 +163,7 @@ class AddAbstractProductActivity : AppCompatActivity() {
|
|||
|
||||
abstractProduct = AbstractProduct(
|
||||
if(abstractProduct == null) 0 else abstractProduct!!.id,
|
||||
barcode,
|
||||
if (noBarcodeCheckBox.isChecked) "" else barcode,
|
||||
productName,
|
||||
netWeight.toString().toDouble(),
|
||||
pictureFile.nameWithoutExtension,
|
||||
|
|
Loading…
Reference in New Issue