Skip to content

Commit

Permalink
- Más correcciones a los formularios de impresión simples para mejora…
Browse files Browse the repository at this point in the history
…r el diseño.

- Ahora al crear/editar documentos de compra/venta y forzar el total+iva de una linea, se usan los decimales configurados para los precios de los artículos.
  • Loading branch information
NeoRazorX committed Jun 6, 2016
1 parent 0501687 commit 92b5504
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 7 deletions.
30 changes: 26 additions & 4 deletions controller/imprimir_presu_pedi.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,17 @@ private function generar_pdf_presupuesto($archivo = FALSE)
' ('.$this->presupuesto->provincia.')'),
'campo2' => ''
);
if($this->cliente->telefono1 OR $this->cliente->telefono1)
if($this->cliente->telefono1 OR $this->cliente->telefono2)
{
$row['campo2'] = "<b>Teléfonos:</b> ".$this->cliente->telefono1.' '.$this->cliente->telefono2;
$row['campo2'] = "<b>Teléfonos:</b> ".$this->cliente->telefono1;
if($this->cliente->telefono2)
{
$row['campo2'] .= ' '.$this->cliente->telefono2;
}
}
else if($this->cliente->telefono2)
{
$row['campo2'] = "<b>Teléfonos:</b> ".$this->cliente->telefono2;
}
$pdf_doc->add_table_row($row);

Expand All @@ -568,6 +576,12 @@ private function generar_pdf_presupuesto($archivo = FALSE)
/// lineas + observaciones
$this->generar_pdf_lineas($pdf_doc, $lineas, $linea_actual, $lppag, $this->presupuesto);

/// ¿Fecha de validez?
if($this->presupuesto->finoferta)
{
$pdf_doc->pdf->ezText( "\n<b>".ucfirst(FS_PRESUPUESTO).' válido hasta:</b> '.$this->presupuesto->finoferta, 10 );
}

$pdf_doc->set_y(80);

if( !isset($_GET['noval']) )
Expand Down Expand Up @@ -862,9 +876,17 @@ private function generar_pdf_pedido($archivo = FALSE)
' - '.$this->pedido->ciudad.' ('.$this->pedido->provincia.')'),
'campo2' => ''
);
if($this->cliente->telefono1 OR $this->cliente->telefono1)
if($this->cliente->telefono1 OR $this->cliente->telefono2)
{
$row['campo2'] = "<b>Teléfonos:</b> ".$this->cliente->telefono1;
if($this->cliente->telefono2)
{
$row['campo2'] .= ' '.$this->cliente->telefono2;
}
}
else if($this->cliente->telefono2)
{
$row['campo2'] = "<b>Teléfonos:</b> ".$this->cliente->telefono1.' '.$this->cliente->telefono2;
$row['campo2'] = "<b>Teléfonos:</b> ".$this->cliente->telefono2;
}
$pdf_doc->add_table_row($row);

Expand Down
2 changes: 1 addition & 1 deletion controller/ventas_pedido.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

require_model('albaran_cliente.php');
require_model('articulo.php');
require_model('cliente.php');
require_model('divisa.php');
require_model('ejercicio.php');
require_model('albaran_cliente.php');
require_model('fabricante.php');
require_model('familia.php');
require_model('forma_pago.php');
Expand Down
2 changes: 1 addition & 1 deletion facturascripts.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 58
version = 59
version_url = "https://raw.githubusercontent.com/neorazorx/presupuestos_y_pedidos/master/facturascripts.ini"
update_url = "https://github.com/neorazorx/presupuestos_y_pedidos/archive/master.zip"
require = 'facturacion_base'
1 change: 1 addition & 0 deletions view/compras_pedido.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<script type="text/javascript">
numlineas = {function="count($fsc->pedido->get_lineas())"};
fs_nf0 = {#FS_NF0#};
fs_nf0_art = {#FS_NF0_ART#};
all_impuestos = {function="json_encode($fsc->impuesto->all())"};
all_series = {function="json_encode($fsc->serie->all())"};
proveedor = {function="json_encode($fsc->proveedor_s)"};
Expand Down
1 change: 1 addition & 0 deletions view/ventas_pedido.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<script type="text/javascript">
numlineas = {function="count($fsc->pedido->get_lineas())"};
fs_nf0 = {#FS_NF0#};
fs_nf0_art = {#FS_NF0_ART#};
all_impuestos = {function="json_encode($fsc->impuesto->all())"};
all_series = {function="json_encode($fsc->serie->all())"};
cliente = {function="json_encode($fsc->cliente_s)"};
Expand Down
3 changes: 2 additions & 1 deletion view/ventas_presupuesto.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<script type="text/javascript">
numlineas = {function="count($fsc->presupuesto->get_lineas())"};
fs_nf0 = {#FS_NF0#};
fs_nf0_art = {#FS_NF0_ART#};
all_impuestos = {function="json_encode($fsc->impuesto->all())"};
all_series = {function="json_encode($fsc->serie->all())"};
cliente = {function="json_encode($fsc->cliente_s)"};
Expand Down Expand Up @@ -264,7 +265,7 @@
</div>
<div class="col-md-2 col-sm-3">
<div class='form-group{if="$fsc->presupuesto->finoferta()"} has-warning{/if}'>
Fecha validez:
Válido hasta:
{if="$fsc->presupuesto->editable"}
<div class='input-group'>
<input class="form-control datepicker" type="text" name="finoferta" value="{$fsc->presupuesto->finoferta}" autocomplete="off"/>
Expand Down

0 comments on commit 92b5504

Please sign in to comment.