Jump to content

Ceros a la izquierda en la factura


FALEX77

Recommended Posts

Buenas tardes 

Estoy terminando un proyecto en prestashop 1.6 y tengo un inconveniente con el numero de las facturas que se generan , por cuestiones legales en mi país (Colombia) me exigen que las facturas no deben llevar ceros (00001) a la izquierda solo debe llevar el numero de la factura (1) agradezco quien me pueda colaborar para modificar.

Link to comment
Share on other sites

Classes/pdf/HTMLTemplateInvoice.php

 

quitas esto 

 

antes

$this->title = HTMLTemplateInvoice::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, (int)$this->order->id_shop).sprintf('%06d', $order_invoice->number);

despues

$this->title = HTMLTemplateInvoice::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, (int)$this->order->id_shop).sprintf( $order_invoice->number);
Link to comment
Share on other sites

 

Classes/pdf/HTMLTemplateInvoice.php

 

quitas esto 

 

antes

$this->title = HTMLTemplateInvoice::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, (int)$this->order->id_shop).sprintf('%06d', $order_invoice->number);

despues

$this->title = HTMLTemplateInvoice::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, (int)$this->order->id_shop).sprintf( $order_invoice->number);

 

Muchas gracias por tu solución, ya lo pude lograr

Link to comment
Share on other sites

  • 2 months later...
  • 8 months later...

Hola,

 

Gracias por tu respuesta. Quería preguntarte si sabes cómo hacerlo en Prestashop 1.6. Veo el código un poco diferente:

 

En 

public function __construct(OrderInvoice $order_invoice, $smarty)

Encuentro:

$this->title = sprintf(HTMLTemplateInvoice::l('Invoice #%1$s%2$06d'), $prefix, $order_invoice->number);

Y en 

public function getFilename()
return Configuration::get('PS_INVOICE_PREFIX', Context::getContext()->language->id, null, $this->order->id_shop).sprintf('%06d', $this->order_invoice->number).'.pdf';

Gracias!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...