feat: refs#6802 SalesPerson
This commit is contained in:
parent
e78dfdac0e
commit
028d0b85aa
|
@ -3,14 +3,14 @@ package es.verdnatura.presentation.view.feature.presacador.mapper
|
|||
import es.verdnatura.presentation.view.feature.presacador.model.PreSacadorItemVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
||||
|
||||
fun PreSacadorItemVO.toSale() : SaleVO {
|
||||
fun PreSacadorItemVO.toSale(): SaleVO {
|
||||
return SaleVO(
|
||||
ticketFk = id,
|
||||
level = "1",
|
||||
saleFk = idMovimiento,
|
||||
itemFk = itemFk,
|
||||
quantity = saldo,
|
||||
longName = if (longName != null) longName else "",
|
||||
longName = if (longName != null) longName else "",
|
||||
isPreviousPrepared = if (quantity == picked) "1" else "0",
|
||||
line1 = longName,
|
||||
line2 = if (subName.isNullOrEmpty()) "" else subName,//sergio:cuando subida versión de tarea #3510 se puede quitar isNullOrEmpty
|
||||
|
@ -19,32 +19,29 @@ fun PreSacadorItemVO.toSale() : SaleVO {
|
|||
originalQuantity = quantity,
|
||||
placements = carros,
|
||||
agencyName = trabajador.toString(),
|
||||
packingType=packingType,
|
||||
salePersonFk=if (salesPersonFk.isNullOrEmpty()){""}else salesPersonFk,
|
||||
rgb= null
|
||||
|
||||
packingType = packingType,
|
||||
rgb = null
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
fun PreSacadorItemVO.toSaleReposicion() : SaleVO {
|
||||
fun PreSacadorItemVO.toSaleReposicion(): SaleVO {
|
||||
return SaleVO(
|
||||
ticketFk = id,
|
||||
level = "1",
|
||||
saleFk = idMovimiento,
|
||||
itemFk = itemFk,
|
||||
quantity = quantity,
|
||||
longName = if (longName != null) longName else "",
|
||||
longName = if (longName != null) longName else "",
|
||||
isPreviousPrepared = if ((quantity - saldo) == 0) "1" else "0",
|
||||
line1 = longName,
|
||||
line2 = if (subName.isNullOrEmpty()) "" else subName,
|
||||
pickedQuantity = (quantity - saldo),
|
||||
workerFk =trabajador,
|
||||
workerFk = trabajador,
|
||||
originalQuantity = quantity,
|
||||
placements = carros,
|
||||
agencyName = trabajador.toString(),
|
||||
rgb=null
|
||||
rgb = null
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue