Explorar el Código

Merge branch 'dev'

master
Guillaume Bourgeois hace 5 años
padre
commit
f5cfded9a5
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. +4
    -1
      common/models/Distribution.php

+ 4
- 1
common/models/Distribution.php Ver fichero

@@ -159,6 +159,9 @@ class Distribution extends ActiveRecordCommon
if($idProducer) {
$paramsDistribution['distribution.id_producer'] = (int) $idProducer ;
}
else {
$idProducer = Producer::getId() ;
}
$distribution = Distribution::searchOne($paramsDistribution) ;
@@ -166,7 +169,7 @@ class Distribution extends ActiveRecordCommon
$distribution = new Distribution;
$distribution->date = $date;
$distribution->delivery = 1;
$distribution->id_producer = Producer::getId();
$distribution->id_producer = $idProducer ;
$distribution->save();
}
}

Cargando…
Cancelar
Guardar