Skip to content

Commit

Permalink
Merge pull request #1216 from daniel89fg/Tarea_#927_bug_nuevo_presupu…
Browse files Browse the repository at this point in the history
…esto

Tarea #927 - Arreglar el modal de detalles al crear documentos de compra y venta.
  • Loading branch information
NeoRazorX committed May 30, 2022
2 parents 18969c0 + 631a918 commit ee599c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions Core/Base/AjaxForms/PurchasesHeaderHTML.php
Expand Up @@ -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 '<div class="' . $css . '">'
. '<div class="form-group">'
. '<button class="btn btn-outline-secondary" type="button" data-toggle="modal" data-target="#headerModal">'
Expand Down
10 changes: 5 additions & 5 deletions Core/Base/AjaxForms/SalesHeaderHTML.php
Expand Up @@ -243,14 +243,14 @@ private static function codtrans(Translator $i18n, SalesDocument $model): string
. '</div>';
}

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 '<div class="' . $css . '">'
. '<div class="form-group">'
. '<button class="btn btn-outline-secondary" type="button" data-toggle="modal" data-target="#headerModal">'
Expand Down

0 comments on commit ee599c4

Please sign in to comment.