1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-27 06:04:54 +01:00

Bugfix generale

This commit is contained in:
Thomas Zilio 2020-03-19 13:04:59 +01:00
parent 76d235e8fe
commit 1614ce9284
4 changed files with 7 additions and 15 deletions

View File

@ -211,8 +211,8 @@ abstract class Article extends Row
protected function movimentaMagazzino($qta)
{
$documento = $this->fattura;
$data = $documento->data;
$documento = $this->parent;
$data = $documento->getReferenceDate();
$qta_movimento = $documento->direzione == 'uscita' ? $qta : -$qta;
$movimento = Movimento::descrizioneMovimento($qta_movimento, $documento->direzione).' - '.$documento->getReference();

View File

@ -20,14 +20,6 @@ class Articolo extends Article
*/
public static function build(Intervento $intervento, Original $articolo)
{
$model = parent::build($intervento, $articolo);
$model->prezzo_acquisto = $articolo->prezzo_acquisto;
$model->prezzo_vendita = $articolo->prezzo_vendita;
$model->desc_iva = '';
$model->save();
return $model;
return parent::build($intervento, $articolo);
}
}

View File

@ -20,7 +20,7 @@ class Sconto extends Discount
{
$model = parent::build($intervento);
$model->prezzo_vendita = 0;
$model->prezzo_unitario = 0;
return $model;
}

View File

@ -81,18 +81,18 @@ class Translator extends Util\Singleton
$this->translator->setLocale($locale);
$this->locale = $locale;
$result = setlocale(LC_ALL, $locale);
$result = setlocale(LC_TIME, $locale);
Carbon::setLocale($locale);
if (empty($result)) {
$result = setlocale(LC_ALL, $locale.'.UTF-8');
$result = setlocale(LC_TIME, $locale.'.UTF-8');
} else {
Carbon::setUtf8(true);
}
if (empty($result)) {
$reduced = explode('_', $locale)[0];
$result = setlocale(LC_ALL, $reduced);
$result = setlocale(LC_TIME, $reduced);
}
self::setFormatter($locale, $formatter);