Changeset 3450548
- Timestamp:
- 01/30/2026 03:01:12 PM (2 months ago)
- Location:
- wintouch-cloud
- Files:
-
- 6 edited
- 14 copied
-
tags/0.0.7 (copied) (copied from wintouch-cloud/trunk)
-
tags/0.0.7/README.md (copied) (copied from wintouch-cloud/trunk/README.md) (1 diff)
-
tags/0.0.7/assets/css/style.css (copied) (copied from wintouch-cloud/trunk/assets/css/style.css) (1 diff)
-
tags/0.0.7/readme.txt (copied) (copied from wintouch-cloud/trunk/readme.txt) (1 diff)
-
tags/0.0.7/src/Api.php (copied) (copied from wintouch-cloud/trunk/src/Api.php)
-
tags/0.0.7/src/Authentication.php (copied) (copied from wintouch-cloud/trunk/src/Authentication.php)
-
tags/0.0.7/src/Menu.php (copied) (copied from wintouch-cloud/trunk/src/Menu.php)
-
tags/0.0.7/src/Order.php (copied) (copied from wintouch-cloud/trunk/src/Order.php) (4 diffs)
-
tags/0.0.7/src/Stock.php (copied) (copied from wintouch-cloud/trunk/src/Stock.php)
-
tags/0.0.7/views/Account.php (copied) (copied from wintouch-cloud/trunk/views/Account.php) (1 diff)
-
tags/0.0.7/views/Authentication.php (copied) (copied from wintouch-cloud/trunk/views/Authentication.php)
-
tags/0.0.7/views/General.php (copied) (copied from wintouch-cloud/trunk/views/General.php)
-
tags/0.0.7/views/Settings.php (copied) (copied from wintouch-cloud/trunk/views/Settings.php)
-
tags/0.0.7/wintouch-cloud.php (copied) (copied from wintouch-cloud/trunk/wintouch-cloud.php) (1 diff)
-
trunk/README.md (modified) (1 diff)
-
trunk/assets/css/style.css (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/src/Order.php (modified) (4 diffs)
-
trunk/views/Account.php (modified) (1 diff)
-
trunk/wintouch-cloud.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wintouch-cloud/tags/0.0.7/README.md
r3449632 r3450548 8 8 **Requires at least:** 5.0 9 9 **Tested up to:** 6.9 10 **Stable tag:** 0.0. 610 **Stable tag:** 0.0.7 11 11 **Requires PHP:** 7.2 12 12 **License:** GPLv2 or later -
wintouch-cloud/tags/0.0.7/assets/css/style.css
r3447059 r3450548 325 325 } 326 326 327 .wt-account-description { 328 overflow: hidden; 329 text-wrap-mode: nowrap; 330 } 331 332 .wt-account-description p{ 333 overflow: hidden; 334 text-overflow: ellipsis; 335 } 336 327 337 .wt-account-enterprise { 328 display: flex; 329 } 330 331 .wt-account-enterprise .wt-account-description { 332 flex-shrink: 0; 338 display: grid; 339 grid-template-columns: 1fr auto; 340 gap: .7em; 333 341 } 334 342 -
wintouch-cloud/tags/0.0.7/readme.txt
r3449632 r3450548 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 0.0. 66 Stable tag: 0.0.7 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later -
wintouch-cloud/tags/0.0.7/src/Order.php
r3449632 r3450548 29 29 30 30 if ($send_with_payload) { 31 $prices_with_tax = wc_prices_include_tax(); 32 33 if ($prices_with_tax) { 34 // Shipping with tax 35 $shipping_price = $order->get_shipping_total() + $order->get_shipping_tax(); 36 } else { 37 // Shipping without tax 38 $shipping_price = $order->get_shipping_total(); 39 } 31 $prices_with_tax = $order->get_prices_include_tax(); 40 32 41 33 $data['OrderPayload'] = [ 42 34 'Notes' => $order->get_customer_note(), 43 35 'TotalPrice' => $order->get_total(), 44 'TotalDiscount' => $order->get_total_discount(), 45 'TotalShipping' => $shipping_price, 36 'TotalDiscount' => $prices_with_tax ? $order->get_total_discount() : 0, 46 37 'PricesWithTax' => $prices_with_tax 47 38 ]; … … 63 54 $checkoutFields = Package::container()->get(CheckoutFields::class); 64 55 $data['OrderPayload']['Client'] = [ 65 'Name' => $order->get_billing_first_name() . $order->get_billing_last_name(),56 'Name' => $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(), 66 57 'Email' => $order->get_billing_email(), 67 58 'Nif' => $checkoutFields->get_field_from_object('Wintouch/nif', $order, 'order') … … 76 67 } else { 77 68 // Price with tax calculated 78 $item_price = $item->get_ subtotal() / $item->get_quantity();69 $item_price = $item->get_total() / $item->get_quantity(); 79 70 } 80 71 … … 89 80 90 81 $data['OrderPayload']['Items'][] = $orderItem; 82 } 83 84 if ($order->get_shipping_total() > 0) { 85 // Shipping price and tax 86 if ($prices_with_tax) { 87 // Shipping with tax 88 $shipping_price = $order->get_shipping_total() + $order->get_shipping_tax(); 89 } else { 90 // Shipping without tax 91 $shipping_price = $order->get_shipping_total(); 92 } 93 94 $shipping_tax = round(($order->get_shipping_tax() / $order->get_shipping_total()) * 100); 95 96 $data['OrderPayload']['Items'][] = [ 97 'Title' => 'Custo de envio', 98 'Price' => $shipping_price, 99 'Quantity' => 1, 100 'TaxRate' => $shipping_tax 101 ]; 91 102 } 92 103 } -
wintouch-cloud/tags/0.0.7/views/Account.php
r3447026 r3450548 18 18 <div class="card"> 19 19 20 <h2 class="title">Utilizador</h2> 20 <div class="wt-account-description"> 21 <h2 class="title">Utilizador</h2> 21 22 22 <br>23 <br> 23 24 24 <?php25 if (isset($wintouch_user['Name'])) {26 echo '<p>Nome: '.esc_html($wintouch_user['Name']).'</p>';27 } else {28 echo '<p>Nome: Não definido</p>';29 }25 <?php 26 if (isset($wintouch_user['Name'])) { 27 echo '<p>Nome: '.esc_html($wintouch_user['Name']).'</p>'; 28 } else { 29 echo '<p>Nome: Não definido</p>'; 30 } 30 31 31 if (isset($wintouch_user['Email'])) {32 echo '<p>Email: '.esc_html($wintouch_user['Email']).'</p>';33 } else {34 echo '<p>Email: Não definido</p>';35 }32 if (isset($wintouch_user['Email'])) { 33 echo '<p>Email: '.esc_html($wintouch_user['Email']).'</p>'; 34 } else { 35 echo '<p>Email: Não definido</p>'; 36 } 36 37 37 if (isset($wintouch_user['PhoneNumber'])) {38 echo '<p>Telemóvel: '.esc_html($wintouch_user['PhoneNumber']).'</p>';39 } else {40 echo '<p>Telemóvel: Não definido</p>';41 }42 ?>38 if (isset($wintouch_user['PhoneNumber'])) { 39 echo '<p>Telemóvel: '.esc_html($wintouch_user['PhoneNumber']).'</p>'; 40 } else { 41 echo '<p>Telemóvel: Não definido</p>'; 42 } 43 ?> 43 44 44 <br>45 <br> 45 46 46 <form method="POST" action="<?php esc_url(admin_url('admin.php?page=wintouch')) ?>"> 47 <input name="action" value="logout" hidden> 48 <button class="button button-primary" type="submit">Terminar sessão</button> 49 </form> 47 <form method="POST" action="<?php esc_url(admin_url('admin.php?page=wintouch')) ?>"> 48 <input name="action" value="logout" hidden> 49 <button class="button button-primary" type="submit">Terminar sessão</button> 50 </form> 51 </div> 50 52 51 53 </div> -
wintouch-cloud/tags/0.0.7/wintouch-cloud.php
r3449632 r3450548 3 3 * Plugin Name: WINTOUCH Cloud 4 4 * Description: Uma ferramenta de faturação para o seu negócio. 5 * Version: 0.0. 65 * Version: 0.0.7 6 6 * Author: WINTOUCH 7 7 * Author URI: https://wintouchcloud.com -
wintouch-cloud/trunk/README.md
r3449632 r3450548 8 8 **Requires at least:** 5.0 9 9 **Tested up to:** 6.9 10 **Stable tag:** 0.0. 610 **Stable tag:** 0.0.7 11 11 **Requires PHP:** 7.2 12 12 **License:** GPLv2 or later -
wintouch-cloud/trunk/assets/css/style.css
r3447059 r3450548 325 325 } 326 326 327 .wt-account-description { 328 overflow: hidden; 329 text-wrap-mode: nowrap; 330 } 331 332 .wt-account-description p{ 333 overflow: hidden; 334 text-overflow: ellipsis; 335 } 336 327 337 .wt-account-enterprise { 328 display: flex; 329 } 330 331 .wt-account-enterprise .wt-account-description { 332 flex-shrink: 0; 338 display: grid; 339 grid-template-columns: 1fr auto; 340 gap: .7em; 333 341 } 334 342 -
wintouch-cloud/trunk/readme.txt
r3449632 r3450548 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 0.0. 66 Stable tag: 0.0.7 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later -
wintouch-cloud/trunk/src/Order.php
r3449632 r3450548 29 29 30 30 if ($send_with_payload) { 31 $prices_with_tax = wc_prices_include_tax(); 32 33 if ($prices_with_tax) { 34 // Shipping with tax 35 $shipping_price = $order->get_shipping_total() + $order->get_shipping_tax(); 36 } else { 37 // Shipping without tax 38 $shipping_price = $order->get_shipping_total(); 39 } 31 $prices_with_tax = $order->get_prices_include_tax(); 40 32 41 33 $data['OrderPayload'] = [ 42 34 'Notes' => $order->get_customer_note(), 43 35 'TotalPrice' => $order->get_total(), 44 'TotalDiscount' => $order->get_total_discount(), 45 'TotalShipping' => $shipping_price, 36 'TotalDiscount' => $prices_with_tax ? $order->get_total_discount() : 0, 46 37 'PricesWithTax' => $prices_with_tax 47 38 ]; … … 63 54 $checkoutFields = Package::container()->get(CheckoutFields::class); 64 55 $data['OrderPayload']['Client'] = [ 65 'Name' => $order->get_billing_first_name() . $order->get_billing_last_name(),56 'Name' => $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(), 66 57 'Email' => $order->get_billing_email(), 67 58 'Nif' => $checkoutFields->get_field_from_object('Wintouch/nif', $order, 'order') … … 76 67 } else { 77 68 // Price with tax calculated 78 $item_price = $item->get_ subtotal() / $item->get_quantity();69 $item_price = $item->get_total() / $item->get_quantity(); 79 70 } 80 71 … … 89 80 90 81 $data['OrderPayload']['Items'][] = $orderItem; 82 } 83 84 if ($order->get_shipping_total() > 0) { 85 // Shipping price and tax 86 if ($prices_with_tax) { 87 // Shipping with tax 88 $shipping_price = $order->get_shipping_total() + $order->get_shipping_tax(); 89 } else { 90 // Shipping without tax 91 $shipping_price = $order->get_shipping_total(); 92 } 93 94 $shipping_tax = round(($order->get_shipping_tax() / $order->get_shipping_total()) * 100); 95 96 $data['OrderPayload']['Items'][] = [ 97 'Title' => 'Custo de envio', 98 'Price' => $shipping_price, 99 'Quantity' => 1, 100 'TaxRate' => $shipping_tax 101 ]; 91 102 } 92 103 } -
wintouch-cloud/trunk/views/Account.php
r3447026 r3450548 18 18 <div class="card"> 19 19 20 <h2 class="title">Utilizador</h2> 20 <div class="wt-account-description"> 21 <h2 class="title">Utilizador</h2> 21 22 22 <br>23 <br> 23 24 24 <?php25 if (isset($wintouch_user['Name'])) {26 echo '<p>Nome: '.esc_html($wintouch_user['Name']).'</p>';27 } else {28 echo '<p>Nome: Não definido</p>';29 }25 <?php 26 if (isset($wintouch_user['Name'])) { 27 echo '<p>Nome: '.esc_html($wintouch_user['Name']).'</p>'; 28 } else { 29 echo '<p>Nome: Não definido</p>'; 30 } 30 31 31 if (isset($wintouch_user['Email'])) {32 echo '<p>Email: '.esc_html($wintouch_user['Email']).'</p>';33 } else {34 echo '<p>Email: Não definido</p>';35 }32 if (isset($wintouch_user['Email'])) { 33 echo '<p>Email: '.esc_html($wintouch_user['Email']).'</p>'; 34 } else { 35 echo '<p>Email: Não definido</p>'; 36 } 36 37 37 if (isset($wintouch_user['PhoneNumber'])) {38 echo '<p>Telemóvel: '.esc_html($wintouch_user['PhoneNumber']).'</p>';39 } else {40 echo '<p>Telemóvel: Não definido</p>';41 }42 ?>38 if (isset($wintouch_user['PhoneNumber'])) { 39 echo '<p>Telemóvel: '.esc_html($wintouch_user['PhoneNumber']).'</p>'; 40 } else { 41 echo '<p>Telemóvel: Não definido</p>'; 42 } 43 ?> 43 44 44 <br>45 <br> 45 46 46 <form method="POST" action="<?php esc_url(admin_url('admin.php?page=wintouch')) ?>"> 47 <input name="action" value="logout" hidden> 48 <button class="button button-primary" type="submit">Terminar sessão</button> 49 </form> 47 <form method="POST" action="<?php esc_url(admin_url('admin.php?page=wintouch')) ?>"> 48 <input name="action" value="logout" hidden> 49 <button class="button button-primary" type="submit">Terminar sessão</button> 50 </form> 51 </div> 50 52 51 53 </div> -
wintouch-cloud/trunk/wintouch-cloud.php
r3449632 r3450548 3 3 * Plugin Name: WINTOUCH Cloud 4 4 * Description: Uma ferramenta de faturação para o seu negócio. 5 * Version: 0.0. 65 * Version: 0.0.7 6 6 * Author: WINTOUCH 7 7 * Author URI: https://wintouchcloud.com
Note: See TracChangeset
for help on using the changeset viewer.