Changeset 2596282
- Timestamp:
- 09/09/2021 12:40:08 PM (5 years ago)
- Location:
- paperdork/trunk
- Files:
-
- 4 edited
-
classes/Paperdork.php (modified) (4 diffs)
-
classes/PaperdorkSettings.php (modified) (3 diffs)
-
functions.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
paperdork/trunk/classes/Paperdork.php
r2595117 r2596282 111 111 ], 112 112 'auto_credit_invoice' => 1, 113 'send_method' => 'manual_send' 113 'send_method' => 'manual_send', 114 'payment_term' => '30' 114 115 ]; 115 116 … … 220 221 $json = [ 221 222 'date' => substr($order->order_date,0,10), 222 'templateId' => $this->template,223 223 'description' => ($refund ? 'Terugbetaling' : 'Bestelling').' WooCommerce '.$order_id, 224 224 'reference' => ($refund ? 'Terugbetaling bestelling' : 'Bestelling').' '.$order_id, 225 225 'customer' => $customer->getArray(), 226 'paymentTerm' => $settings['payment_term'],226 'paymentTerm' => ($settings['payment_term'] == '' ? 30 : $settings['payment_term']), 227 227 'lines' => $lines, 228 228 'status' => 1 229 229 ]; 230 231 if($this->template != ''){ 232 $json['templateId'] = $this->template; 233 } 230 234 231 235 $status = 1; … … 242 246 $json['status'] = 4; 243 247 } 244 245 248 246 249 return $json; … … 277 280 // Call API 278 281 $response = $this->callApi('/v1/Invoices/create', json_encode($json), 'POST'); 279 if($response['id'] != ='') update_post_meta($order->ID, 'paperdork_invoice', $response['id']);282 if($response['id'] != '') update_post_meta($order->ID, 'paperdork_invoice', $response['id']); 280 283 } 281 284 -
paperdork/trunk/classes/PaperdorkSettings.php
r2594910 r2596282 50 50 new PaperdorkSettingsField('auto_process_order', 'general_settings',$settings, 'Bestellingen automatisch verwerken in Paperdork', 'checkbox'); 51 51 new PaperdorkAutoInvoiceSettingsField($settings); 52 new PaperdorkSettingsField ('send_method', 'general_settings',$settings, 'Facuur verzending', 'select', [52 new PaperdorkSettingsFieldSendMethod('send_method', 'general_settings',$settings, 'Facuur verzending', 'select', [ 53 53 'concept' => 'Niet verzenden, maak de factuur als concept', 54 54 'manual_send' => 'Maak de factuur aan zonder te versturen (handmatig verstuurd)', … … 173 173 else if($this->type == 'select'){ 174 174 ?> 175 <select name="<?php echo esc_attr($this->getName());?>">175 <select id="<?php echo esc_attr($this->id);?>" name="<?php echo esc_attr($this->getName());?>"> 176 176 <?php 177 177 $value = $this->getValue(); … … 188 188 <?php 189 189 } 190 } 191 } 192 193 class PaperdorkSettingsFieldSendMethod extends PaperdorkSettingsField{ 194 public function callback(){ 195 parent::callback(); 196 ?> 197 <div class="warning" style="margin-top:10px;font-style:italic;max-width:400px;display:none">Let op: als de bestelling al is betaald wordt de factuur alsnog als definitieve factuur aangemaakt.</div> 198 <?php 190 199 } 191 200 } -
paperdork/trunk/functions.php
r2595110 r2596282 4 4 * Plugin Name: Paperdork voor WooCommerce 5 5 * Description: Met de Paperdork plugin kun je jouw WooCommerce webshop automatisch koppelen aan je Paperdork boekhouding. Zet bestellingen automatisch in je administratie, verstuur Paperdork facturen naar je klanten en meer. 6 * Version: 1.0. 76 * Version: 1.0.8 7 7 * Requires PHP: 7.2 8 8 * Author: Paperdork … … 14 14 } 15 15 16 define('PAPERDORK_VERSION', '1.0. 7');16 define('PAPERDORK_VERSION', '1.0.8'); 17 17 18 18 require_once(__DIR__.'/classes/Paperdork.php'); -
paperdork/trunk/readme.txt
r2595110 r2596282 4 4 Requires at least: 5.0 5 5 Tested up to: 5.8 6 Stable tag: 1.0. 76 Stable tag: 1.0.8 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later … … 41 41 42 42 == Changelog == 43 = 1.0.8 = 44 * Waarschuwingsbericht toegevoegd bij de concept verzendstatus 43 45 44 = 1.0 .6=46 = 1.0 = 45 47 * Onze eerste versie van de plugin 46 48
Note: See TracChangeset
for help on using the changeset viewer.