Ok, I found a workaround I can live with until editable invoice dates are implemented. I simply use the order date as invoice date like:
in invoice.php of Modern:
// set $display date & label to user setting
if ( $date_setting == 'invoice_date' ) {
$display_date = $wpo_wcpdf->get_invoice_date();
$display_date_label = __( 'Invoice Date:', 'wpo_wcpdf' );
} else {
$display_date = $wpo_wcpdf->get_order_date();
// FIXME workaround: Use editable Bestelldatum for Rechnungsdatum
// $display_date_label = __( 'Order Date:', 'wpo_wcpdf' );
$display_date_label = __( 'Invoice Date:', 'wpo_wcpdf' );
}
and in packing-slip.php:
<table class="invoice-info">
<tr>
<td><?php _e( 'Order Number:', 'wpo_wcpdf' ); ?></td>
<td><?php $wpo_wcpdf->order_number(); ?></td>
</tr>
<tr>
<!-- FIXME workaround: Use editable Bestelldatum for Rechnungsdatum -->
<!-- <td><?php _e( 'Order Date:', 'wpo_wcpdf' ); ?></td> -->
<td><?php _e( 'Invoice Date:', 'wpo_wcpdf' ); ?></td>
<td><?php echo $wpo_wcpdf->get_order_date(); ?></td>
</tr>
</table>
BTW, in packing-slip.php you are not using get_invoice_date() method like in invoice.php but retrieve the date from mysql directly. I think you should refactor this.
<td><?php echo date_i18n( 'j-n-Y', strtotime( $wpo_wcpdf->export->order->order_date )); ?></td>