Viewing 6 replies - 1 through 6 (of 6 total)
  • alemarengo84

    (@alemarengo84)

    Hi guys.
    I need to fix this too.
    Due to Italian law, I MUST print invoice date, instead of only order date.
    Is it possible to customize or add any field for this?
    I hope so! ??
    Waiting for your kind support, regards!

    alemarengo84

    (@alemarengo84)

    Hey!
    I managed to get this kind of data!
    I added the following piece of code within wcdn-template-functions.php

    $fields['invoice_date'] = array(
    	'label' => __( 'Invoice date', 'woocommerce-delivery-notes' ),
    	'value' => date( get_option( 'date_format', 'F j, Y' ) )
    );

    I put it in line 228. Eureka!

    With this piece of code, invoice date output matches the day when you print invoice.

    @alemarengo84 nice hack but i wouldn’t edit plugin files, it’s not update proof. you could edit the template by copying it. but there is even an easier solution via a filter in functions.php:

    https://www.ads-software.com/support/topic/invoice-data?replies=3

    the invoice date is generated when you print the invoice for the first time.

    alemarengo84

    (@alemarengo84)

    piffpaffpuff, thanks for your reply.
    The point is that my business consultant told me that the progressive number invoice number should match invoice date too. I cannot print an invoice for order n.3 on the 31st of a month and another invoice for order n.4 on the 3rd day of the same month, I should match order number and invoice date.
    That’s what generated my request. ??

    maybe i don’t seem to understand you right but the thin is programmed like that:

    when you print the invoice for the first time, the invoice date and invoice number are generated automatically. they will be saved and can’t be changed later. example: print invoice 3 and it wlll have a date of ie. the 26th november, print invoice 4 the next day and it will be dated the 27th.

    this means, your case can’t ever happen.

    Hi piffpaffpuff.
    Thanks for your reply.
    Sorry to reply so late, I was doing it but within another thread whose topic relates to invoice date.
    I have to, or better now I must find a fix for this.
    I realized that, as you wrote to me previously, invoice date is generated once it is printed for its first time, right?
    Ok… assuming that it is non-editable thing, is it possible to use your snippet in order to add a row right below order date row in order to show the same date of the order?
    That said, I could even translate “Order date” with the Italian for “Invoice date” and everything will be fine.

    Lastly, but not for importance, I’d like you to help me discover what may have happened to my ecommerce since during the last days, at the very moment I was saving invoices in order to be sent to my business consultant, something goes wrong and I found that order date and invoice counter are not linked together. For instance, an order that was placed in december has taken an invoice number of November.

    What may have caused this?
    Everything has worked perfectly till now.

    If you could help me, I’ll be grateful.

    Best regards.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Invoice Date’ is closed to new replies.