WooCommerce PDF Invoices - Version 1.1.0

Version Description

  • February 3, 2014 =

  • Added: Choose to display product SKU.

  • Added: Choose to display notes.

  • Added: Choose your desired invoice number format.

  • Added: Attach invoice to admin "New Order" email type.

  • Added: Input your desired VAT rates to display.

  • Added: Sequential invoice numbers.

  • Improved: Display and calucatlion of VAT rates.

  • Fixed: Translation

  • Fixed: Product SKU

Download this release

Release Info

Developer baaaaas
Plugin Icon 128x128 WooCommerce PDF Invoices
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.2 to 1.1.0

assets/css/admin-styles.css CHANGED
@@ -1,3 +1,39 @@
1
- .delete{
2
- position: absolute; top: 16px; right: 0px; background: #f7f7f7; border: 1px solid #d5d5d5; padding: 1px;
 
3
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ textarea{
2
+ width:670px;
3
+ height:90px;
4
  }
5
+ input[type='text']{
6
+ width:670px;
7
+ margin-bottom:7px;
8
+ }
9
+ select{
10
+ margin-bottom:7px;
11
+ }
12
+ #selectEmailType{
13
+ width: 210px;
14
+ }
15
+ #custom-logo-wrap{
16
+ position: relative;
17
+ display: inline-block;
18
+ padding-top: 16px;
19
+ }
20
+ #custom-logo-wrap:hover #delete{
21
+ display: block;
22
+ }
23
+ #uploadFile{
24
+ width: 660px;
25
+ margin-bottom: 7px;
26
+ }
27
+ #delete{
28
+ position: absolute;
29
+ top: 16px;
30
+ right: 0px;
31
+ background: #f7f7f7;
32
+ border: 1px solid #d5d5d5;
33
+ padding: 1px;
34
+ display: none;
35
+ }
36
+ .notes{
37
+ font-style: italic;
38
+ color: grey;
39
+ }
assets/screenshot-1.png ADDED
Binary file
assets/screenshot-2.png ADDED
Binary file
assets/screenshot-3.png ADDED
Binary file
includes/class-admin.php CHANGED
@@ -1,31 +1,35 @@
1
  <?php
2
-
3
  class BEWPI_Admin {
4
 
5
- function __construct() {
6
- add_action( 'admin_init', array($this, 'register_settings' ));
7
- add_action( 'admin_menu', array($this, 'add_menu_item'));
8
- add_action('init', array($this, 'load_textdomain_for_woocommerce_pdf_invoices'));
9
  add_action( 'admin_notices', array($this, 'woocommerce_pdf_invoices_admin_notices' ));
10
- }
11
 
12
  function woocommerce_pdf_invoices_admin_notices() {
13
  settings_errors( 'woocommerce_pdf_invoices_notices' );
14
  }
15
 
16
- function load_textdomain_for_woocommerce_pdf_invoices() {
17
- load_plugin_textdomain('woocommerce-pdf-invoices', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
18
  }
19
 
20
- function register_settings() {
21
- register_setting( 'be_woocommerce_pdf_invoices', 'be_woocommerce_pdf_invoices', array($this, 'validate_settings'));
22
- }
23
 
24
- function add_menu_item() {
25
- add_submenu_page( 'woocommerce', 'Invoices by Bas Elbers', 'Invoices', 'manage_options', 'bewpi', array($this, 'show_settings_page') );
26
- }
 
27
 
28
- function validate_settings($settings) {
 
 
 
 
 
 
29
  $old_settings = get_option('be_woocommerce_pdf_invoices');
30
  $errors;
31
 
@@ -51,10 +55,10 @@ class BEWPI_Admin {
51
  }
52
 
53
  return $settings;
54
- }
55
 
56
- public function show_settings_page() {
57
- $options = bewpi_get_options();
58
- include BEWPI_PLUGIN_DIR . 'includes/views/settings-page.php';
59
- }
60
  }
1
  <?php
 
2
  class BEWPI_Admin {
3
 
4
+ function __construct() {
5
+ add_action( 'admin_init', array($this, 'register_settings' ));
6
+ add_action( 'admin_menu', array($this, 'add_menu_item'));
 
7
  add_action( 'admin_notices', array($this, 'woocommerce_pdf_invoices_admin_notices' ));
8
+ }
9
 
10
  function woocommerce_pdf_invoices_admin_notices() {
11
  settings_errors( 'woocommerce_pdf_invoices_notices' );
12
  }
13
 
14
+ function register_settings() {
15
+ register_setting( 'be_woocommerce_pdf_invoices', 'be_woocommerce_pdf_invoices', array($this, 'validate_settings'));
16
  }
17
 
18
+ function add_menu_item() {
19
+ $page = add_submenu_page( 'woocommerce', 'Invoices by Bas Elbers', 'Invoices', 'manage_options', 'bewpi', array($this, 'show_settings_page') );
 
20
 
21
+ // Nieuwe functionaliteit
22
+ add_action( 'admin_print_styles-' . $page, array($this, 'woocommerce_pdf_invoices_admin_styles' ));
23
+ // Einde
24
+ }
25
 
26
+ // Nieuwe functionaliteit
27
+ function woocommerce_pdf_invoices_admin_styles() {
28
+ wp_enqueue_style( 'AdminStylesheet', plugins_url()."/woocommerce-pdf-invoices/assets/css/admin-styles.css" );
29
+ }
30
+ // Einde
31
+
32
+ function validate_settings($settings) {
33
  $old_settings = get_option('be_woocommerce_pdf_invoices');
34
  $errors;
35
 
55
  }
56
 
57
  return $settings;
58
+ }
59
 
60
+ public function show_settings_page() {
61
+ $options = bewpi_get_options();
62
+ include BEWPI_PLUGIN_DIR . 'includes/views/settings-page.php';
63
+ }
64
  }
includes/class-invoice.php CHANGED
@@ -6,45 +6,97 @@ function __construct(){
6
  add_filter( 'woocommerce_email_attachments', array($this, 'generate_invoice'),10,3 );
7
  }
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  function generate_invoice($val, $id, $order){
10
  $options = get_option('be_woocommerce_pdf_invoices');
11
 
12
- if($id == $options['email_type'])
13
- {
14
- include(BEWPI_PLUGIN_DIR . '/mpdf/mpdf.php');
15
 
16
- $items = $order->get_items();
 
17
 
18
- $today = date('d');
 
19
 
 
 
 
 
 
 
 
 
20
  $month = date('m');
21
-
22
  $year = date('Y');
23
-
24
  //$current_date = date('d-m-Y');
25
 
 
26
  $order_number = str_replace("#", "", $order->get_order_number());
 
27
 
28
- $invoice_number = $year . $order_number;
29
-
30
- $purchase_note = $order->customer_note;
31
 
 
32
  $billing_address = $order->get_formatted_billing_address();
33
-
34
  $shipping_address = $order->get_formatted_shipping_address();
35
 
 
36
  $order_total = $order->get_total();
37
-
38
  $total_tax = $order->get_total_tax();
39
-
40
  $order_subtotal = $order_total - $total_tax;
41
 
42
- $mpdf = new mPDF('win-1252','A4','','',20,15,48,25,10,10);
43
- $mpdf->useOnlyCoreFonts = true; // false is default
44
- $mpdf->SetProtection(array('print'));
45
- $mpdf->SetDisplayMode('fullpage');
 
46
 
47
- // The HTML PDF invoice
48
  ob_start();
49
  ?>
50
  <html>
@@ -126,6 +178,7 @@ function generate_invoice($val, $id, $order){
126
  </tr>
127
  </table>
128
  <br/>
 
129
  <table>
130
  <tr>
131
  <td>
@@ -134,51 +187,73 @@ function generate_invoice($val, $id, $order){
134
  </td>
135
  </tr>
136
  </table>
 
137
  <br/>
138
  <br/>
139
  <table class="items" width="100%" style="font-size: 9pt; border-collapse: collapse;" cellpadding="8">
140
  <thead>
141
  <tr style="font-weight: bold">
142
- <td width="15%"><?php echo __( 'SKU', 'woocommerce-pdf-invoices' ); ?></td>
143
- <td width="10%"><?php echo __( 'QUANTITY', 'woocommerce-pdf-invoices' ); ?></td>
144
- <td width="45%"><?php echo __( 'DESCRIPTION', 'woocommerce-pdf-invoices' ); ?></td>
145
- <td width="15%"><?php echo __( 'UNIT PRICE', 'woocommerce-pdf-invoices' ); ?></td>
146
- <td width="15%"><?php echo __( 'TOTAL', 'woocommerce-pdf-invoices' ); ?></td>
 
 
 
147
  </tr>
148
  </thead>
149
  <tbody>
150
  <!-- ITEMS HERE -->
151
- <?php foreach ( $items as $item ) {
152
- $item_subtotal = $order->get_item_subtotal($item);
153
- $item_total = $item['qty'] * $item_subtotal;
154
- $formatted_item_subtotal = woocommerce_price($item_subtotal);
155
- $formatted_item_total = woocommerce_price($item_total); ?>
 
 
 
 
 
 
 
 
 
 
156
  <tr>
157
- <td align='center'><?php echo $item['product_id']; ?></td>
158
- <td align='center'><?php echo $item['qty']; ?></td>
 
159
  <td><?php echo $item['name']; ?></td>
160
- <td align='right'><?php echo $formatted_item_subtotal; ?></td>
161
- <td align='right'><?php echo $formatted_item_total; ?></td>
 
162
  </tr>
163
  <?php } ?>
164
  <!-- END ITEMS HERE -->
165
  <tr>
166
- <td class="blanktotal" colspan="3" rowspan="6"></td>
167
- <td class="totals"><?php echo __( 'SUBTOTAL', 'woocommerce-pdf-invoices' ); ?></td>
168
- <td class="totals"><?php echo woocommerce_price($order_subtotal); ?></td>
169
  </tr>
170
- <?php if(get_option( 'woocommerce_calc_taxes' ) == 'yes') { ?>
171
  <tr>
172
- <td class="totals"><?php echo __( 'SALES TAX', 'woocommerce-pdf-invoices' ); ?></td>
173
- <td class="totals"><?php echo woocommerce_price($total_tax); ?></td>
174
  </tr>
175
- <?php } ?>
176
  <tr>
177
- <td class="totals"><?php echo __( 'SHIPPING & HANDLING', 'woocommerce-pdf-invoices' ); ?></td>
178
  <td class="totals"><?php echo woocommerce_price($order->get_shipping()); ?></td>
179
  </tr>
 
 
 
 
 
 
 
 
180
  <tr>
181
- <td class="totals"><?php echo __( 'TOTAL DUE', 'woocommerce-pdf-invoices' ); ?></td>
182
  <td class="totals"><?php echo woocommerce_price($order->get_total()); ?></td>
183
  </tr>
184
  </tbody>
@@ -208,7 +283,7 @@ function generate_invoice($val, $id, $order){
208
  $output = ob_get_contents();
209
  ob_end_clean();
210
 
211
- // Yeah baby, do the trick!
212
  $mpdf->WriteHTML($output);
213
 
214
  // Get upload folder and create filename.
6
  add_filter( 'woocommerce_email_attachments', array($this, 'generate_invoice'),10,3 );
7
  }
8
 
9
+ // SEQUENTIAL INVOICE NUMBERS
10
+ function set_sequential_invoice_number( $post_id ) {
11
+ global $wpdb;
12
+ $invoice_number = get_post_meta( $post_id, '_bewpi_invoice_number', true );
13
+
14
+ if($invoice_number == ""){
15
+ // attempt the query up to 3 times for a much higher success rate if it fails (due to Deadlock)
16
+ $success = false;
17
+ for ( $i = 0; $i < 3 && ! $success; $i++ ) {
18
+ // this seems to me like the safest way to avoid order number clashes
19
+ $query = $wpdb->prepare( "
20
+ INSERT INTO {$wpdb->postmeta} (post_id, meta_key, meta_value)
21
+ SELECT %d, '_bewpi_invoice_number', IF( MAX( CAST( meta_value as UNSIGNED ) ) IS NULL, 1, MAX( CAST( meta_value as UNSIGNED ) ) + 1 )
22
+ FROM {$wpdb->postmeta}
23
+ WHERE meta_key='_bewpi_invoice_number'",
24
+ $post_id );
25
+ $success = $wpdb->query( $query );
26
+ }
27
+ }
28
+ }
29
+
30
+ function get_invoice_number($post_id){
31
+ return get_post_meta( $post_id, '_bewpi_invoice_number', true );
32
+ }
33
+
34
+ function get_formatted_invoice_number($number, $option){
35
+ $today = date('d');
36
+ $month = date('m');
37
+ $year = date('Y');
38
+ $number = sprintf("%04s", $number);
39
+
40
+ switch($option){
41
+ case 1:
42
+ $invoice_number = $year.$month.$today."-".$number;
43
+ break;
44
+ case 2:
45
+ $year = substr($year, -2);
46
+ $invoice_number = $year."-".$number;
47
+ break;
48
+ }
49
+ return $invoice_number;
50
+ }
51
+ // END SEQUENTIAL INVOICE NUMBERS
52
+
53
  function generate_invoice($val, $id, $order){
54
  $options = get_option('be_woocommerce_pdf_invoices');
55
 
56
+ if($id == $options['email_type'] || $id == $options['attach_to_new_order']){
 
 
57
 
58
+ // Update db with sequential invoice number
59
+ $this->set_sequential_invoice_number($order_number);
60
 
61
+ // The library for generating HTML PDF files
62
+ include(BEWPI_PLUGIN_DIR . '/mpdf/mpdf.php');
63
 
64
+ // Some PDF settings..
65
+ $mpdf = new mPDF('win-1252','A4','','',20,15,48,25,10,10);
66
+ $mpdf->useOnlyCoreFonts = true; // false is default
67
+ $mpdf->SetProtection(array('print'));
68
+ $mpdf->SetDisplayMode('fullpage');
69
+
70
+ // Dates
71
+ $today = date('d');
72
  $month = date('m');
 
73
  $year = date('Y');
 
74
  //$current_date = date('d-m-Y');
75
 
76
+ // Get order number and order items
77
  $order_number = str_replace("#", "", $order->get_order_number());
78
+ $items = $order->get_items();
79
 
80
+ // Get invoice number from db and create format
81
+ $number = $this->get_invoice_number($order_number);
82
+ $invoice_number = $this->get_formatted_invoice_number($number, $options['invoice_number']);
83
 
84
+ // Addresses
85
  $billing_address = $order->get_formatted_billing_address();
 
86
  $shipping_address = $order->get_formatted_shipping_address();
87
 
88
+ // Money money moneeeeey
89
  $order_total = $order->get_total();
 
90
  $total_tax = $order->get_total_tax();
 
91
  $order_subtotal = $order_total - $total_tax;
92
 
93
+ // Get the vat rates
94
+ if($options['vat_rates']){ $vat_rates = explode(',', $options['vat_rates']); }
95
+
96
+ // For displaying the table the wright way
97
+ $rowspan = count($vat_rates) + 4;
98
 
99
+ // Yeah! Let's do it!
100
  ob_start();
101
  ?>
102
  <html>
178
  </tr>
179
  </table>
180
  <br/>
181
+ <?php if($options['display_customer_notes'] == 'yes'){ ?>
182
  <table>
183
  <tr>
184
  <td>
187
  </td>
188
  </tr>
189
  </table>
190
+ <?php } ?>
191
  <br/>
192
  <br/>
193
  <table class="items" width="100%" style="font-size: 9pt; border-collapse: collapse;" cellpadding="8">
194
  <thead>
195
  <tr style="font-weight: bold">
196
+ <?php if($options['display_SKU'] == 'yes'){
197
+ $colspan = 3; ?>
198
+ <td width="15%"><?php _e( 'SKU', 'woocommerce-pdf-invoices' ); ?></td>
199
+ <?php } else { $colspan = 2; } ?>
200
+ <td width="45%"><?php _e( 'Description', 'woocommerce-pdf-invoices' ); ?></td>
201
+ <td width="10%"><?php _e( 'Quantity', 'woocommerce-pdf-invoices' ); ?></td>
202
+ <td width="15%"><?php _e( 'Unit price', 'woocommerce-pdf-invoices' ); ?></td>
203
+ <td width="15%"><?php _e( 'Total', 'woocommerce-pdf-invoices' ); ?></td>
204
  </tr>
205
  </thead>
206
  <tbody>
207
  <!-- ITEMS HERE -->
208
+ <?php
209
+ $total_order_discount = $order->get_total_discount();
210
+ $order_subtotal_excl_tax =- $total_order_discount;
211
+
212
+ foreach ( $items as $item ) {
213
+ $product = get_product($item['product_id']);
214
+
215
+ $item_tax = $order->get_item_tax($item, true);
216
+ $item_unit_price_incl_tax = $order->get_item_subtotal($item, false, false);
217
+ $item_unit_price_excl_tax = $item_unit_price_incl_tax - $item_tax;
218
+ $item_total_price_excl_tax = $item['qty'] * $item_unit_price_excl_tax;
219
+
220
+ $order_subtotal_excl_tax += $item_total_price_excl_tax;
221
+ ?>
222
+
223
  <tr>
224
+ <?php if($options['display_SKU'] == 'yes'){ ?>
225
+ <td align='center'><?php echo $product->get_sku(); ?></td>
226
+ <?php } ?>
227
  <td><?php echo $item['name']; ?></td>
228
+ <td align='center'><?php echo $item['qty']; ?></td>
229
+ <td align='right'><?php echo woocommerce_price($item_unit_price_excl_tax); ?></td>
230
+ <td align='right'><?php echo woocommerce_price($item_total_price_excl_tax); ?></td>
231
  </tr>
232
  <?php } ?>
233
  <!-- END ITEMS HERE -->
234
  <tr>
235
+ <td class="blanktotal" colspan="<?php echo $colspan; ?>" rowspan="<?php echo $rowspan; ?>"></td>
236
+ <td class="totals"><?php _e( 'Discount', 'woocommerce-pdf-invoices' ); ?></td>
237
+ <td class="totals"><?php echo woocommerce_price($total_order_discount); ?></td>
238
  </tr>
 
239
  <tr>
240
+ <td class="totals"><?php _e( 'Subtotal', 'woocommerce-pdf-invoices' ); ?></td>
241
+ <td class="totals"><?php echo woocommerce_price($order_subtotal_excl_tax); ?></td>
242
  </tr>
 
243
  <tr>
244
+ <td class="totals"><?php _e( 'Shipping', 'woocommerce-pdf-invoices' ); ?></td>
245
  <td class="totals"><?php echo woocommerce_price($order->get_shipping()); ?></td>
246
  </tr>
247
+ <?php
248
+ if($vat_rates != 0){
249
+ foreach($vat_rates as $rate){ ?>
250
+ <tr>
251
+ <td class="totals"><?php echo sprintf( __( 'VAT %s%%', 'woocommerce-pdf-invoices'), $rate ); ?></td>
252
+ <td class="totals"><?php echo woocommerce_price(($order->get_total() / (100+$rate)) * $rate); ?></td>
253
+ </tr>
254
+ <?php }} ?>
255
  <tr>
256
+ <td class="totals"><?php _e( 'Grand Total', 'woocommerce-pdf-invoices' ); ?></td>
257
  <td class="totals"><?php echo woocommerce_price($order->get_total()); ?></td>
258
  </tr>
259
  </tbody>
283
  $output = ob_get_contents();
284
  ob_end_clean();
285
 
286
+ // Do the trick!
287
  $mpdf->WriteHTML($output);
288
 
289
  // Get upload folder and create filename.
includes/plugin.php CHANGED
@@ -1,11 +1,12 @@
1
  <?php
2
 
3
  function bewpi_get_options(){
4
- static $options;
5
 
6
- if(!$options){
7
- $defaults = array(
8
  'email_type' => '',
 
9
  'company_name' => get_option('woocommerce_email_from_name'),
10
  'company_slogan' => '',
11
  'file_upload' => '',
@@ -17,19 +18,29 @@ function bewpi_get_options(){
17
  'email' => '',
18
  'extra_company_info' => '',
19
  'extra_info' => '',
20
- );
 
 
 
 
21
 
22
- // Get options from database.
23
- $db_option = get_option('be_woocommerce_pdf_invoices', array());
24
 
25
- if(!$db_option) {
26
- update_option('be_woocommerce_pdf_invoices', $defaults);
27
- }
28
 
29
- $options = wp_parse_args($db_option, $defaults);
30
- }
31
 
32
  return $options;
33
  }
34
 
 
 
 
 
 
 
35
  ?>
1
  <?php
2
 
3
  function bewpi_get_options(){
4
+ static $options;
5
 
6
+ if(!$options){
7
+ $defaults = array(
8
  'email_type' => '',
9
+ 'attach_to_new_order' => '',
10
  'company_name' => get_option('woocommerce_email_from_name'),
11
  'company_slogan' => '',
12
  'file_upload' => '',
18
  'email' => '',
19
  'extra_company_info' => '',
20
  'extra_info' => '',
21
+ 'vat_rates' => '',
22
+ 'display_customer_notes' => '',
23
+ 'display_SKU' => '',
24
+ 'invoice_number' => '',
25
+ );
26
 
27
+ // Get options from database.
28
+ $db_option = get_option('be_woocommerce_pdf_invoices', array());
29
 
30
+ if(!$db_option) {
31
+ update_option('be_woocommerce_pdf_invoices', $defaults);
32
+ }
33
 
34
+ $options = wp_parse_args($db_option, $defaults);
35
+ }
36
 
37
  return $options;
38
  }
39
 
40
+ function bewpi_load_textdomain() {
41
+ load_plugin_textdomain('woocommerce-pdf-invoices', false, 'woocommerce-pdf-invoices/lang/' );
42
+ }
43
+
44
+ add_action('plugins_loaded', 'bewpi_load_textdomain');
45
+
46
  ?>
includes/views/settings-page.php CHANGED
@@ -5,123 +5,148 @@
5
  document.getElementById('hiddenField').value = '';
6
  }
7
  </script>
8
- <style>
9
- textarea{
10
- width:670px;
11
- height:90px;
12
- }
13
- input[type='text']{
14
- width:670px;
15
- margin-bottom:7px;
16
- }
17
- select{
18
- margin-bottom:7px;
19
- }
20
- </style>
21
  <div class="wrap">
22
  <h3>WooCommerce PDF Invoices Settings</h3>
23
  <p>Please fill in the settings below. WooCommerce PDF Invoices generates a PDF invoice based upon the customer order and attaches it to an email type of your choice.</p>
24
-
25
  <form method="post" action="options.php" enctype="multipart/form-data">
26
  <?php
27
  settings_fields( 'be_woocommerce_pdf_invoices' );
28
  do_settings_sections( 'be_woocommerce_pdf_invoices' );
29
- $plugin_url = plugins_url();
 
 
30
  ?>
31
  <table class="form-table">
32
  <tr valign="top">
33
  <th scope="row"><strong>Email type:</strong></th>
34
  <td>
35
- <select style="width: 210px;" id="selectEmailType" name="be_woocommerce_pdf_invoices[email_type]">
36
  <option>-- Select --</option>
37
  <option value="customer_processing_order" <?php selected($options['email_type'], 'customer_processing_order'); ?>>Customer processing order</option>
38
  <option value="customer_completed_order" <?php selected($options['email_type'], 'customer_completed_order'); ?>>Customer completed order</option>
39
  <option value="customer_invoice" <?php selected($options['email_type'], 'customer_invoice'); ?>>Customer invoice</option>
40
  </select>
41
  <input type="hidden" id="hfEmailType" value="<?php echo esc_attr($options['email_type']); ?>" />
42
- <div style="font-style:italic;">
43
- <span style="color:grey;">Select the type of email to attach the invoice to.</span>
44
- <div>
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  </td>
46
  </tr>
47
-
48
  <tr valign="top">
49
  <th scope="row"><strong>Company name:</strong></th>
50
  <td>
51
  <input required type="text" size="40" name="be_woocommerce_pdf_invoices[company_name]" value="<?php echo $options['company_name']; ?>" /><br/>
52
- <div style="font-style:italic; margin-bottom:7px;">
53
- <span style="color:grey;">Add your company name here.</span>
54
- <div>
55
  </td>
56
  </tr>
57
-
58
  <tr valign="top">
59
  <th scope="row"><strong>Company slogan:</strong></th>
60
  <td>
61
  <input type="text" size="40" name="be_woocommerce_pdf_invoices[company_slogan]" value="<?php echo $options['company_slogan']; ?>" /><br/>
62
- <div style="font-style:italic;">
63
- <span style="color:grey;">Add your company slogan here. You can leave it blank.</span>
64
- <div>
65
  </td>
66
  </tr>
67
-
68
  <tr valign="top">
69
  <th scope="row"><strong>Custom logo:</strong></th>
70
  <td>
71
- <input style="width:660px; margin-bottom:7px;" type="file" name="logo" accept="image/*" /><br />
72
- <div style="font-style:italic;">
73
- <span style="color:grey;">Add your custom company logo. Please upload image with a size behond 50kB. You don't have to upload any, the plugin will use your company name.</span>
74
- <div>
75
  <?php if($options['file_upload'] != ''){ ?>
76
- <style>
77
- #delete{
78
- position: absolute; top: 16px; right: 0px; background: #f7f7f7; border: 1px solid #d5d5d5; padding: 1px; display: none;
79
- }
80
- #custom-logo-wrap:hover #delete{
81
- display: block;
82
- }
83
- </style>
84
- <div id="custom-logo-wrap" style="position: relative; display: inline-block; padding-top: 16px;">
85
  <img id="custom-logo" src="<?php echo esc_attr($options['file_upload']); ?>" /><br/ >
86
  <a href="#" title="Remove custom logo" onclick="removeImage();">
87
- <img id="delete" src="<?php echo $plugin_url.'/woocommerce/assets/images/icons/delete_10.png'?>" />
88
  </a>
89
  </div>
90
  <?php } ?>
91
  <input type="hidden" id="hiddenField" name="be_woocommerce_pdf_invoices[file_upload]" value="<?php echo esc_attr($options['file_upload']); ?>" />
92
  </td>
93
  </tr>
94
-
95
  <tr valign="top">
96
  <th scope="row"><strong>Company address:</strong></th>
97
  <td>
98
- <textarea required style="width:670px;" name="be_woocommerce_pdf_invoices[address]" ><?php echo esc_textarea($options['address']); ?></textarea><br/>
99
- <div style="font-style:italic;">
100
- <span style="color:grey;">Add your company address here.</span>
101
- <div>
102
  </td>
103
  </tr>
104
-
105
  <tr valign="top">
106
  <th scope="row"><strong>Additional company information:</strong></th>
107
  <td>
108
  <textarea name="be_woocommerce_pdf_invoices[extra_company_info]" rows=6 cols=120 ><?php echo esc_textarea($options['extra_company_info']); ?></textarea><br/>
109
- <div style="font-style:italic;">
110
- <span style="color:grey;">Add some additional company information like a email address, telephone number, company number and tax number. You can leave it blank.</span>
111
- <div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  </td>
113
  </tr>
114
-
115
  <tr valign="top">
116
  <th scope="row"><strong>Refunds policy, conditions etc.:</strong></th>
117
  <td>
118
  <textarea name="be_woocommerce_pdf_invoices[extra_info]" rows=6 cols=120 ><?php echo esc_textarea($options['extra_info']);?></textarea><br/>
119
- <div style="font-style:italic;">
120
- <span style="color:grey;">Add some policies, conditions etc. It will be placed beyond the products table. You can leave it blank.</span>
121
- <div>
122
  </td>
123
  </tr>
124
  </table>
125
  <?php submit_button(); ?>
 
 
 
 
 
 
 
 
126
  </form>
127
  </div>
5
  document.getElementById('hiddenField').value = '';
6
  }
7
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  <div class="wrap">
9
  <h3>WooCommerce PDF Invoices Settings</h3>
10
  <p>Please fill in the settings below. WooCommerce PDF Invoices generates a PDF invoice based upon the customer order and attaches it to an email type of your choice.</p>
 
11
  <form method="post" action="options.php" enctype="multipart/form-data">
12
  <?php
13
  settings_fields( 'be_woocommerce_pdf_invoices' );
14
  do_settings_sections( 'be_woocommerce_pdf_invoices' );
15
+ $today = date('d');
16
+ $month = date('m');
17
+ $year = date('Y');
18
  ?>
19
  <table class="form-table">
20
  <tr valign="top">
21
  <th scope="row"><strong>Email type:</strong></th>
22
  <td>
23
+ <select id="selectEmailType" name="be_woocommerce_pdf_invoices[email_type]">
24
  <option>-- Select --</option>
25
  <option value="customer_processing_order" <?php selected($options['email_type'], 'customer_processing_order'); ?>>Customer processing order</option>
26
  <option value="customer_completed_order" <?php selected($options['email_type'], 'customer_completed_order'); ?>>Customer completed order</option>
27
  <option value="customer_invoice" <?php selected($options['email_type'], 'customer_invoice'); ?>>Customer invoice</option>
28
  </select>
29
  <input type="hidden" id="hfEmailType" value="<?php echo esc_attr($options['email_type']); ?>" />
30
+ <div class="notes">
31
+ Select the type of email to attach the invoice to.
32
+ </div>
33
+ </td>
34
+ </tr>
35
+ <tr valign="top">
36
+ <th scope="row"><strong>Attach to New Order email type?</strong></th>
37
+ <td>
38
+ <select id="selectAdminNewOrder" name="be_woocommerce_pdf_invoices[attach_to_new_order]">
39
+ <option value="new_order" <?php selected($options['attach_to_new_order'], 'new_order'); ?>>Yes</option>
40
+ <option value="no" <?php selected($options['attach_to_new_order'], 'no'); ?>>No</option>
41
+ </select>
42
+ <input type="hidden" id="hfAdminNewOrder" value="<?php echo esc_attr($options['attach_to_new_order']); ?>" />
43
+ <div class="notes">
44
+ Determine to attach the invoice to the "New Order" email type for bookkeeping purposes.
45
+ </div>
46
  </td>
47
  </tr>
 
48
  <tr valign="top">
49
  <th scope="row"><strong>Company name:</strong></th>
50
  <td>
51
  <input required type="text" size="40" name="be_woocommerce_pdf_invoices[company_name]" value="<?php echo $options['company_name']; ?>" /><br/>
52
+ <div class="notes">Add your company name here.</div>
 
 
53
  </td>
54
  </tr>
 
55
  <tr valign="top">
56
  <th scope="row"><strong>Company slogan:</strong></th>
57
  <td>
58
  <input type="text" size="40" name="be_woocommerce_pdf_invoices[company_slogan]" value="<?php echo $options['company_slogan']; ?>" /><br/>
59
+ <div class="notes">Add your company slogan here. You can leave it blank.</div>
 
 
60
  </td>
61
  </tr>
 
62
  <tr valign="top">
63
  <th scope="row"><strong>Custom logo:</strong></th>
64
  <td>
65
+ <input id="uploadFile" type="file" name="logo" accept="image/*" /><br />
66
+ <div class="notes">Add your custom company logo. Please upload image with a size behond 50kB. You don't have to upload any, the plugin will use your company name.</div>
 
 
67
  <?php if($options['file_upload'] != ''){ ?>
68
+ <div id="custom-logo-wrap">
 
 
 
 
 
 
 
 
69
  <img id="custom-logo" src="<?php echo esc_attr($options['file_upload']); ?>" /><br/ >
70
  <a href="#" title="Remove custom logo" onclick="removeImage();">
71
+ <img id="delete" src="<?php echo plugins_url().'/woocommerce/assets/images/icons/delete_10.png'?>" />
72
  </a>
73
  </div>
74
  <?php } ?>
75
  <input type="hidden" id="hiddenField" name="be_woocommerce_pdf_invoices[file_upload]" value="<?php echo esc_attr($options['file_upload']); ?>" />
76
  </td>
77
  </tr>
 
78
  <tr valign="top">
79
  <th scope="row"><strong>Company address:</strong></th>
80
  <td>
81
+ <textarea required name="be_woocommerce_pdf_invoices[address]" ><?php echo esc_textarea($options['address']); ?></textarea><br/>
82
+ <div class="notes">Add your company address here.</div>
 
 
83
  </td>
84
  </tr>
 
85
  <tr valign="top">
86
  <th scope="row"><strong>Additional company information:</strong></th>
87
  <td>
88
  <textarea name="be_woocommerce_pdf_invoices[extra_company_info]" rows=6 cols=120 ><?php echo esc_textarea($options['extra_company_info']); ?></textarea><br/>
89
+ <div class="notes">Add some additional company information like a email address, telephone number, company number and tax number. You can leave it blank.</div>
90
+ </td>
91
+ </tr>
92
+ <th scope="row"><strong>Invoice number:</strong></th>
93
+ <td>
94
+ <select name="be_woocommerce_pdf_invoices[invoice_number]">
95
+ <option value="1" <?php selected($options['invoice_number'], '1'); ?>><?php echo $year.$month.$today."-0001" ?></option>
96
+ <option value="2" <?php selected($options['invoice_number'], '2'); ?>><?php echo substr($year, -2)."-0001" ?></option>
97
+ </select>
98
+ <input type="hidden" id="hfDisplayInvoiceNumber" value="<?php echo esc_attr($options['invoice_number']); ?>" />
99
+ <div class="notes">Choose how to generate the invoice number. Choose one of the example formats.</div>
100
+ </td>
101
+ </tr>
102
+ <tr valign="top">
103
+ <th scope="row"><strong>Display customer notes?</strong></th>
104
+ <td>
105
+ <select id="selectDisplayCustomerNotes" name="be_woocommerce_pdf_invoices[display_customer_notes]">
106
+ <option value="yes" <?php selected($options['display_customer_notes'], 'yes'); ?>>Yes</option>
107
+ <option value="no" <?php selected($options['display_customer_notes'], 'no'); ?>>No</option>
108
+ </select>
109
+ <input type="hidden" id="hfDisplayCustomerNotes" value="<?php echo esc_attr($options['display_customer_notes']); ?>" />
110
+ <div class="notes">
111
+ Choose to display customer notes.
112
+ </div>
113
+ </td>
114
+ </tr>
115
+ <th scope="row"><strong>Display SKU?</strong></th>
116
+ <td>
117
+ <select id="selectDisplaySKU" name="be_woocommerce_pdf_invoices[display_SKU]">
118
+ <option value="yes" <?php selected($options['display_SKU'], 'yes'); ?>>Yes</option>
119
+ <option value="no" <?php selected($options['display_SKU'], 'no'); ?>>No</option>
120
+ </select>
121
+ <input type="hidden" id="hfDisplaySKU" value="<?php echo esc_attr($options['display_SKU']); ?>" />
122
+ <div class="notes">
123
+ Choose to display SKU into table.
124
+ </div>
125
+ </td>
126
+ </tr>
127
+ <tr valign="top">
128
+ <th scope="row"><strong>VAT rates:</strong></th>
129
+ <td>
130
+ <textarea name="be_woocommerce_pdf_invoices[vat_rates]" rows=6 cols=120 ><?php echo esc_textarea($options['vat_rates']);?></textarea><br/>
131
+ <div class="notes">Add tax rates seperated by comma. These rates will be calculated based on the subtotal price.</div>
132
  </td>
133
  </tr>
 
134
  <tr valign="top">
135
  <th scope="row"><strong>Refunds policy, conditions etc.:</strong></th>
136
  <td>
137
  <textarea name="be_woocommerce_pdf_invoices[extra_info]" rows=6 cols=120 ><?php echo esc_textarea($options['extra_info']);?></textarea><br/>
138
+ <div class="notes">Add some policies, conditions etc. It will be placed beyond the products table. You can leave it blank.</div>
 
 
139
  </td>
140
  </tr>
141
  </table>
142
  <?php submit_button(); ?>
143
+ <p>
144
+ Thank you for using my FREE plugin. If you have any suggestions for new functionality, please use the
145
+ <a href="http://wordpress.org/support/plugin/woocommerce-pdf-invoices"/>support forum</a> or feel free to contact me right away.<br/>
146
+ Please <a href="http://wordpress.org/support/view/plugin-reviews/woocommerce-pdf-invoices?rate=5#postform"/>rate</a> with 5 stars as a service on return.
147
+ </p>
148
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=baselbers%40hotmail%2ecom&lc=NL&item_name=WooCommerce%20PDF%20Invoices&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted">
149
+ <img alt="Donate Button" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" />
150
+ </a>
151
  </form>
152
  </div>
index.php CHANGED
@@ -3,14 +3,14 @@
3
  /**
4
  * Plugin Name: WooCommerce PDF Invoices
5
  * Description: Generate PDF invoice and automatically attach to WooCommerce email type of your choice.
6
- * Version: 1.0.2
7
  * Author: Bas Elbers
8
  * License: GPL2
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit;
12
 
13
- define("BEWPI_VERSION", "1.0.2");
14
  define("BEWPI_PLUGIN_DIR", plugin_dir_path(__FILE__));
15
  define("BEWPI_PLUGIN_URL", plugins_url( '/' , __FILE__ ));
16
 
@@ -23,7 +23,6 @@ if((is_admin()) && (!defined("DOING_AJAX") || !DOING_AJAX)) {
23
  // ADMIN SECTION
24
  require BEWPI_PLUGIN_DIR . 'includes/class-admin.php';
25
  new BEWPI_Admin();
26
-
27
  }
28
 
29
  ?>
3
  /**
4
  * Plugin Name: WooCommerce PDF Invoices
5
  * Description: Generate PDF invoice and automatically attach to WooCommerce email type of your choice.
6
+ * Version: 1.1.0
7
  * Author: Bas Elbers
8
  * License: GPL2
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit;
12
 
13
+ define("BEWPI_VERSION", "1.1.0");
14
  define("BEWPI_PLUGIN_DIR", plugin_dir_path(__FILE__));
15
  define("BEWPI_PLUGIN_URL", plugins_url( '/' , __FILE__ ));
16
 
23
  // ADMIN SECTION
24
  require BEWPI_PLUGIN_DIR . 'includes/class-admin.php';
25
  new BEWPI_Admin();
 
26
  }
27
 
28
  ?>
lang/woocommerce-pdf-invoices-it_IT.mo ADDED
Binary file
lang/woocommerce-pdf-invoices-it_IT.po ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WooCommerce PDF Invoices\n"
4
+ "POT-Creation-Date: 2013-12-21 18:52+0100\n"
5
+ "PO-Revision-Date: 2013-12-21 18:59+0100\n"
6
+ "Last-Translator: Bas Elbers <baselbers@hotmail.com>\n"
7
+ "Language-Team: \n"
8
+ "Language: it_IT\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.2\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Poedit-KeywordsList: __;_e\n"
15
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
+ "X-Poedit-SearchPath-0: ../.\n"
17
+
18
+ #: .././includes/class-admin.php:44
19
+ msgid "Please upload image with extension jpg, jpeg or png."
20
+ msgstr ""
21
+
22
+ #: .././includes/class-admin.php:48
23
+ msgid "Please upload image less then 50kB."
24
+ msgstr ""
25
+
26
+ #: .././includes/class-admin.php:54
27
+ msgid "Settings saved."
28
+ msgstr ""
29
+
30
+ #: .././includes/class-invoice.php:99
31
+ msgid "INVOICE"
32
+ msgstr "FATTURA"
33
+
34
+ #: .././includes/class-invoice.php:108
35
+ msgid "Invoice Number: "
36
+ msgstr ""
37
+
38
+ #: .././includes/class-invoice.php:109
39
+ #, php-format
40
+ msgid "Date: %02d-%02d-%04d"
41
+ msgstr "DATA: %02d-%02d-%04d"
42
+
43
+ #: .././includes/class-invoice.php:118
44
+ msgid "To:"
45
+ msgstr "DESTINATARIO:"
46
+
47
+ #: .././includes/class-invoice.php:122
48
+ msgid "Ship To:"
49
+ msgstr ""
50
+
51
+ #: .././includes/class-invoice.php:132
52
+ msgid "Notes:"
53
+ msgstr "Misure richieste:"
54
+
55
+ #: .././includes/class-invoice.php:143
56
+ msgid "SKU"
57
+ msgstr "COD.PRODOTTO"
58
+
59
+ #: .././includes/class-invoice.php:144
60
+ msgid "Quantity"
61
+ msgstr ""
62
+
63
+ #: .././includes/class-invoice.php:145
64
+ msgid "Description"
65
+ msgstr ""
66
+
67
+ #: .././includes/class-invoice.php:146
68
+ msgid "Unit price"
69
+ msgstr ""
70
+
71
+ #: .././includes/class-invoice.php:147 .././includes/class-invoice.php:186
72
+ msgid "Total"
73
+ msgstr ""
74
+
75
+ #: .././includes/class-invoice.php:168
76
+ msgid "Discount"
77
+ msgstr ""
78
+
79
+ #: .././includes/class-invoice.php:172
80
+ msgid "Subtotal"
81
+ msgstr ""
82
+
83
+ #: .././includes/class-invoice.php:177
84
+ msgid "VAT "
85
+ msgstr ""
86
+
87
+ #: .././includes/class-invoice.php:182
88
+ msgid "Shipping"
89
+ msgstr ""
90
+
91
+ #: .././includes/class-invoice.php:203
92
+ #, php-format
93
+ msgid "Page %s of %s"
94
+ msgstr "Pagina %s di %s"
95
+
96
+ #: .././includes/views/settings-page.php:16
97
+ msgid "Test"
98
+ msgstr "Vertaling werkt."
99
+
100
+ #~ msgid "INVOICE NUMBER: "
101
+ #~ msgstr "FATTURA NUMERO:"
102
+
103
+ #~ msgid "SHIP TO:"
104
+ #~ msgstr "SPEDISCI A:"
105
+
106
+ #~ msgid "QUANTITY"
107
+ #~ msgstr "QUANTITA'"
108
+
109
+ #~ msgid "DESCRIPTION"
110
+ #~ msgstr "DESCRIZIONE"
111
+
112
+ #~ msgid "UNIT PRICE"
113
+ #~ msgstr "COSTO/ARTICOLO"
114
+
115
+ #~ msgid "TOTAL"
116
+ #~ msgstr "TOTALE"
117
+
118
+ #~ msgid "SUBTOTAL"
119
+ #~ msgstr "SUBTOTALE"
120
+
121
+ #~ msgid "SALES TAX"
122
+ #~ msgstr "IVA"
123
+
124
+ #~ msgid "SHIPPING & HANDLING"
125
+ #~ msgstr "SPEDIZIONE"
126
+
127
+ #~ msgid "TOTAL DUE"
128
+ #~ msgstr "TOTALE"
lang/woocommerce-pdf-invoices.mo CHANGED
Binary file
lang/woocommerce-pdf-invoices.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WooCommerce PDF Invoices\n"
4
- "POT-Creation-Date: 2013-12-13 14:48+0100\n"
5
- "PO-Revision-Date: 2013-12-13 14:49+0100\n"
6
  "Last-Translator: Bas Elbers <baselbers@hotmail.com>\n"
7
  "Language-Team: \n"
8
  "Language: en_GB\n"
@@ -14,68 +14,84 @@ msgstr ""
14
  "X-Poedit-KeywordsList: __;_e\n"
15
  "X-Poedit-SearchPath-0: ../.\n"
16
 
17
- #: .././includes/class-invoice.php:100
 
 
 
 
 
 
 
 
 
 
 
 
18
  msgid "INVOICE"
19
  msgstr ""
20
 
21
- #: .././includes/class-invoice.php:109
22
  msgid "INVOICE NUMBER: "
23
  msgstr ""
24
 
25
- #: .././includes/class-invoice.php:110
26
  #, php-format
27
  msgid "DATE: %02d-%02d-%04d"
28
  msgstr ""
29
 
30
- #: .././includes/class-invoice.php:119
31
  msgid "TO:"
32
  msgstr ""
33
 
34
- #: .././includes/class-invoice.php:123
35
  msgid "SHIP TO:"
36
  msgstr ""
37
 
38
- #: .././includes/class-invoice.php:132
39
  msgid "Notes:"
40
  msgstr ""
41
 
42
- #: .././includes/class-invoice.php:142
43
  msgid "SKU"
44
  msgstr ""
45
 
46
- #: .././includes/class-invoice.php:143
47
- msgid "QUANTITY"
48
  msgstr ""
49
 
50
- #: .././includes/class-invoice.php:144
51
- msgid "DESCRIPTION"
52
  msgstr ""
53
 
54
- #: .././includes/class-invoice.php:145
55
- msgid "UNIT PRICE"
56
  msgstr ""
57
 
58
- #: .././includes/class-invoice.php:146
59
- msgid "TOTAL"
60
  msgstr ""
61
 
62
- #: .././includes/class-invoice.php:167
63
- msgid "SUBTOTAL"
64
  msgstr ""
65
 
66
- #: .././includes/class-invoice.php:172
67
- msgid "SALES TAX"
68
  msgstr ""
69
 
70
- #: .././includes/class-invoice.php:177
71
- msgid "SHIPPING & HANDLING"
72
  msgstr ""
73
 
74
  #: .././includes/class-invoice.php:181
75
- msgid "TOTAL DUE"
76
  msgstr ""
77
 
78
- #: .././includes/class-invoice.php:198
79
  #, php-format
80
  msgid "Page %s of %s"
81
  msgstr ""
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WooCommerce PDF Invoices\n"
4
+ "POT-Creation-Date: 2013-12-21 18:28+0100\n"
5
+ "PO-Revision-Date: 2013-12-21 18:28+0100\n"
6
  "Last-Translator: Bas Elbers <baselbers@hotmail.com>\n"
7
  "Language-Team: \n"
8
  "Language: en_GB\n"
14
  "X-Poedit-KeywordsList: __;_e\n"
15
  "X-Poedit-SearchPath-0: ../.\n"
16
 
17
+ #: .././includes/class-admin.php:44
18
+ msgid "Please upload image with extension jpg, jpeg or png."
19
+ msgstr ""
20
+
21
+ #: .././includes/class-admin.php:48
22
+ msgid "Please upload image less then 50kB."
23
+ msgstr ""
24
+
25
+ #: .././includes/class-admin.php:54
26
+ msgid "Settings saved."
27
+ msgstr ""
28
+
29
+ #: .././includes/class-invoice.php:99
30
  msgid "INVOICE"
31
  msgstr ""
32
 
33
+ #: .././includes/class-invoice.php:108
34
  msgid "INVOICE NUMBER: "
35
  msgstr ""
36
 
37
+ #: .././includes/class-invoice.php:109
38
  #, php-format
39
  msgid "DATE: %02d-%02d-%04d"
40
  msgstr ""
41
 
42
+ #: .././includes/class-invoice.php:118
43
  msgid "TO:"
44
  msgstr ""
45
 
46
+ #: .././includes/class-invoice.php:122
47
  msgid "SHIP TO:"
48
  msgstr ""
49
 
50
+ #: .././includes/class-invoice.php:131
51
  msgid "Notes:"
52
  msgstr ""
53
 
54
+ #: .././includes/class-invoice.php:141
55
  msgid "SKU"
56
  msgstr ""
57
 
58
+ #: .././includes/class-invoice.php:142
59
+ msgid "Quantity"
60
  msgstr ""
61
 
62
+ #: .././includes/class-invoice.php:143
63
+ msgid "Description"
64
  msgstr ""
65
 
66
+ #: .././includes/class-invoice.php:144
67
+ msgid "Unit price"
68
  msgstr ""
69
 
70
+ #: .././includes/class-invoice.php:145 .././includes/class-invoice.php:185
71
+ msgid "Total"
72
  msgstr ""
73
 
74
+ #: .././includes/class-invoice.php:166
75
+ msgid "Discount"
76
  msgstr ""
77
 
78
+ #: .././includes/class-invoice.php:171
79
+ msgid "Subtotal"
80
  msgstr ""
81
 
82
+ #: .././includes/class-invoice.php:176
83
+ msgid "VAT "
84
  msgstr ""
85
 
86
  #: .././includes/class-invoice.php:181
87
+ msgid "Shipping"
88
  msgstr ""
89
 
90
+ #: .././includes/class-invoice.php:202
91
  #, php-format
92
  msgid "Page %s of %s"
93
  msgstr ""
94
+
95
+ #: .././includes/views/settings-page.php:16
96
+ msgid "Test"
97
+ msgstr ""
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Plugin Name ===
2
- Contributors: Bas Elbers
3
  Donate link:
4
- Tags: woocommerce pdf invoices, invoice, generate, pdf, woocommerce, attachment, email, completed order, customer invoice, processing order, attach, automatic
5
  Requires at least: 3.5
6
- Tested up to: 3.8
7
- Stable tag: 1.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -13,23 +13,28 @@ Simple plugin to generate a PDF invoice based upon the customers order and autom
13
  == Description ==
14
  This plugin simply generates a PDF Invoice based upon the customers order and automatically attaches it to the email type of your choice.
15
  Download the WooCommerce PDF Invoices plugin now!
16
- The plugin adds a new settings page as a submenu within the WooCommerce main menu and gives the option to customize your invoice by adding a company logo, company address, additional company information, refunds policies, conditions etc. and more!
17
 
18
  = CUSTOMIZABLE =
19
  An invoice is a proffesional way of conducting business and every business is unique. That's why it is very important that your invoice contains the details your customers need. The WooCommerce PDF Invoices settings page gives you the possibility to fully customize your invoice.
20
 
21
  = AUTOMATIC =
22
- No more singly drafting invoices and manually sending invoices to your customers. No more waste of time. From now on, WooCommerce PDF Invoices does the job for you!
23
 
24
  = FEATURES =
25
- - Change your company name
 
 
26
  - Add your company slogan
27
  - Upload and use your company logo
28
  - Add your company address
29
  - Add additional company information
30
  - Add refunds policies, conditions etc.
31
- - Auto generating invoice numbers
32
- - Attach pdf invoice to email type of your choice
 
 
 
33
 
34
  == Frequently Asked Questions ==
35
 
@@ -44,7 +49,8 @@ Of course you can! Please open a support thread and I will try to answer as soon
44
  == Screenshots ==
45
 
46
  1. The WooCommerce PDF Invoices settings page.
47
- 2. The generated PDF invoice.
 
48
 
49
  == Installation ==
50
 
@@ -62,6 +68,18 @@ The manual installation method involves downloading our eCommerce plugin and upl
62
 
63
  == Changelog ==
64
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  = 1.0.2 - December 13, 2013 =
66
 
67
  - Added: Attach pdf invoice to email type of your choice.
1
  === Plugin Name ===
2
+ Contributors: baaaaas
3
  Donate link:
4
+ Tags: woocommerce pdf invoices, invoice, generate, pdf, woocommerce, attachment, email, completed order, customer invoice, processing order, attach, automatic, vat, rate
5
  Requires at least: 3.5
6
+ Tested up to: 3.8.1
7
+ Stable tag: 1.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
13
  == Description ==
14
  This plugin simply generates a PDF Invoice based upon the customers order and automatically attaches it to the email type of your choice.
15
  Download the WooCommerce PDF Invoices plugin now!
16
+ The plugin adds a new settings page as a submenu within the WooCommerce main menu and gives the option to customize and configure your invoice by adding a company logo, company address, additional company information, refunds policies, conditions etc. and more!
17
 
18
  = CUSTOMIZABLE =
19
  An invoice is a proffesional way of conducting business and every business is unique. That's why it is very important that your invoice contains the details your customers need. The WooCommerce PDF Invoices settings page gives you the possibility to fully customize your invoice.
20
 
21
  = AUTOMATIC =
22
+ No more singly drafting invoices and manually sending invoices to your customers, it even uses sequential invoice numbers. No more waste of time! From now on, WooCommerce PDF Invoices does the job for you and it's totally free!
23
 
24
  = FEATURES =
25
+ - Attach PDF invoice to email type of your choice
26
+ - Attach PDF invoice to the "New Order" email type for bookkeeping purposes
27
+ - Add your company name
28
  - Add your company slogan
29
  - Upload and use your company logo
30
  - Add your company address
31
  - Add additional company information
32
  - Add refunds policies, conditions etc.
33
+ - Sequential invoice numbers
34
+ - Choose between different invoice number formats
35
+ - Choose to display customer notes
36
+ - Choose to display SKU
37
+ - Add your company vat rates to calculate and display
38
 
39
  == Frequently Asked Questions ==
40
 
49
  == Screenshots ==
50
 
51
  1. The WooCommerce PDF Invoices settings page.
52
+ 2. The WooCommerce PDF Invoices settings page.
53
+ 3. The generated PDF invoice.
54
 
55
  == Installation ==
56
 
68
 
69
  == Changelog ==
70
 
71
+ = 1.1.0 - February 3, 2014 =
72
+
73
+ - Added: Choose to display product SKU.
74
+ - Added: Choose to display notes.
75
+ - Added: Choose your desired invoice number format.
76
+ - Added: Attach invoice to admin "New Order" email type.
77
+ - Added: Input your desired VAT rates to display.
78
+ - Added: Sequential invoice numbers.
79
+ - Improved: Display and calucatlion of VAT rates.
80
+ - Fixed: Translation
81
+ - Fixed: Product SKU
82
+
83
  = 1.0.2 - December 13, 2013 =
84
 
85
  - Added: Attach pdf invoice to email type of your choice.