diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
index 2aa7c99d..8bd42125 100644
--- a/.idea/deploymentTargetDropDown.xml
+++ b/.idea/deploymentTargetDropDown.xml
@@ -7,11 +7,11 @@
-
+
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 3b9bd89a..1657255f 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -83,10 +83,29 @@
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -97,7 +116,7 @@
-
+
@@ -232,40 +251,41 @@
- {
+ "keyToString": {
+ "ApkExportedModule": "Gestor_Almacén.app",
+ "ExportApk.ApkPathForGestor_Almacén.app": "C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app",
+ "PROJECT_TRUSTED_KEY": "true",
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.cidr.known.project.marker": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "ScreenRecorder.SavePath": "C:\\Users\\sergiodt\\device-2023-03-17-114045.mp4",
+ "android-custom-viewC:/Users/sergiodt/.gradle/caches/modules-2/files-2.1/androidx.recyclerview/recyclerview/1.2.1/f0f93e67af3f7417bdd560d5142f6dec4fe629c3/recyclerview-1.2.1-sources.jar!/androidx/recyclerview/widget/RecyclerView.java_SELECTED": "RecyclerView",
+ "cidr.known.project.marker": "true",
+ "com.developerphil.adbidea.selecteddevices": "21114523025303",
+ "com.google.services.firebase.aqiPopupShown": "true",
+ "last_directory_selection": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
+ "last_opened_file_path": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
+ "project.structure.last.edited": "Modules",
+ "project.structure.proportion": "0.17",
+ "project.structure.side.proportion": "0.2",
+ "run.code.analysis.last.selected.profile": "pProject Default",
+ "settings.editor.selected.configurable": "preferences.sourceCode.Shell Script"
},
- "keyToStringList": {
- "ExportApk.BuildVariants": [
- "generalRelease"
+ "keyToStringList": {
+ "ExportApk.BuildVariants": [
+ "generalRelease"
],
- "com.android.tools.idea.sqlite.queryhistory": [
- "select * from expedition e where e.addressFk= 34915",
- "select * from expedition e where e.id= 6872921",
- "select count(*) from expeditionPending\n",
- "select count(*) from expedition\n",
- "select count(*) from expedition"
+ "com.android.tools.idea.sqlite.queryhistory": [
+ "select * from expedition e where e.addressFk= 34915",
+ "select * from expedition e where e.id= 6872921",
+ "select count(*) from expeditionPending\n",
+ "select count(*) from expedition\n",
+ "select count(*) from expedition"
]
}
-}]]>
+}
@@ -793,7 +813,7 @@
-
+
@@ -882,14 +902,6 @@
-
- file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt
- 866
-
-
-
-
-
file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorViewModel.kt
457
diff --git a/app/build.gradle b/app/build.gradle
index a5ffa71d..9c68420c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -14,7 +14,7 @@ android {
minSdkVersion 24 //21
targetSdkVersion 33
versionCode 200
- versionName = "23.22.1"
+ versionName = "23.22.1Beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
diff --git a/app/src/main/java/es/verdnatura/domain/SalixService.kt b/app/src/main/java/es/verdnatura/domain/SalixService.kt
index 7f0de8f2..f3b9ab3a 100644
--- a/app/src/main/java/es/verdnatura/domain/SalixService.kt
+++ b/app/src/main/java/es/verdnatura/domain/SalixService.kt
@@ -12,9 +12,11 @@ import es.verdnatura.presentation.view.feature.login.model.SalixGrupo
import es.verdnatura.presentation.view.feature.packaging.model.EntrySalix
import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
import es.verdnatura.presentation.view.feature.packaging.model.Supplier
+import es.verdnatura.presentation.view.feature.packaging.model.obervationEntry
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
import es.verdnatura.presentation.view.feature.workermistake.model.DepartmentMistake
import okhttp3.MultipartBody
+import org.json.JSONObject
import retrofit2.Call
import retrofit2.http.*
@@ -80,7 +82,7 @@ interface SalixService {
@Query("item") item: Number,
@Query("printedStickers") printedStickers: Number
):
- Call
+ Call
@POST("tickets/{idTicket}/transferSales") //-->saleMove en Silex
@@ -176,6 +178,13 @@ interface SalixService {
):
Call
+ @PATCH("Entries/{entryId}")//REVISADA
+ fun entry_updateObserv(
+ @Path("entryId") entryId:Int,
+ @Body entry: obervationEntry
+ ):
+ Call
+
@GET("Shelvings")
fun Shelvings(
@Query("filter") filter: String
@@ -192,7 +201,7 @@ interface SalixService {
@POST("Entries/addFromPackaging")
fun addFromPackaging(
- @Query("supplier") supplier: Int,
+ @Query("supplier") supplier: Number,
@Query("isTravelReception") isTravelReception: Boolean
):
diff --git a/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt b/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt
index fa2c1407..d7ec4ffc 100644
--- a/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt
+++ b/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt
@@ -513,6 +513,7 @@ abstract class BaseFragment(viewModelCla
PRINTERFK -> prefs.getInt(name, 0)
USERFK -> prefs.getInt(USERFK, 0)
SUPPLIERID->prefs.getInt(SUPPLIERID,0)
+ "ENTRYID"->prefs.getInt(name,0)
else -> {
0
}
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/adapter/ItemSupplierAdapter.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/adapter/ItemSupplierAdapter.kt
index 761a4558..f1d423bc 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/adapter/ItemSupplierAdapter.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/adapter/ItemSupplierAdapter.kt
@@ -1,6 +1,7 @@
package es.verdnatura.presentation.view.feature.packaging.adapter
import android.view.LayoutInflater
+import android.view.View
import android.view.ViewGroup
import android.view.inputmethod.EditorInfo
import androidx.recyclerview.widget.RecyclerView
@@ -10,11 +11,10 @@ import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
class ItemSupplierAdapter(
private val items: List,
- private val onImageUpdateClickListener: OnImageUpdateClickListener,
- private val onImageTrashClickListener: OnImageTrashClickListener,
- private val onEditSubQuantityListener: OnEditSubQuantityListener
- // private val OnGeneralItemRowClickListener: OnGeneralItemRowClickListener,
- // private var showDelete: Boolean = false
+ private val onImageUpdateClickListener: OnImageUpdateClickListener? ,
+ private val onImageTrashClickListener: OnImageTrashClickListener?,
+ private val onEditSubQuantityListener: OnEditSubQuantityListener?,
+ private var showItems: Boolean = true
) : RecyclerView.Adapter() {
@@ -42,16 +42,20 @@ class ItemSupplierAdapter(
binding.apply {
this.item = item
+ if (!showItems){
+ itemAdd.visibility= View.GONE
+ itemRemove.visibility=View.GONE
+ }
itemAdd.setOnClickListener {
- onImageUpdateClickListener.OnImageUpdateClickListener(
+ onImageUpdateClickListener!!.OnImageUpdateClickListener(
item
)
- itemRemove.setOnClickListener {
- onImageTrashClickListener.OnImageTrashClickListener(item)
- }
+ }
+ itemRemove.setOnClickListener {
+ onImageTrashClickListener!!.OnImageTrashClickListener(item)
}
- itemSubquantity.setOnEditorActionListener { v, actionId, event ->
+ /* itemSubquantity.setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
onEditSubQuantityListener.OnEditSubQuantityListener(
@@ -61,7 +65,7 @@ class ItemSupplierAdapter(
v.clearFocus()
}
return@setOnEditorActionListener false
- }
+ }*/
}
}
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/ObservFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/ObservFragment.kt
index ca1f8d3f..88c73db0 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/ObservFragment.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/ObservFragment.kt
@@ -17,8 +17,8 @@ import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.*
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.component.CustomDialogList
-import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryViewModel
import es.verdnatura.presentation.view.feature.packaging.adapter.ListImageAdapter
+import es.verdnatura.presentation.view.feature.packaging.fragment.PackagingViewModel.PackagingViewModel
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
@@ -26,8 +26,8 @@ import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
class ObservFragment(
var entryPoint: String = ""
-) : BaseFragment(
- InventaryViewModel::class
+) : BaseFragment(
+ PackagingViewModel::class
) {
private var adapterListImage: ListImageAdapter? = null
@@ -51,7 +51,6 @@ class ObservFragment(
override fun init() {
customDialog = CustomDialog(requireContext())
ma.hideBottomNavigation(View.GONE)
- binding.splashProgress.visibility = View.GONE
setToolBar()
setEvents()
super.init()
@@ -59,7 +58,7 @@ class ObservFragment(
private fun setToolBar() {
- binding.mainToolbar.toolbarTitle.text = getData("ENTRYTYPE") + ":" + getData("SUPPLIERNAME")
+ binding.mainToolbar.toolbarTitle.text = getData("ENTRYTYPE") + ": " + getData("SUPPLIERNAME")
val listIcons: ArrayList = ArrayList()
val iconNext = ImageView(context)
@@ -79,7 +78,10 @@ class ObservFragment(
listImages!!.size.toString()
}
)
- saveData("ENTRYOBSERVATIONS", binding.observations.text.toString())
+ saveData("ENTRYOBSERVATIONS",binding.observations.text.toString() )
+
+ viewModel.entry_updateObserv(getDataInt("ENTRYID"),binding.observations.text.toString())
+
ma.onPasillerosItemClickListener(
PasillerosItemVO(title = getString(R.string.titlePackagingSummary)),
getString(R.string.titlePackagingSummary)
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingCountFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingCountFragment.kt
index 34ecf540..ce0a4c70 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingCountFragment.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingCountFragment.kt
@@ -2,7 +2,7 @@ package es.verdnatura.presentation.view.feature.packaging.fragment
import android.graphics.drawable.Drawable
import android.os.Build
-import android.os.Bundle
+import android.text.InputType
import android.util.Log.d
import android.view.View
import android.widget.ImageView
@@ -39,27 +39,18 @@ class PackagingCountFragment(
override fun getLayoutId(): Int = R.layout.fragment_packaging_count
- override fun onCreate(savedInstanceState: Bundle?) {
-
-
- viewModel.supplier_getItems(
- getData("SUPPLIERID")
- )
-
-
- super.onCreate(savedInstanceState)
- }
-
override fun init() {
- binding.quantityPackaging.setOnClickListener {
- ma.onPasillerosItemClickListener(
- PasillerosItemVO(title = getString(R.string.titlePackagingObs)),
- getString(R.string.titlePackagingObs)
- )
- }
- // binding.splashProgress.visibility = View.VISIBLE
-
+ /* binding.quantityPackaging.setOnClickListener {
+ ma.onPasillerosItemClickListener(
+ PasillerosItemVO(title = getString(R.string.titlePackagingObs)),
+ getString(R.string.titlePackagingObs)
+ )
+ }*/
+ binding.splashProgress.visibility = View.VISIBLE
+ viewModel.getItemsPackaging(
+ getDataInt("SUPPLIERID"), getDataInt("ENTRYID")
+ )
customDialogInput = CustomDialogInput(requireContext())
customDialog = CustomDialog(requireContext())
ma.hideBottomNavigation(View.GONE)
@@ -70,7 +61,7 @@ class PackagingCountFragment(
private fun setToolBar() {
- binding.mainToolbar.toolbarTitle.text = getData("ENTRYTYPE") + ":" + getData("SUPPLIERNAME")
+ binding.mainToolbar.toolbarTitle.text = getData("ENTRYTYPE") + ": " + getData("SUPPLIERNAME")
val listIcons: ArrayList = ArrayList()
val iconNext = ImageView(context)
@@ -112,6 +103,21 @@ class PackagingCountFragment(
override fun observeViewModel() {
with(viewModel) {
+ entryAdd.observe(viewLifecycleOwner) {
+
+ if (it.isError) {
+ binding.splashProgress.visibility = View.INVISIBLE
+ ma.messageWithSound(it.errorMessage, true, true)
+
+ } else {
+ ma.messageWithSound(it.errorMessage, false, true)
+ binding.splashProgress.visibility = View.VISIBLE
+ viewModel.getItemsPackaging(
+ getDataInt("SUPPLIERID"), getDataInt("ENTRYID")
+ )
+ }
+ }
+
itemSupplierList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
adapteritemsupplier =
@@ -119,29 +125,15 @@ class PackagingCountFragment(
override fun OnImageUpdateClickListener(item: Any) {
d("VERDNATURA::", "Seleccionado update" + (item as ItemSupplier).name)
- printCustomDialog("quantity")
- /* customDialogInput.setTitle(getString(R.string.quantityReviewed))
- .setDescription(getString(R.string.quantityToReview))
- .setOkButton(getString(R.string.accept)) {
- if (!customDialogInput.getValue().isNullOrEmpty()) {
- requireActivity().hideKeyboard()
- }
- customDialogInput.setValue("")
- customDialogInput.dismiss()
+ showCustomDialog("quantity", item)
- }.setKoButton(getString(R.string.cancel)) {
-
- customDialogInput.dismiss()
-
- }.setValue("").show()
-*/
}
}, object : OnImageTrashClickListener {
override fun OnImageTrashClickListener(item: Any) {
d("VERDNATURA::", "Seleccionado trash" + (item as ItemSupplier).name)
- printCustomDialog("delete")
+ showCustomDialog("delete", item)
}
}, object : OnEditSubQuantityListener {
@@ -164,31 +156,49 @@ class PackagingCountFragment(
}
}
- private fun printCustomDialog(action: String) {
+ private fun showCustomDialog(action: String, item: ItemSupplier) {
when (action) {
"quantity" -> {
+ customDialogInput.getEditText().setRawInputType(InputType.TYPE_CLASS_NUMBER)
+ // customDialogInput.getEditText().inputType = InputType.TYPE_CLASS_NUMBER
customDialogInput.setTitle(getString(R.string.quantityReviewed))
.setDescription(getString(R.string.Indicanuevacantidad))
.setOkButton(getString(R.string.accept)) {
if (!customDialogInput.getValue().isNullOrEmpty()) {
requireActivity().hideKeyboard()
}
- customDialogInput.setValue("")
+
+ /* println("Cantidad total stickers ${item.quantityTotal}")
+ println("Cantidad entrada ${item.quantity}")
+ println("cantidad" + customDialogInput.getValue().toInt())
+ println("suma:"+item.quantity!!.plus(customDialogInput.getValue().toInt()))*/
+
+ binding.splashProgress.visibility = View.VISIBLE
+ viewModel.entry_addFromBuy(
+ getDataInt("ENTRYID"), item = item.id!!.toInt(),
+ (if (getData("ENTRYTYPE") == "Rec") {
+ (item.quantity!!.plus(customDialogInput.getValue().toInt()))
+ } else {
+ item.quantity!!.plus(customDialogInput.getValue().toInt() * -1)
+ }) as Number
+ )
customDialog.cancel()
customDialogInput.dismiss()
- requireActivity().showKeyboard()
+ customDialogInput.setValue("")
+ // requireActivity().showKeyboard()
}.setKoButton(getString(R.string.cancel)) {
customDialog.cancel()
customDialogInput.dismiss()
- requireActivity().showKeyboard()
+ // requireActivity().showKeyboard()
}.setValue("")
.show()
- customDialogInput.setInputText()
+
+
customDialogInput.currentFocus
customDialogInput.setFocusText()
- //requireActivity().showKeyboard()
+ // requireActivity().showKeyboard()
}
"delete" -> {
customDialog.setTitle(getString(R.string.deleteEntryReviewed))
@@ -201,7 +211,11 @@ class PackagingCountFragment(
) {
customDialog.cancel()
customDialog.dismiss()
- d("VERDNATURA::", "borrado")
+ binding.splashProgress.visibility = View.VISIBLE
+ viewModel.entry_addFromBuy(
+ getDataInt("ENTRYID"), item = item.id!!.toInt(),
+ 0
+ )
}
.setKoButton(getString(R.string.cancel)) {
@@ -217,7 +231,6 @@ class PackagingCountFragment(
}
-
}
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingSummaryFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingSummaryFragment.kt
index 36aab3e9..73ee21fa 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingSummaryFragment.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingSummaryFragment.kt
@@ -4,80 +4,44 @@ import android.graphics.drawable.Drawable
import android.os.Build
import android.view.View
import android.widget.ImageView
-import androidx.core.widget.addTextChangedListener
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentPackagingSummaryBinding
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.*
import es.verdnatura.presentation.view.component.CustomDialog
-import es.verdnatura.presentation.view.component.CustomDialogInput
-import es.verdnatura.presentation.view.component.CustomDialogList
-import es.verdnatura.presentation.view.feature.articulo.adapter.BarcodeAdapter
-import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
-import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryViewModel
-import es.verdnatura.presentation.view.feature.inventario.fragment.SearchDepartmentModel
-import es.verdnatura.presentation.view.feature.workermistake.adapter.WorkermistakeAdapter
-import es.verdnatura.presentation.view.feature.workermistake.model.DepartmentMistake
-import es.verdnatura.presentation.view.feature.workermistake.model.MistakeWorkerType
-import es.verdnatura.presentation.view.feature.workermistake.model.WorkerFromMistake
-import ir.mirrajabi.searchdialog.SimpleSearchDialogCompat
+import es.verdnatura.presentation.view.feature.packaging.adapter.ItemSupplierAdapter
+import es.verdnatura.presentation.view.feature.packaging.fragment.PackagingViewModel.PackagingViewModel
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
class PackagingSummaryFragment(
var entryPoint: String = ""
-) : BaseFragment(
- InventaryViewModel::class
+) : BaseFragment(
+ PackagingViewModel::class
) {
-
- private var adapterworker: WorkermistakeAdapter? = null
-
- private lateinit var customDialogInput: CustomDialogInput
-
-
- private var listWorker: MutableList = ArrayList()
- private var listWorkerAuxiliary: MutableList = ArrayList()
+ private var adapteritemsupplier: ItemSupplierAdapter? = null
private lateinit var customDialog: CustomDialog
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
private var layoutManager: LinearLayoutManager? = null
- private lateinit var customDialogList: CustomDialogList
- private var listMistakes: ArrayList = ArrayList()
- private var listMistakesAdapter: BarcodeAdapter? = null
- private var workerMistakeName: WorkerFromMistake? = null
-
-
- private val departments = ArrayList()
- private lateinit var departmentId: String
-
companion object {
fun newInstance(entryPoint: String) = PackagingSummaryFragment(entryPoint)
}
override fun getLayoutId(): Int = R.layout.fragment_packaging_summary
-
override fun init() {
-
- binding.totalImages.text = getData("ENTRYNUMBERIMAGES")
- binding.observations.text=getData("ENTRYOBSERVATIONS")
-
- departmentId = getData(DEPARTMENTMISTAKEID)
- customDialogList = CustomDialogList(requireContext())
-
-
-
- if (!departmentId.isEmpty()) {
- viewModel.worker_getFromHasMistake(
- getData(DEPARTMENTMISTAKEID).toInt()
- )
- }
-
-
- customDialogInput = CustomDialogInput(requireContext())
customDialog = CustomDialog(requireContext())
+ binding.totalImages.text = getData("ENTRYNUMBERIMAGES")
+ binding.observations.text = getData("ENTRYOBSERVATIONS")
+
+ binding.splashProgress.visibility = View.VISIBLE
+ viewModel.getItemsPackaging(
+ getDataInt("SUPPLIERID"), getDataInt("ENTRYID")
+ )
+
ma.hideBottomNavigation(View.GONE)
binding.splashProgress.visibility = View.GONE
setToolBar()
@@ -87,7 +51,7 @@ class PackagingSummaryFragment(
private fun setToolBar() {
- binding.mainToolbar.toolbarTitle.text = getData("ENTRYTYPE") + ":" + getData("SUPPLIERNAME")
+ binding.mainToolbar.toolbarTitle.text = getData("ENTRYTYPE") + ": " + getData("SUPPLIERNAME")
val listIcons: ArrayList = ArrayList()
val iconConfirm = ImageView(context)
@@ -102,7 +66,7 @@ class PackagingSummaryFragment(
override fun onOptionsItemSelected(item: Drawable) {
when (item) {
iconConfirm.drawable -> {
- // TODO()
+ showWarning()
}
}
}
@@ -126,149 +90,43 @@ class PackagingSummaryFragment(
override fun observeViewModel() {
with(viewModel) {
-
- mistakeDepartmentList.observe(viewLifecycleOwner) {
+ itemSupplierList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
- createDepartmentList(it.list)
-
- }
- workerFromMistakeList.observe(viewLifecycleOwner) {
- binding.splashProgress.visibility = View.GONE
- createWorkerList(it.list)
-
- adapterworker =
- WorkermistakeAdapter(listWorker, object : onMistakeWorkerClickListener {
-
- override fun onMistakeWorkerClickListener(item: WorkerFromMistake) {
- viewModel.workerMistakeType_get(
- )
- workerMistakeName =
- WorkerFromMistake(
- item.id,
- item.firstName,
- item.lastName,
- true,
- ""
- )
-
-
- }
- })
- binding.workermistakeRecyclerview.adapter = adapterworker
+ var mySummaryList = it.list.filter { it.quantity > 0 }
+ adapteritemsupplier =
+ ItemSupplierAdapter(mySummaryList, null, null, null, showItems = false)
+ binding.itemsupplierRecyclerview.adapter = adapteritemsupplier
layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
- binding.workermistakeRecyclerview.layoutManager = layoutManager
-
+ binding.itemsupplierRecyclerview.layoutManager = layoutManager
}
-
- mistakeWorkerList.observe(viewLifecycleOwner, {
- binding.splashProgress.visibility = View.GONE
- showMistakeList(it.list)
- //goBack = false
-
- })
-
- responseAddMistake.observe(viewLifecycleOwner, {
-
-
- ma.messageWithSound(
- if (it.isError) {
- if (it.codeError == 403) {
- getString(R.string.userNotPermission)
- } else {
- it.errorMessage
- }
-
- } else {
- getString(R.string.errorCauseRegistered)
- }, it.isError, true, isToasted = true
- )
-
- })
-
- response.observe(viewLifecycleOwner, {
- if (it.isError) {
- ma.messageWithSound(it.errorMessage, true, false)
-
- }
- })
}
}
- private fun showMistakeList(list: List) {
- binding.splashProgress.visibility = View.GONE
- listMistakes = ArrayList()
- list.forEach {
- listMistakes.add(BarcodeVO(code = it.description))
- }
+ private fun showWarning() {
+ customDialog.setTitle(getString(R.string.sendEntry))
+ customDialog.setTitle(getString(R.string.warningEntry))
+ .setOkButton(
+ getString(
+ R.string.accept
+ )
+ ) {
+ customDialog.dismiss()
+ }
- customDialogList.setTitle(getString(R.string.errorCause) + workerMistakeName!!.firstName)
.setKoButton(
getString(
R.string.cancel
)
) {
- customDialogList.dismiss()
- }.hideDialog().show()
+ customDialog.dismiss()
+ }.show()
- listMistakesAdapter =
- BarcodeAdapter(listMistakes, object : OnBarcodeRowClickListener {
- override fun onBarcodeRowClickListener(item: BarcodeVO) {
- list.forEach {
- if (it.description == item.code) {
- /* viewModel.workerMistake_Add(
- vUserFk = workerMistakeName!!.id!!,
- vTypeFk = it.code
- )*/
- // getString(R.string.errorRegistered).toast(requireContext())
- customDialogList.dismiss()
- }
- }
-
- }
- }, showDelete = false)
-
- customDialogList.getRecyclerView().adapter = listMistakesAdapter
-
- customDialogList.getRecyclerView().layoutManager =
- LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
-
}
- private fun createDepartmentList(list: List) {
- departments.clear()
- list.forEach { department ->
- if (!department.isError) {
- try {
- departments.add(SearchDepartmentModel(department.name, department.id))
- } catch (e: Exception) {
- }
- }
- }
- }
-
- private fun createWorkerList(list: List) {
- listWorker.clear()
-
- list.forEach { worker ->
-
- if (!worker.isError) {
- try {
- listWorker.add(worker)
- } catch (e: Exception) {
- }
- }
-
- }
- listWorker.add(WorkerFromMistake(0, "Añadir nuevo", "", false))
- listWorkerAuxiliary.clear()
- listWorkerAuxiliary.addAll(listWorker)
- listWorkerAuxiliary.add(WorkerFromMistake(0, "Añadir nuevo", "", false))
-
- }
}
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingViewModel/SupplierViewModel.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingViewModel/SupplierViewModel.kt
index 267804ed..ef6c132e 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingViewModel/SupplierViewModel.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingViewModel/SupplierViewModel.kt
@@ -3,15 +3,15 @@ package es.verdnatura.presentation.view.feature.packaging.fragment.PackagingView
import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
+import androidx.lifecycle.Transformations
import es.verdnatura.domain.SilexCallback
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
+import es.verdnatura.presentation.common.Event
import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.view.feature.packaging.model.*
import okhttp3.MultipartBody
-import retrofit2.Call
-import retrofit2.Callback
import retrofit2.Response
class PackagingViewModel(val context: Context) : BaseViewModel(context) {
@@ -33,10 +33,20 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
val entry: LiveData
get() = _entry
+ private val _entryUpdate by lazy { MutableLiveData() }
+ val entryUpdate: LiveData
+ get() = _entryUpdate
+
+ private val _entryAdd by lazy { MutableLiveData() }
+ val entryAdd: LiveData
+ get() = _entryAdd
+
private val _response by lazy { MutableLiveData() }
val response: LiveData
get() = _response
+ val loadEntryAdd = Transformations.map(_entryAdd) { Event(it) }
+
fun getSuppliers() {
salix.getSuppliers()
.enqueue(object :
@@ -78,7 +88,7 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
}
fun getEntries_fromSupplier(supplier: Int) {
- salix.getEntries_fromSupplier("""{"where": {"supplierFk": "$supplier","isReceived":"false"},"limit":5}""")
+ salix.getEntries_fromSupplier("""{"where": {"supplierFk": "$supplier"},"limit":5, "order":"created DESC"}""")
.enqueue(object :
SilexCallback>(context) {
override fun onError(t: Throwable) {
@@ -180,6 +190,37 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
})
}
+ fun entry_updateObserv(entryId: Int, observation: String) {
+ salix.entry_updateObserv(entryId,obervationEntry(observation))
+ .enqueue(object :
+ SilexCallback(context) {
+ override fun onError(t: Throwable) {
+ _entryUpdate.value = EntrySalix(
+ isError = true,
+ errorMessage = getMessageFromAllResponse(
+ nameofFunction(this),
+ t.message!!
+ )
+ )
+ }
+
+ override fun onSuccess(response: Response) {
+ if (response.body() != null) {
+ _entryUpdate.value = response.body()
+ } else {
+ _entryUpdate.value = EntrySalix(
+ isError = true,
+ errorMessage = getMessageFromAllResponse(
+ nameofFunction(this),
+ response.message()
+ )
+ )
+ }
+
+ }
+ })
+ }
+
fun entry_uploadPhotoSalix(id: Number, warehouseId: Number, companyId: Number, dmsTypeId: Number, reference: String, description: String, hasFile: Boolean, file: MultipartBody.Part) {
salix.uploadEntryPhoto(id, warehouseId, companyId, dmsTypeId, reference, description, hasFile, file)
.enqueue(object : SilexCallback(context){})
@@ -187,6 +228,89 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
fun entry_addFromBuy(id: Number, item: Number, printedStickers: Number) {
salix.addFromBuy(id, item, printedStickers)
- .enqueue(object : SilexCallback(context){})
+ .enqueue(object : SilexCallback(context){override fun onError(t: Throwable) {
+ _entryAdd.value = EntrySalix(
+ isError = true,
+ errorMessage = getMessageFromAllResponse(
+ nameofFunction(this),
+ t.message!!
+ )
+ )
+ }
+
+ override fun onSuccess(response: Response) {
+ if (response.body() != null) {
+ _entryAdd.value = response.body()
+ } else {
+ _entryAdd.value = EntrySalix(
+ isError = true,
+ errorMessage = getMessageFromAllResponse(
+ nameofFunction(this),
+ response.message()
+ )
+ )
+ }
+
+ }
+ })
+ }
+ fun entry_addFromPackaging(supplier: Number,isPackaging: Boolean) {
+ salix.addFromPackaging(supplier, isPackaging)
+ .enqueue(object : SilexCallback(context) {
+ override fun onError(t: Throwable) {
+ _entryAdd.value = EntrySalix(
+ isError = true,
+ errorMessage = getMessageFromAllResponse(
+ nameofFunction(this),
+ t.message!!
+ )
+ )
+ }
+
+ override fun onSuccess(response: Response) {
+ if (response.body() != null) {
+ _entryAdd.value = response.body()
+ } else {
+ _entryAdd.value = EntrySalix(
+ isError = true,
+ errorMessage = getMessageFromAllResponse(
+ nameofFunction(this),
+ response.message()
+ )
+ )
+ }
+
+ }
+ })
+ }
+ fun getItemsPackaging(supplierId: Int,entryId: Int) {
+ salix.getItemsPackaging(supplierId, entryId)
+ .enqueue(object : SilexCallback>(context){
+ override fun onError(t: Throwable) {
+ val listError: ArrayList = ArrayList()
+ listError.add(
+ ItemSupplier(
+ isError = true,
+ errorMessage = getMessageFromAllResponse(
+ nameofFunction(this),
+ t.message!!
+ )
+ )
+ )
+ _itemSupplierList.value = itemSupplierList(listError)
+ }
+
+ override fun onSuccess(response: Response>) {
+ if (response.body() != null) {
+ _itemSupplierList.value =
+ response.body()?.let { itemSupplierList(it) }
+ } else {
+ val listError: ArrayList = ArrayList()
+ listError.add(ItemSupplier(null, null))
+ _itemSupplierList.value = itemSupplierList(listError)
+ }
+ }
+
+ })
}
}
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/SupplierFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/SupplierFragment.kt
index ecf56e05..ec6f8740 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/SupplierFragment.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/SupplierFragment.kt
@@ -1,27 +1,22 @@
package es.verdnatura.presentation.view.feature.packaging.fragment
-import android.content.ContentResolver
import android.content.Context
-import android.net.Uri
import android.os.Bundle
-import android.util.Log.d
import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentPackagingBinding
+import es.verdnatura.domain.notNull
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
import es.verdnatura.presentation.common.convertToDateString
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.feature.inventario.fragment.SearchSupplierModel
import es.verdnatura.presentation.view.feature.packaging.fragment.PackagingViewModel.PackagingViewModel
+import es.verdnatura.presentation.view.feature.packaging.model.EntrySalix
import es.verdnatura.presentation.view.feature.packaging.model.Supplier
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
import ir.mirrajabi.searchdialog.SimpleSearchDialogCompat
-import okhttp3.MediaType
-import okhttp3.MultipartBody
-import okhttp3.RequestBody
-import java.io.File
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
@@ -40,6 +35,7 @@ class SupplierFragment(
private lateinit var customDialog: CustomDialog
+
companion object {
fun newInstance(entryPoint: String) = SupplierFragment(entryPoint)
}
@@ -55,24 +51,21 @@ class SupplierFragment(
viewModel.getSuppliers()
- /* viewModel.getSuppliers(
- )*/
-
val drawableId: Int =
R.drawable.background_test // Reemplaza "mi_drawable" con el nombre de tu recurso Drawable
- /* val uri: Uri = Uri.parse(
- ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
- context!!.resources.getResourcePackageName(drawableId) + '/' +
- context!!.resources.getResourceTypeName(drawableId) + '/' +
- context!!.resources.getResourceEntryName(drawableId)
- )
-
- val rutaAbsoluta: String = uri.toString()*/
+ /* val uri: Uri = Uri.parse(
+ ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
+ context!!.resources.getResourcePackageName(drawableId) + '/' +
+ context!!.resources.getResourceTypeName(drawableId) + '/' +
+ context!!.resources.getResourceEntryName(drawableId)
+ )
+ val rutaAbsoluta: String = uri.toString()*/
+/*
val file = File("/storage/emulated/0/Android/data/es.verdnatura.sfusion/files/Pictures/test.png")
val filePart = MultipartBody.Part.createFormData(
"file",
@@ -88,7 +81,7 @@ class SupplierFragment(
"Example description",
false,
file = filePart
- )
+ )*/
// viewModel.entry_addFromBuy(8,1,100)
super.onCreate(savedInstanceState)
}
@@ -113,12 +106,12 @@ class SupplierFragment(
binding.filterSupplier.setText((nombre.getName()))
binding.radiobuttonTypePackaging.visibility = View.VISIBLE
saveData("SUPPLIERNAME", nombre.getName())
- saveData("SUPPLIERID", nombre.getId())
+ saveDataInt("SUPPLIERID", nombre.getId().toInt())
viewModel.getEntries_fromSupplier(nombre.getId().toInt())
baseSearchDialogCompat.dismiss()
}.show()
}
-
+ customDialog = CustomDialog(requireContext())
ma.hideBottomNavigation(View.GONE)
setToolBar()
setEvents()
@@ -135,46 +128,7 @@ class SupplierFragment(
binding.mainToolbar.backButton.setOnClickListener {
requireActivity().onBackPressed()
}
- /*binding.filterEntry.setOnClickListener {
- val builder = AlertDialog.Builder(context)
- builder.setTitle(getString(R.string.selectEntryToFill))
- val labelCount = arrayOf("Entrada 1", "Entrada 2", "Añadir Nueva")
- builder.setItems(labelCount) { dialog, which ->
-
- if (labelCount[which] == "Añadir Nueva") {
- customDialog = CustomDialog(requireContext())
- customDialog.setTitle(getString(R.string.newEntry))
- .setDescription(getString(R.string.confirmEntry))
- .setOkButton(
- getString(
- R.string.createEntry
- )
- ) {
- d("VERDNATURA::", "borrado")
- }
-
- .setKoButton(getString(R.string.cancel)) {
- customDialog.cancel()
- customDialog.dismiss()
-
-
- }
- customDialog.show()
-
- }
-
-
- ma.onPasillerosItemClickListener(
- PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
- getString(R.string.titlePackagingCount)
- )
-
- }
- val dialog = builder.create()
- dialog.show()
-
- }*/
binding.radiobuttonTypePackaging.setOnCheckedChangeListener { buttonView, isChecked ->
when (isChecked) {
@@ -188,14 +142,6 @@ class SupplierFragment(
}
binding.filterEntry.visibility = View.VISIBLE
- if (!onBack) {
- ma.onPasillerosItemClickListener(
- PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
- getString(R.string.titlePackagingCount)
- )
-
- }
- onBack = false
}
}
@@ -211,12 +157,16 @@ class SupplierFragment(
) { baseSearchDialogCompat, nombre, position ->
binding.filterEntry.setText((nombre.getName()))
binding.radiobuttonTypePackaging.visibility = View.VISIBLE
- saveData("ENTRYID", nombre.getId())
- d("VERDNATURA::","Ha seleccionado:"+nombre.getId())
- ma.onPasillerosItemClickListener(
- PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
- getString(R.string.titlePackagingCount)
- )
+
+ if (nombre.getName() == getString(R.string.newEntry)) {
+ addEntry()
+ } else {
+ saveDataInt("ENTRYID", nombre.getId().toInt())
+ ma.onPasillerosItemClickListener(
+ PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
+ getString(R.string.titlePackagingCount)
+ )
+ }
baseSearchDialogCompat.dismiss()
}.show()
}
@@ -241,15 +191,46 @@ class SupplierFragment(
}
}
- entry.observe(viewLifecycleOwner) {
- binding.splashProgress.visibility=View.GONE
- println("Entrada")
+
+ loadEntryAdd.observe(viewLifecycleOwner) { event ->
+ event.getContentIfNotHandled().notNull {
+ binding.splashProgress.visibility = View.INVISIBLE
+ if (it.isError) {
+ ma.messageWithSound(it.errorMessage, true, false)
+
+ } else {
+ saveDataInt("ENTRYID", it.id!!.toInt())
+ ma.onPasillerosItemClickListener(
+ PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
+ it.id!!.toString()
+ )
+ }
+
+ }
+ }
+
+
+
+ /* entryAdd.observe(viewLifecycleOwner) {
if (it.isError) {
ma.messageWithSound(it.errorMessage, true, false)
- }else{
- saveDataInt("ENTRY", it.id!!)
- println("Entrada"+it.id)
+ } else {
+ saveDataInt("ENTRYID", it.id!!.toInt())
+ ma.onPasillerosItemClickListener(
+ PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
+ it.id!!.toString()
+ )
+ }
+ }*/
+
+ entry.observe(viewLifecycleOwner) {
+ binding.splashProgress.visibility = View.GONE
+ if (it.isError) {
+ ma.messageWithSound(it.errorMessage, true, false)
+
+ } else {
+ saveDataInt("ENTRYID", it.id!!.toInt())
ma.onPasillerosItemClickListener(
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
getString(R.string.titlePackagingCount)
@@ -279,8 +260,8 @@ class SupplierFragment(
try {
entries.add(
SearchSupplierModel(
- entry.id.toString() + "->" + convertToDateString( entry.dated.toString()),
- id = entry.id.toString()
+ entry.id.toString() + "->" + convertToDateString(entry.created),
+ id = entry.id.toString()
)
)
} catch (e: Exception) {
@@ -288,19 +269,38 @@ class SupplierFragment(
}
}
- entries.add(SearchSupplierModel("Añadir Nueva", ""))
+ entries.add(SearchSupplierModel(getString(R.string.newEntry), ""))
setEntryDialog()
}
- private fun addEntry(){
+ private fun addEntry() {
+
+ customDialog.setTitle(getString(R.string.createEntryDescrip))
+ .setDescription(getString(R.string.sure))
+ .setOkButton(
+ getString(
+ R.string.accept
+ )
+
+ ) {
+ customDialog.cancel()
+ customDialog.dismiss()
+ binding.splashProgress.visibility = View.VISIBLE
+ viewModel.entry_addFromPackaging(
+ getDataInt("SUPPLIERID"),
+ getData("ENTRYTYPE") == "Rec"
+ )
+
+ }
+
+ .setKoButton(getString(R.string.cancel)) {
+ customDialog.cancel()
+ customDialog.dismiss()
- if (getData("ENTRYTYPE" )=="Rec"){
- viewModel.entry_addSalix(EntrySalix(supplierFk = getData("SUPPLIERID").toInt(), travelFk = 186025, companyFk = 442))
- }else{
- viewModel.entry_addSalix(EntrySalix(supplierFk = getData("SUPPLIERID").toInt(), travelFk = 186025, companyFk = 442))
- }
-
+ }
+ .show()
}
+
}
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/model/EntrySalix.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/model/EntrySalix.kt
index 32d8bf09..dab9b174 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/model/EntrySalix.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/model/EntrySalix.kt
@@ -1,15 +1,14 @@
package es.verdnatura.presentation.view.feature.packaging.model
-import android.content.Context
import es.verdnatura.presentation.common.convertToDateString
-import java.util.ArrayList
class EntrySalix(
- var id: Int? = null,
+ var id: Number? = null,
var dated: String? = null,
- var supplierFk: Int? = null,
- var travelFk: Int? = null,
- var companyFk: Int? = null,
+ var created: String? = null,
+ var supplierFk: Number? = null,
+ var travelFk: Number? = null,
+ var companyFk: Number? = null,
var isError: Boolean = false,
var errorMessage: String = ""
)
@@ -20,9 +19,14 @@ fun List.toDateFormat(): ArrayList {
entries.add(
EntrySalix(
dated = convertToDateString(it.dated),
+ created = convertToDateString(it.created)
)
)
}
- return entries.sortedBy{it.dated} as ArrayList
-}
\ No newline at end of file
+ return entries.sortedBy { it.dated } as ArrayList
+}
+
+data class obervationEntry(
+ val observation:String
+)
\ No newline at end of file
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/model/Supplier.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/model/Supplier.kt
index 3228edac..58bab5c1 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/model/Supplier.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/model/Supplier.kt
@@ -21,8 +21,8 @@ class itemSupplierList(
data class ItemSupplier(
var id: Int? = null,
var name: String? = null,
- var quantity: Int? = 0,
- var quantityTotal: Int? = 0,
+ var quantity: Int = 0,
+ var quantityTotal: Int = 0,
var buy: Int? = null,
var isError: Boolean = false,
var errorMessage: String? = null
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt
index c2cbdad7..50237efd 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt
@@ -499,13 +499,13 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
)
)
-
+*/
//#tarea4021
_pasillerositem.add(
PasillerosItemVO(
6,
- R.drawable.ic_packaging,
+ R.drawable.ic_packaging_entries,
contextApp.getString(R.string.titlePackaging),
R.string.titlePackaging,
contextApp.getString(R.string.titlePackagingDescrip)
@@ -519,7 +519,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
R.string.titlePhotos,
contextApp.getString(R.string.titlePhotos)
)
- )*/
+ )
val working_in_test=false
if (working_in_test){
diff --git a/app/src/main/res/drawable/ic_packaging_entries.xml b/app/src/main/res/drawable/ic_packaging_entries.xml
new file mode 100644
index 00000000..a33c5c20
--- /dev/null
+++ b/app/src/main/res/drawable/ic_packaging_entries.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/layout/fragment_packaging_obs.xml b/app/src/main/res/layout/fragment_packaging_obs.xml
index b81ee973..b7b3b2d0 100644
--- a/app/src/main/res/layout/fragment_packaging_obs.xml
+++ b/app/src/main/res/layout/fragment_packaging_obs.xml
@@ -39,6 +39,7 @@
android:textColor="#FFF"
android:textSize="18dp"
android:drawableEnd="@drawable/ic_add_black_24dp"
+ android:visibility="gone"
app:layout_constraintStart_toEndOf="@+id/observations"
app:layout_constraintTop_toBottomOf="@+id/observations" />
@@ -61,7 +63,7 @@
android:layout_weight="1"
android:gravity="center"
android:text="Añadir nueva..."
- android:visibility="gone"
+ android:visibility="visible"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
@@ -70,7 +72,7 @@
android:id="@+id/listImagesRecycler"
android:layout_width="match_parent"
android:layout_height="550dp"
- android:visibility="visible"
+ android:visibility="gone"
app:layout_constraintStart_toEndOf="@+id/textImages"
app:layout_constraintTop_toBottomOf="@+id/textImages"
tools:listitem="@layout/item_image_row"
@@ -91,7 +93,7 @@
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
- android:visibility="visible"
+ android:visibility="invisible"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="0dp">
diff --git a/app/src/main/res/layout/fragment_packaging_summary.xml b/app/src/main/res/layout/fragment_packaging_summary.xml
index 7de4b878..bbd75e48 100644
--- a/app/src/main/res/layout/fragment_packaging_summary.xml
+++ b/app/src/main/res/layout/fragment_packaging_summary.xml
@@ -19,7 +19,7 @@
app:layout_constraintTop_toTopOf="parent">
@@ -27,207 +27,143 @@
+ android:orientation="horizontal">
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:hint="@string/observations"
+ android:textColor="@color/verdnatura_pumpkin_orange"
+ android:textSize="@dimen/body2"
+ android:textStyle="bold" />
+
@@ -238,6 +174,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
+
+ android:visibility="invisible"
+ android:textSize="@dimen/body2"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent">
-
-
+
\ No newline at end of file
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 29b088f2..3ef48abb 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -245,7 +245,7 @@
Coger
Causa del error registrado
Falta seleccionar impresora
- Observaciones
+ "Observaciones: "
Escanea matrícula para ver histórico
Escanea matrícula del vehículo
Escanea matrícula para dejar vehículo
@@ -590,5 +590,18 @@
¿Desea resetear la revisión del carro?
Al pulsar permite resetear la revisión
Revisión del carro
+ Cantidad revisada a sumar/restar del total
+ Vas a borrar la cantidad de la compra de la entrada
+ Cantidad a revisar
+ Selecciona entrada
+ Crear entrada
+ Añadir nueva
+ Añadir nueva
+ Crear entrada
+ Va a crear una entrada para el proveedor seleccionado.
+ Va a notificar la entrada al dpto de Logística
+ Enviar entrada embalajes
+ "Imágenes: "
+
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 1bc15216..6f8909c4 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -245,7 +245,7 @@
Coger
Causa del error registrado
Falta seleccionar impresora
- Observaciones
+ "Observaciones: "
Escanea matrícula para ver histórico
Escanea matrícula del vehículo
Escanea matrícula para dejar vehículo
@@ -590,5 +590,17 @@
Souhaitez-vous supprimer la révision de la voiture?
Al pulsar permite resetear la revisión
Revisión del carro
+ Cantidad revisada a sumar/restar del total
+ Borrar entrada
+ Cantidad a revisar
+ Selecciona entrada
+ Crear entrada
+ Añadir nueva
+ Añadir nueva
+ Crear entrada
+ Va a crear una entrada para el proveedor seleccionado.
+ Va a notificar la entrada al dpto de Logística
+ Enviar entrada embalajes
+ "Imágenes: "
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 5e88f673..acbd720b 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -245,7 +245,7 @@
Coger
Causa del error registrado
Falta seleccionar impresora
- Observaciones
+ "Observaciones: "
Escanea matrícula para ver histórico
Escanea matrícula del vehículo
Escanea matrícula para dejar vehículo
@@ -590,5 +590,17 @@
Você deseja excluir a revisão do carro?
Al pulsar permite resetear la revisión
Revisión del carro
+ Cantidad revisada a sumar/restar del total
+ Borrar entrada
+ Cantidad a revisar
+ Selecciona entrada
+ Crear entrada
+ Añadir nueva
+ Añadir nueva
+ Crear entrada
+ Va a crear una entrada para el proveedor seleccionado.
+ Va a notificar la entrada al dpto de Logística
+ Enviar entrada embalajes
+ "Imágenes: "
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 0c90276c..010acd41 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -273,7 +273,7 @@
Take
Cause of error registered
Select printer
- Observations
+ "Observaciones: "
Scan plate for looking historical
Scan vehicle plate
"Scan plate to take off "
@@ -589,5 +589,17 @@
Do you want to delete the shelving review?
By pressing it allows resetting the review
Shelving checking
+ Cantidad revisada a sumar/restar del total
+ Borrar entrada
+ Cantidad a revisar
+ Selecciona entrada
+ Crear entrada
+ Añadir nueva
+ Crear entrada
+ Añadir nueva
+ Va a crear una entrada para el proveedor seleccionado.
+ Va a notificar la entrada al dpto de Logística
+ Enviar entrada embalajes
+ Imágenes: