Seteando producto como bono para tipos 'F' y 'BE'
This commit is contained in:
parent
9aa5b390f8
commit
b8d1520c54
1 changed files with 2 additions and 1 deletions
|
@ -17,6 +17,7 @@ class CanastaHelper
|
|||
const TOTAL = "TOTAL";
|
||||
const ARCHIVO_SUBIDO = 'Archivo subido';
|
||||
const CANASTA_CARGADA = 'Canasta cargada';
|
||||
const TIPOS_BONO = ["B", "F", "BE"];
|
||||
|
||||
public static function guardarCanasta($data, $path): string {
|
||||
$nombre = $data->getClientOriginalName();
|
||||
|
@ -66,7 +67,7 @@ class CanastaHelper
|
|||
'nombre' => trim(str_replace('*', '',$registro['Producto'])),
|
||||
'precio' => $registro['Precio'],
|
||||
'proveedor_id' => self::obtenerProveedor($registro['Producto']),
|
||||
'bono' => $registro[self::TIPO] == "B",
|
||||
'bono' => in_array($registro[self::TIPO], self::TIPOS_BONO),
|
||||
'requiere_notas'=> $registro[self::TIPO] =="PTC",
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue