diff --git a/Core/Base/AjaxForms/PurchasesHeaderHTML.php b/Core/Base/AjaxForms/PurchasesHeaderHTML.php index e54da45094..8f584118b9 100644 --- a/Core/Base/AjaxForms/PurchasesHeaderHTML.php +++ b/Core/Base/AjaxForms/PurchasesHeaderHTML.php @@ -156,14 +156,14 @@ private static function codproveedor(Translator $i18n, PurchaseDocument $model): return $html; } - private static function detail(Translator $i18n, PurchaseDocument $model, bool $force = false): string + private static function detail(Translator $i18n, PurchaseDocument $model, bool $new = false): string { - if (empty($model->primaryColumnValue()) && $force === false) { - // necesitamos el modal para tener los inputs en el form - return self::detailModal($i18n, $model); + if (empty($model->primaryColumnValue()) && $new === false) { + // si el modelo es nuevo, ya hemos pintado el modal de detalle + return ''; } - $css = $force ? 'col-sm-auto' : 'col-sm'; + $css = $new ? 'col-sm-auto' : 'col-sm'; return '
' . '
' . '
'; } - private static function detail(Translator $i18n, SalesDocument $model, bool $force = false): string + private static function detail(Translator $i18n, SalesDocument $model, bool $new = false): string { - if (empty($model->primaryColumnValue()) && $force === false) { - // necesitamos el modal para tener los inputs en el form - return self::detailModal($i18n, $model); + if (empty($model->primaryColumnValue()) && $new === false) { + // si el modelo es nuevo, ya hemos pintado el modal de detalle + return ''; } - $css = $force ? 'col-sm-auto' : 'col-sm'; + $css = $new ? 'col-sm-auto' : 'col-sm'; return '
' . '
' . '