Hello, in Germany we need an Invocie Date (Rechnungsdatum) on the form, to be able to send the invocie to customers. For now there is only a field with Order Number (Bestellnummer). Is there a possibility to add another field with Invoice Date?
Best regards, Antonia
]]>Hello,
we are using the OCEAN WP Theme. So it is not possible to costumize the invoice-layout.
We would also be happy if it is possible to implement a individual invoice number beside the order number, as the regulations in Germany prescribe a consecutive invoice-number.
Thank you in advance for your support.
Hi there,
I also need to generate credit notes. Is it possible to generate credit notes with this plugin too?
I am looking forward to hearing from you soon!
Many thanks in advance!
Br, Alex
Hi! We are using PDF Invoices & Packing Slips for WooCommerce to create our invoices. Is there a way to combine your plugin with theirs to make invoices compliant with the new regulations?
Thanks for your help!
]]>Hey there!
Thanks for your work and for the plugin. It seems to work great, easy installation as well.
We have following problem: In Germany, invoice numbers must be consecutive, there must be no gaps. The plugin uses the order number, which unfortunately does not correspond to this principle in WooCommerce.
Are there plans to integrate separate invoice numbers? A simple integration would be conceivable in the following way, for example (still to be extended, e.g. with a separate number format or similar).
// Add a sequential invoice number to the order
add_action( 'woocommerce_checkout_update_order_meta', 'add_sequential_invoice_number' );
function add_sequential_invoice_number( $order_id ) {
// Retrieve the current invoice number, increment it by 1
$invoice_number = get_option( 'woocommerce_invoice_number', 0 ) + 1;
// Update the order meta with the new invoice number
update_post_meta( $order_id, '_invoice_number', $invoice_number );
// Update the stored option for the next invoice number
update_option( 'woocommerce_invoice_number', $invoice_number );
}
// Display the invoice number in the admin order details
add_action( 'woocommerce_admin_order_data_after_order_details', 'display_invoice_number_in_admin_order_meta' );
function display_invoice_number_in_admin_order_meta( $order ) {
// Retrieve the invoice number from the order meta
$invoice_number = get_post_meta( $order->get_id(), '_invoice_number', true );
// Display the invoice number if it exists
if ( $invoice_number ) {
echo '<p><strong>Invoice Number:</strong> ' . esc_html( $invoice_number ) . '</p>';
}
}
// Add "Invoice Number" column to the orders overview
add_filter( 'manage_woocommerce_page_wc-orders_columns', 'add_invoice_number_column_to_orders' );
function add_invoice_number_column_to_orders( $columns ) {
$reordered_columns = array();
// Insert the "Invoice Number" column after the "Status" column
foreach ( $columns as $key => $column ) {
$reordered_columns[$key] = $column;
if ( $key === 'order_status' ) {
$reordered_columns['invoice_number'] = __( 'Invoice Number', 'theme_domain' );
}
}
return $reordered_columns;
}
// Display content of the invoice number column
add_action( 'manage_woocommerce_page_wc-orders_custom_column', 'display_invoice_number_column_content', 10, 2 );
function display_invoice_number_column_content( $column, $order ) {
// Check if the current column is "invoice_number"
if ( 'invoice_number' === $column ) {
// Retrieve the invoice number from the order meta
$invoice_number = get_post_meta( $order->get_id(), '_invoice_number', true );
// Display the invoice number or a dash if it's empty
if ( ! empty( $invoice_number ) ) {
echo esc_html( $invoice_number );
} else {
echo '-';
}
}
}
]]>