Completed
Push — master ( f161aa...d0d50d )
by
unknown
15:24
created
includes/modules/wps-pos-addon/templates/backend/pos-top_button.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <button id="seller_stats" class="wps-bton-second-rounded"><i class="dashicons dashicons-chart-line" ></i><?php _e('Access to seller\'s Stats', 'wps-pos-i18n')?></button>
4 4
 <button id="shop_return" class="wps-bton-third-rounded"><i class="dashicons dashicons-undo" ></i><?php _e('Make a return', 'wps-pos-i18n')?></button>
5 5
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 <button id="seller_stats" class="wps-bton-second-rounded"><i class="dashicons dashicons-chart-line" ></i><?php _e('Access to seller\'s Stats', 'wps-pos-i18n')?></button>
4 6
 <button id="shop_return" class="wps-bton-third-rounded"><i class="dashicons dashicons-undo" ></i><?php _e('Make a return', 'wps-pos-i18n')?></button>
5 7
\ No newline at end of file
Please login to merge, or discard this patch.
wps-pos-addon/templates/backend/bank_deposit/metabox-bank_deposit.php 2 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,49 +1,49 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <div>
4 4
 	<div class="fullSize">
5 5
 		<label for="fromdate" class="width-100p inline">
6
-			<?php _e( 'Sort by dates', 'wps-pos-i18n' ); ?>
6
+			<?php _e('Sort by dates', 'wps-pos-i18n'); ?>
7 7
 		</label>
8 8
 		<span class="inline sortbydates">
9
-			<input id="fromdate" type="text" name="fromdate" class="sort_by_dates halfSize" placeholder="<?php _e( 'Begin date', 'wps-pos-i18n' );?>">
10
-			<input type="text" name="todate" class="sort_by_dates halfSize" placeholder="<?php _e( 'End date', 'wps-pos-i18n' );?>">
9
+			<input id="fromdate" type="text" name="fromdate" class="sort_by_dates halfSize" placeholder="<?php _e('Begin date', 'wps-pos-i18n'); ?>">
10
+			<input type="text" name="todate" class="sort_by_dates halfSize" placeholder="<?php _e('End date', 'wps-pos-i18n'); ?>">
11 11
 		</span>
12 12
 		<span class="inline width-360p">
13
-			<button id="this_day" class="wps-bton-first-rounded"><?php _e( 'This day', 'wps-pos-i18n' );?></button>
14
-			<button id="this_week" class="wps-bton-first-rounded"><?php _e( 'This week', 'wps-pos-i18n' );?></button>
15
-			<button id="this_year" class="wps-bton-first-rounded"><?php _e( 'This year', 'wps-pos-i18n' );?></button>
13
+			<button id="this_day" class="wps-bton-first-rounded"><?php _e('This day', 'wps-pos-i18n'); ?></button>
14
+			<button id="this_week" class="wps-bton-first-rounded"><?php _e('This week', 'wps-pos-i18n'); ?></button>
15
+			<button id="this_year" class="wps-bton-first-rounded"><?php _e('This year', 'wps-pos-i18n'); ?></button>
16 16
 		</span>
17 17
 	</div>
18 18
 	<div class="fullSize">
19 19
 		<label for="search" class="width-100p inline">
20
-			<?php _e( 'Filters', 'wps-pos-i18n' ); ?>
20
+			<?php _e('Filters', 'wps-pos-i18n'); ?>
21 21
 		</label>
22 22
 		<span class="width-340p inline">
23
-			<button class="method wps-bton-first-rounded" data-value="check"><?php _e( 'Check', 'wps-pos-i18n' );?></button>
24
-			<button class="method wps-bton-first-rounded" data-value="money"><?php _e( 'Money', 'wps-pos-i18n' );?></button>
25
-			<button class="method wps-bton-first-rounded" data-value="credit_cart"><?php _e( 'Credit card', 'wps-pos-i18n' );?></button>
23
+			<button class="method wps-bton-first-rounded" data-value="check"><?php _e('Check', 'wps-pos-i18n'); ?></button>
24
+			<button class="method wps-bton-first-rounded" data-value="money"><?php _e('Money', 'wps-pos-i18n'); ?></button>
25
+			<button class="method wps-bton-first-rounded" data-value="credit_cart"><?php _e('Credit card', 'wps-pos-i18n'); ?></button>
26 26
 		</span>
27
-		<input class="searchInput inline" id="search" name="search" type="text" placeholder="<?php _e( 'Search', 'wps-pos-i18n' );?>">
27
+		<input class="searchInput inline" id="search" name="search" type="text" placeholder="<?php _e('Search', 'wps-pos-i18n'); ?>">
28 28
 	</div>
29 29
 	<br>
30 30
 	<table cellspacing="0" class="fullSize borderGrey">
31 31
 		<thead>
32 32
 			<tr class="bgGrey">
33 33
 				<th class="padd20">
34
-					<?php _e( 'Order', 'wps-pos-i18n' ); ?>
34
+					<?php _e('Order', 'wps-pos-i18n'); ?>
35 35
 				</th>
36 36
 				<th class="padd20">
37
-					<?php _e( 'Date', 'wps-pos-i18n' ); ?>
37
+					<?php _e('Date', 'wps-pos-i18n'); ?>
38 38
 				</th>
39 39
 				<th class="padd20">
40
-					<?php _e( 'Products', 'wps-pos-i18n' ); ?>
40
+					<?php _e('Products', 'wps-pos-i18n'); ?>
41 41
 				</th>
42 42
 				<th class="padd20">
43
-					<?php _e( 'Amount', 'wps-pos-i18n' ); ?>
43
+					<?php _e('Amount', 'wps-pos-i18n'); ?>
44 44
 				</th>
45 45
 				<th class="padd20">
46
-					<?php _e( 'Method', 'wps-pos-i18n' ); ?>
46
+					<?php _e('Method', 'wps-pos-i18n'); ?>
47 47
 				</th>
48 48
 			</tr>
49 49
 		</thead>
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 			</tr>
69 69
 			<tr id="model_no_results" style="display: none;">
70 70
 				<td class="paddLR20 " colspan="5">
71
-					<?php _e( 'No result', 'wps-pos-i18n' ); ?>
71
+					<?php _e('No result', 'wps-pos-i18n'); ?>
72 72
 				</td>
73 73
 			</tr>
74 74
 		</tbody>
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
 	<br>
83 83
 	<div class="clearFix">
84 84
 		<div class="bgGrey padd20 borderGrey alignRight">
85
-			<span class="halfSize"><?php _e( 'Total bank deposit', 'wps-pos-i18n' ); ?> : </span>
85
+			<span class="halfSize"><?php _e('Total bank deposit', 'wps-pos-i18n'); ?> : </span>
86 86
 			<span class="halfSize bold" id="total_amount" data-currency="<?php echo wpshop_tools::wpshop_get_currency(); ?>"></span>
87 87
 		</div>
88
-		<button id="download" class="wps-bton-third-rounded alignRight marginTop10p"><i class="dashicons dashicons-download"></i><?php _e( 'Download deposit', 'wps-pos-i18n' ); ?></button>
88
+		<button id="download" class="wps-bton-third-rounded alignRight marginTop10p"><i class="dashicons dashicons-download"></i><?php _e('Download deposit', 'wps-pos-i18n'); ?></button>
89 89
 	</div>
90 90
 </div>
91 91
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 <div>
4 6
 	<div class="fullSize">
Please login to merge, or discard this patch.
wps-pos-addon/templates/backend/bank_deposit/metabox-bank_deposit_histo.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <div class="fullSize">
4 4
 	<div id="model_histo_row" class="fullSize marginTop10p">
5
-		<span class="width-100p inline"><?php _e( 'Number:', 'wps-pos-i18n' ); ?> %id%</span>
5
+		<span class="width-100p inline"><?php _e('Number:', 'wps-pos-i18n'); ?> %id%</span>
6 6
 		<span class="width-130p inline bold">%date%</span>
7 7
 		<span class="historow inline textRight paddLR20">
8 8
 			%amount% <?php echo wpshop_tools::wpshop_get_currency(); ?>
@@ -13,6 +13,6 @@  discard block
 block discarded – undo
13 13
 		<button class="wps-bton-third-rounded width-40p height-40p inline download_histo"><i class="dashicons dashicons-download"></i></button>
14 14
 	</div>
15 15
 	<div id="model_histo_no_results" class="fullSize marginTop10p" style="display: none;">
16
-		<span class="inline"><?php _e( 'No result', 'wps-pos-i18n' ); ?></span>
16
+		<span class="inline"><?php _e('No result', 'wps-pos-i18n'); ?></span>
17 17
 	</div>
18 18
 </div>
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 <div class="fullSize">
4 6
 	<div id="model_histo_row" class="fullSize marginTop10p">
Please login to merge, or discard this patch.
includes/modules/wps-pos-addon/templates/backend/pos.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <div class="wrap wps-pos-dashboard-wrap">
4 4
 	<div class="wps-pos-dahboard-header" >
5
-		<h2><?php _e('WP-Shop POS Software', 'wps-pos-i18n'); ?> <a class="add-new-h2" href="<?php echo admin_url( 'admin.php?page=wps-pos&new_order=yes' ); ?>"><?php _e('Create a new order', 'wps-pos-i18n')?></a></h2>
6
-	<!-- 	<div class="wpspos-main-actions-buttons-container" ><?php require_once( wpshop_tools::get_template_part( WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend', 'pos', 'top_button' ) ); ?></div> -->
7
-		<?php require_once( wpshop_tools::get_template_part( WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend', 'tab_pos' ) ); ?>
5
+		<h2><?php _e('WP-Shop POS Software', 'wps-pos-i18n'); ?> <a class="add-new-h2" href="<?php echo admin_url('admin.php?page=wps-pos&new_order=yes'); ?>"><?php _e('Create a new order', 'wps-pos-i18n')?></a></h2>
6
+	<!-- 	<div class="wpspos-main-actions-buttons-container" ><?php require_once(wpshop_tools::get_template_part(WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend', 'pos', 'top_button')); ?></div> -->
7
+		<?php require_once(wpshop_tools::get_template_part(WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend', 'tab_pos')); ?>
8 8
 	</div>
9 9
 
10 10
 	<div id="wpspos-dashboard-widgetswrap" class="metabox-holder" ><?php
11 11
 		/**	Create nonce for metabox order saving securisation	*/
12
-		wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false);
12
+		wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
13 13
 		/**	Create nonce for metabox order saving securisation	*/
14
-		wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false);
14
+		wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
15 15
 
16 16
 		/**	Call the different fonction to add meta boxes on dashboard	*/
17
-		do_meta_boxes( 'wpspos-dashboard', 'wpspos-dashboard-summary', null );
17
+		do_meta_boxes('wpspos-dashboard', 'wpspos-dashboard-summary', null);
18 18
 	?>
19 19
 		<div class="wpspos-dashboard-contents wpspos-current-step-<?php echo $current_step; ?>" >
20 20
 	<?php
21
-		do_meta_boxes( 'wpspos-dashboard', 'wpspos-dashboard-left', null );
22
-		do_meta_boxes( 'wpspos-dashboard', 'wpspos-dashboard-right', null );
23
-		do_meta_boxes( 'wpspos-bank-deposit', 'wpspos-bank-deposit-left', null );
24
-		do_meta_boxes( 'wpspos-bank-deposit', 'wpspos-bank-deposit-right', null );
21
+		do_meta_boxes('wpspos-dashboard', 'wpspos-dashboard-left', null);
22
+		do_meta_boxes('wpspos-dashboard', 'wpspos-dashboard-right', null);
23
+		do_meta_boxes('wpspos-bank-deposit', 'wpspos-bank-deposit-left', null);
24
+		do_meta_boxes('wpspos-bank-deposit', 'wpspos-bank-deposit-right', null);
25 25
 	?>
26 26
 		</div>
27 27
 	</div><!-- wpspos-dashboard-widgets-wrap -->
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 <div class="wrap wps-pos-dashboard-wrap">
4 6
 	<div class="wps-pos-dahboard-header" >
Please login to merge, or discard this patch.
includes/modules/wps-pos-addon/templates/backend/order/order-content.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 	<ul class="wps-fullcart">
4 6
 		<li class="wps-clearfix cart_header">
@@ -20,8 +22,9 @@  discard block
 block discarded – undo
20 22
 					if ( count($product_attribute_order_detail) > 0  && is_array($product_attribute_order_detail) ) {
21 23
 						foreach ( $product_attribute_order_detail as $product_attr_group_id => $product_attr_group_detail) {
22 24
 							foreach ( $product_attr_group_detail['attribut'] as $position => $attribute_def) {
23
-								if ( !empty($attribute_def->code) )
24
-									$output_order[$attribute_def->code] = $position;
25
+								if ( !empty($attribute_def->code) ) {
26
+																	$output_order[$attribute_def->code] = $position;
27
+								}
25 28
 							}
26 29
 						}
27 30
 					}
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -1,47 +1,47 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 	<ul class="wps-fullcart">
4 4
 		<li class="wps-clearfix cart_header">
5
-			<div class="wps-cart-item-content"><?php _e( 'Product name', 'wpshop'); ?></div>
6
-			<div class="wps-cart-item-quantity"><?php _e( 'Qty', 'wpshop'); ?></div>
7
-			<div class="wps-cart-item-unit-price"><?php _e( 'P.U ATI', 'wpshop' ); ?></div>
8
-			<div class="wps-cart-item-price"><?php _e( 'Total ATI', 'wpshop' ); ?></div>
5
+			<div class="wps-cart-item-content"><?php _e('Product name', 'wpshop'); ?></div>
6
+			<div class="wps-cart-item-quantity"><?php _e('Qty', 'wpshop'); ?></div>
7
+			<div class="wps-cart-item-unit-price"><?php _e('P.U ATI', 'wpshop'); ?></div>
8
+			<div class="wps-cart-item-price"><?php _e('Total ATI', 'wpshop'); ?></div>
9 9
 			<div class="wps-cart-item-close"></div>
10 10
 		</li>
11 11
 
12
-	<?php if ( !empty( $order_items ) ) : ?>
13
-		<?php foreach ( $order_items as $order_item_id => $order_item ) : ?>
12
+	<?php if (!empty($order_items)) : ?>
13
+		<?php foreach ($order_items as $order_item_id => $order_item) : ?>
14 14
 		<li id="wps_product_<?php echo $order_item_id; ?>" class="wps-clearfix cart-item" >
15 15
 			<div class="wps-cart-item-content">
16
-				<?php echo wpshop_tools::trunk( $order_item['item_name'], 50 ); ?>
16
+				<?php echo wpshop_tools::trunk($order_item['item_name'], 50); ?>
17 17
 				<?php
18
-					$product_attribute_order_detail = wpshop_attributes_set::getAttributeSetDetails( get_post_meta( $order_item['item_id'], WPSHOP_PRODUCT_ATTRIBUTE_SET_ID_META_KEY, true ) );
18
+					$product_attribute_order_detail = wpshop_attributes_set::getAttributeSetDetails(get_post_meta($order_item['item_id'], WPSHOP_PRODUCT_ATTRIBUTE_SET_ID_META_KEY, true));
19 19
 					$output_order = array();
20
-					if ( count($product_attribute_order_detail) > 0  && is_array($product_attribute_order_detail) ) {
21
-						foreach ( $product_attribute_order_detail as $product_attr_group_id => $product_attr_group_detail) {
22
-							foreach ( $product_attr_group_detail['attribut'] as $position => $attribute_def) {
23
-								if ( !empty($attribute_def->code) )
20
+					if (count($product_attribute_order_detail) > 0 && is_array($product_attribute_order_detail)) {
21
+						foreach ($product_attribute_order_detail as $product_attr_group_id => $product_attr_group_detail) {
22
+							foreach ($product_attr_group_detail['attribut'] as $position => $attribute_def) {
23
+								if (!empty($attribute_def->code))
24 24
 									$output_order[$attribute_def->code] = $position;
25 25
 							}
26 26
 						}
27 27
 					}
28
-					$variation_attribute_ordered = wpshop_products::get_selected_variation_display( $order_item['item_meta'], $output_order, 'cart' );
28
+					$variation_attribute_ordered = wpshop_products::get_selected_variation_display($order_item['item_meta'], $output_order, 'cart');
29 29
 					ksort($variation_attribute_ordered['attribute_list']);
30 30
 				?>
31
-				<?php if ( !empty( $variation_attribute_ordered[ 'attribute_list' ] ) ) : ?>
31
+				<?php if (!empty($variation_attribute_ordered['attribute_list'])) : ?>
32 32
 					<ul class="wps-cart-item-variations" >
33
-				<?php foreach ( $variation_attribute_ordered['attribute_list'] as $attribute_variation_to_output ) : ?>
34
-					<?php if ( !empty( $attribute_variation_to_output ) ) : ?>
33
+				<?php foreach ($variation_attribute_ordered['attribute_list'] as $attribute_variation_to_output) : ?>
34
+					<?php if (!empty($attribute_variation_to_output)) : ?>
35 35
 						<?php echo $attribute_variation_to_output; ?>
36 36
 					<?php endif; ?>
37 37
 				<?php endforeach; ?>
38 38
 					</ul>
39 39
 				<?php endif; ?>
40 40
 			</div>
41
-			<div><button class="wps-bton-second-mini-rounded item_qty" data-nonce="<?php echo wp_create_nonce( 'ajax_wpshop_set_qty_for_product_into_cart' ); ?>" data-action="decrease" data-id="<?php echo $order_item_id; ?>" type="button" >-</button><input type="text" class="wpspos-dashboard-order-summary_qty" data-nonce="<?php echo wp_create_nonce( 'ajax_wpshop_set_qty_for_product_into_cart' ); ?>" data-id="<?php echo $order_item_id; ?>" id="item_qty_<?php echo $order_item_id; ?>" value="<?php echo $order_item['item_qty']; ?>" /><button class="wps-bton-second-mini-rounded item_qty" data-action="increase" data-nonce="<?php echo wp_create_nonce( 'ajax_wpshop_set_qty_for_product_into_cart' ); ?>" data-id="<?php echo $order_item_id; ?>" type="button" >+</button></td></div>
41
+			<div><button class="wps-bton-second-mini-rounded item_qty" data-nonce="<?php echo wp_create_nonce('ajax_wpshop_set_qty_for_product_into_cart'); ?>" data-action="decrease" data-id="<?php echo $order_item_id; ?>" type="button" >-</button><input type="text" class="wpspos-dashboard-order-summary_qty" data-nonce="<?php echo wp_create_nonce('ajax_wpshop_set_qty_for_product_into_cart'); ?>" data-id="<?php echo $order_item_id; ?>" id="item_qty_<?php echo $order_item_id; ?>" value="<?php echo $order_item['item_qty']; ?>" /><button class="wps-bton-second-mini-rounded item_qty" data-action="increase" data-nonce="<?php echo wp_create_nonce('ajax_wpshop_set_qty_for_product_into_cart'); ?>" data-id="<?php echo $order_item_id; ?>" type="button" >+</button></td></div>
42 42
 			<div><input type="text"  class="wpspos-dashboard-order-summary_unit_price" id="price_<?php echo $order_item_id; ?>" value="<?php echo number_format($order_item['item_pu_ttc'], 2, '.', ''); ?>" /><?php echo wpshop_tools::wpshop_get_currency(); ?></td></div>
43 43
 			<div><?php echo number_format($order_item['item_total_ttc'], 2, '.', ''); ?> <?php echo wpshop_tools::wpshop_get_currency(); ?></div>
44
-			<div><button data-id="<?php echo $order_item_id; ?>" data-nonce="<?php echo wp_create_nonce( 'ajax_wpshop_set_qty_for_product_into_cart' ); ?>" class="wps-bton-icon-close wps-pos-delete-product-of-order" type="button"></button></div>
44
+			<div><button data-id="<?php echo $order_item_id; ?>" data-nonce="<?php echo wp_create_nonce('ajax_wpshop_set_qty_for_product_into_cart'); ?>" class="wps-bton-icon-close wps-pos-delete-product-of-order" type="button"></button></div>
45 45
 		</li>
46 46
 		<?php endforeach; ?>
47 47
 	<?php endif; ?>
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
 		<div>&nbsp;</div>
53 53
 		<div class="alignright" >
54 54
 			<div class="wps-boxed" >
55
-				<?php if( !empty($cart_content['order_tva']) ) : ?>
55
+				<?php if (!empty($cart_content['order_tva'])) : ?>
56 56
 
57
-					<?php foreach( $cart_content['order_tva'] as $order_vat_rate => $order_vat_value ) : ?>
58
-						<?php if( $order_vat_rate != 'VAT_shipping_cost') : ?>
57
+					<?php foreach ($cart_content['order_tva'] as $order_vat_rate => $order_vat_value) : ?>
58
+						<?php if ($order_vat_rate != 'VAT_shipping_cost') : ?>
59 59
 				<p>
60
-					<?php printf( __( 'VAT (%s %%)', 'wpshop'), $order_vat_rate); ?>
60
+					<?php printf(__('VAT (%s %%)', 'wpshop'), $order_vat_rate); ?>
61 61
 					<span class="alignright">
62
-						<strong><?php echo wpshop_tools::formate_number( $order_vat_value ); ?></strong> <?php echo $currency; ?>
62
+						<strong><?php echo wpshop_tools::formate_number($order_vat_value); ?></strong> <?php echo $currency; ?>
63 63
 					</span>
64 64
 				</p>
65 65
 						<?php endif; ?>
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
 
68 68
 				<?php endif; ?>
69 69
 
70
-				<p class="wps-hightlight"><?php _e( 'Total ET', 'wpshop'); ?><span class="alignright"><strong><?php echo number_format($cart_content['order_total_ht'], 2, '.', ''); ?></strong> <?php echo wpshop_tools::wpshop_get_currency(); ?></span></p>
71
-				<p class="wps-hightlight"><?php _e( 'Total ATI', 'wpshop'); ?><span class="alignright"><strong><?php echo wpshop_tools::formate_number( ( !empty( $cart_content['order_amount_to_pay_now'] ) && !empty($oid) && $cart_content['order_amount_to_pay_now'] > 0 ) ? $cart_content['order_amount_to_pay_now'] : ( (!empty($cart_content['order_grand_total']) ) ? $cart_content['order_grand_total'] : 0 ) ); ?></strong> <?php echo wpshop_tools::wpshop_get_currency(); ?></span></p>
70
+				<p class="wps-hightlight"><?php _e('Total ET', 'wpshop'); ?><span class="alignright"><strong><?php echo number_format($cart_content['order_total_ht'], 2, '.', ''); ?></strong> <?php echo wpshop_tools::wpshop_get_currency(); ?></span></p>
71
+				<p class="wps-hightlight"><?php _e('Total ATI', 'wpshop'); ?><span class="alignright"><strong><?php echo wpshop_tools::formate_number((!empty($cart_content['order_amount_to_pay_now']) && !empty($oid) && $cart_content['order_amount_to_pay_now'] > 0) ? $cart_content['order_amount_to_pay_now'] : ((!empty($cart_content['order_grand_total'])) ? $cart_content['order_grand_total'] : 0)); ?></strong> <?php echo wpshop_tools::wpshop_get_currency(); ?></span></p>
72 72
 			</div>
73
-			<a title="<?php _e( 'Finalize order', 'wps-pos-i18n' ); ?>" href="<?php print wp_nonce_url( admin_url( 'admin-ajax.php?action=wpspos-finalize-order&width=560&height=420' ), 'wps_pos_finalize_order', '_wpnonce' ); ?>" class="thickbox wps-bton-first-rounded alignright" id="wpspos-finalize-order" ><?php _e( 'Finalize order', 'wps-pos-i18n' ); ?></a>
74
-			<a href="<?php echo admin_url( 'admin.php?page=wps-pos&new_order=yes' ); ?>" class="wps-bton-second-rounded alignright" id="wpspos-neworder" ><?php _e( 'Empty order', 'wps-pos-i18n' ); ?></a>
73
+			<a title="<?php _e('Finalize order', 'wps-pos-i18n'); ?>" href="<?php print wp_nonce_url(admin_url('admin-ajax.php?action=wpspos-finalize-order&width=560&height=420'), 'wps_pos_finalize_order', '_wpnonce'); ?>" class="thickbox wps-bton-first-rounded alignright" id="wpspos-finalize-order" ><?php _e('Finalize order', 'wps-pos-i18n'); ?></a>
74
+			<a href="<?php echo admin_url('admin.php?page=wps-pos&new_order=yes'); ?>" class="wps-bton-second-rounded alignright" id="wpspos-neworder" ><?php _e('Empty order', 'wps-pos-i18n'); ?></a>
75 75
 		</div>
76 76
 	</div>
77 77
 
Please login to merge, or discard this patch.
includes/modules/wps-pos-addon/templates/backend/order/order-complete.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 <h2><?php _e('Payments summary', 'wps-pos-i18n'); ?></h2>
4 6
 <?php if ( !empty( $order_postmeta ) && !empty( $order_postmeta['order_payment'] ) && !empty( $order_postmeta['order_payment']['received'] ) && is_array( $order_postmeta['order_payment']['received'] ) ) : ?>
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <h2><?php _e('Payments summary', 'wps-pos-i18n'); ?></h2>
4
-<?php if ( !empty( $order_postmeta ) && !empty( $order_postmeta['order_payment'] ) && !empty( $order_postmeta['order_payment']['received'] ) && is_array( $order_postmeta['order_payment']['received'] ) ) : ?>
4
+<?php if (!empty($order_postmeta) && !empty($order_postmeta['order_payment']) && !empty($order_postmeta['order_payment']['received']) && is_array($order_postmeta['order_payment']['received'])) : ?>
5 5
 <table id="wps-pos-order-payment-summary" >
6 6
  	<tr>
7 7
 		<th><?php _e('Date', 'wps-pos-i18n'); ?></th>
@@ -9,30 +9,30 @@  discard block
 block discarded – undo
9 9
 		<th><?php _e('Amount', 'wps-pos-i18n'); ?></th>
10 10
 		<th><?php _e('Invoice', 'wps-pos-i18n'); ?></th>
11 11
  	</tr>
12
- 	<?php foreach( $order_postmeta['order_payment']['received'] as $payment_received ) : ?>
12
+ 	<?php foreach ($order_postmeta['order_payment']['received'] as $payment_received) : ?>
13 13
     <tr>
14
-		<td><?php echo ( !empty($payment_received['date']) ) ? mysql2date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $payment_received['date'], true ) : ''; ?></td>
15
-		<td><?php echo ( !empty($payment_received['method']) ) ? __( $payment_received['method'], 'wpshop' ) : ''; ?></td>
16
-		<td><?php echo ( !empty($payment_received['received_amount']) ) ?  number_format( $payment_received['received_amount'], 2, '.', '' ) : ''; ?><?php echo wpshop_tools::wpshop_get_currency(); ?></td>
14
+		<td><?php echo (!empty($payment_received['date'])) ? mysql2date(get_option('date_format') . ' ' . get_option('time_format'), $payment_received['date'], true) : ''; ?></td>
15
+		<td><?php echo (!empty($payment_received['method'])) ? __($payment_received['method'], 'wpshop') : ''; ?></td>
16
+		<td><?php echo (!empty($payment_received['received_amount'])) ? number_format($payment_received['received_amount'], 2, '.', '') : ''; ?><?php echo wpshop_tools::wpshop_get_currency(); ?></td>
17 17
 		<td>
18
-			<a class="wps-bton-third-mini-rounded" href="<?php echo admin_url( 'admin-post.php?action=wps_invoice&order_id=' . $order_id . '&mode=pdf' . ( !empty( $payment_received['invoice_ref'] ) ? '&invoice_ref=' . $payment_received['invoice_ref'] : '' ) ); ?>">
19
-			<?php _e( 'Download', 'wpshop' ); ?></a>
20
-			<a class="wps-bton-third-mini-rounded" target="_blank" href="<?php echo admin_url( 'admin-post.php?action=wps_invoice&order_id=' . $order_id . ( !empty( $payment_received['invoice_ref'] ) ? '&invoice_ref=' . $payment_received['invoice_ref'] : '' ) ); ?>" ><?php _e( 'View', 'wpshop' ); ?></a>
18
+			<a class="wps-bton-third-mini-rounded" href="<?php echo admin_url('admin-post.php?action=wps_invoice&order_id=' . $order_id . '&mode=pdf' . (!empty($payment_received['invoice_ref']) ? '&invoice_ref=' . $payment_received['invoice_ref'] : '')); ?>">
19
+			<?php _e('Download', 'wpshop'); ?></a>
20
+			<a class="wps-bton-third-mini-rounded" target="_blank" href="<?php echo admin_url('admin-post.php?action=wps_invoice&order_id=' . $order_id . (!empty($payment_received['invoice_ref']) ? '&invoice_ref=' . $payment_received['invoice_ref'] : '')); ?>" ><?php _e('View', 'wpshop'); ?></a>
21 21
 		</td>
22 22
 	</tr>
23 23
     <?php endforeach; ?>
24 24
 </table>
25 25
 <?php endif; ?>
26 26
 
27
-<?php if ( ( 'money' == $payment_method ) && ( number_format( (float)$received_payment_amount, 2, '.', '') > number_format( (float)$payment_amount, 2, '.', '') ) ) : ?>
27
+<?php if (('money' == $payment_method) && (number_format((float)$received_payment_amount, 2, '.', '') > number_format((float)$payment_amount, 2, '.', ''))) : ?>
28 28
 <div class="alignright wps-alert wps-alert-info" id="wpspos-back-cash" >
29
-	<?php _e( 'Change due', 'wps-pos-i18n' ); ?> : <span class="wpspos-due-change" ><?php echo ( number_format( (float)$received_payment_amount, 2, '.', '') - number_format( (float)$payment_amount, 2, '.', '') );?></span>
29
+	<?php _e('Change due', 'wps-pos-i18n'); ?> : <span class="wpspos-due-change" ><?php echo (number_format((float)$received_payment_amount, 2, '.', '') - number_format((float)$payment_amount, 2, '.', '')); ?></span>
30 30
 </div>
31 31
 <?php endif; ?>
32 32
 
33 33
 <div class="wps-pos-order-completion-button" >
34
-	<a href="<?php echo admin_url( $new_order ? 'admin.php?page=wps-pos&new_order=yes' : 'admin.php?page=wps-pos' ); ?>" class="wps-bton-first-rounded alignright" role="button"><?php echo $new_order ? __('Create a new order', 'wps-pos-i18n') : __('Return to current order', 'wps-pos-i18n'); ?></a>
35
-	<?php if ( !empty( $order_postmeta ) && !empty( $order_postmeta['order_status'] ) && ( 'completed' !=  $order_postmeta['order_status'] ) ) : ?>
36
-		<a title="<?php _e( 'New payment', 'wps-pos-i18n' ); ?>" href="<?php print wp_nonce_url( admin_url( 'admin-ajax.php?action=wpspos-finalize-order&order_id=' . $order_id . '&width=560&height=420' ), 'wps_pos_finalize_order', '_wpnonce' ); ?>" class="thickbox wps-bton-third-rounded alignright" ><?php _e( 'New payment', 'wps-pos-i18n' ); ?></a>
34
+	<a href="<?php echo admin_url($new_order ? 'admin.php?page=wps-pos&new_order=yes' : 'admin.php?page=wps-pos'); ?>" class="wps-bton-first-rounded alignright" role="button"><?php echo $new_order ? __('Create a new order', 'wps-pos-i18n') : __('Return to current order', 'wps-pos-i18n'); ?></a>
35
+	<?php if (!empty($order_postmeta) && !empty($order_postmeta['order_status']) && ('completed' != $order_postmeta['order_status'])) : ?>
36
+		<a title="<?php _e('New payment', 'wps-pos-i18n'); ?>" href="<?php print wp_nonce_url(admin_url('admin-ajax.php?action=wpspos-finalize-order&order_id=' . $order_id . '&width=560&height=420'), 'wps_pos_finalize_order', '_wpnonce'); ?>" class="thickbox wps-bton-third-rounded alignright" ><?php _e('New payment', 'wps-pos-i18n'); ?></a>
37 37
 	<?php endif; ?>
38 38
 </div>
Please login to merge, or discard this patch.
includes/modules/wps-pos-addon/templates/backend/order/finalization.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 <h3><?php _e( 'Order summary', 'wps-pos-i18n' ); ?></h3>
4 6
 <ul class="wpspos-order-content-summary" >
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3
-<h3><?php _e( 'Order summary', 'wps-pos-i18n' ); ?></h3>
3
+<h3><?php _e('Order summary', 'wps-pos-i18n'); ?></h3>
4 4
 <ul class="wpspos-order-content-summary" >
5
-	<li><span class="wpspos-order-summary-title"><?php _e( 'Number of product', 'wps-pos-i18n' ); ?></span><span class="wpspos-order-summary-content" ><?php echo count( $order_items ); ?></span></li>
6
-	<li><span class="wpspos-order-summary-title"><?php _e( 'Amount to pay', 'wps-pos-i18n' ); ?></span><span class="wpspos-order-summary-content" ><?php echo wpshop_tools::formate_number( $cart_content['order_amount_to_pay_now'] ); ?> <?php echo wpshop_tools::wpshop_get_currency(); ?></span></li>
5
+	<li><span class="wpspos-order-summary-title"><?php _e('Number of product', 'wps-pos-i18n'); ?></span><span class="wpspos-order-summary-content" ><?php echo count($order_items); ?></span></li>
6
+	<li><span class="wpspos-order-summary-title"><?php _e('Amount to pay', 'wps-pos-i18n'); ?></span><span class="wpspos-order-summary-content" ><?php echo wpshop_tools::formate_number($cart_content['order_amount_to_pay_now']); ?> <?php echo wpshop_tools::wpshop_get_currency(); ?></span></li>
7 7
 </ul>
8 8
 
9
-<h3><?php _e( 'Order payment', 'wps-pos-i18n' ); ?></h3>
10
-<form class="wpspos-order-payment-form" action="<?php echo admin_url( "admin-ajax.php" ); ?>" method="post" >
9
+<h3><?php _e('Order payment', 'wps-pos-i18n'); ?></h3>
10
+<form class="wpspos-order-payment-form" action="<?php echo admin_url("admin-ajax.php"); ?>" method="post" >
11 11
 	<input type="hidden" name="action" value="wpspos-finish-order" />
12
-	<?php wp_nonce_field( 'wps_pos_process_checkout', '_wpnonce' ); ?>
12
+	<?php wp_nonce_field('wps_pos_process_checkout', '_wpnonce'); ?>
13 13
 	<input type="hidden" name="wps-pos-total-order-amount" value="<?php echo $cart_content['order_amount_to_pay_now']; ?>" />
14 14
 	<input type="hidden" name="order_id" value="<?php echo $current_order_id; ?>" />
15 15
 	<ul class="wpspos-order-payment-method" >
@@ -38,16 +38,16 @@  discard block
 block discarded – undo
38 38
 			<?php _e('Customer paid the full amount', 'wps-pos-i18n'); ?>
39 39
 		</label>
40 40
 		<div id="wpspos-received-amount-container" >
41
-			<?php _e( 'Given Amount', 'wps-pos-i18n' )?> : <input type="text" name="wpspos-order-received-amount" value="" class="wpspos-order-received-amount" placeholder="<?php echo $cart_content['order_amount_to_pay_now']; ?>" /> <?php echo wpshop_tools::wpshop_get_currency(); ?>
41
+			<?php _e('Given Amount', 'wps-pos-i18n')?> : <input type="text" name="wpspos-order-received-amount" value="" class="wpspos-order-received-amount" placeholder="<?php echo $cart_content['order_amount_to_pay_now']; ?>" /> <?php echo wpshop_tools::wpshop_get_currency(); ?>
42 42
 		</div>
43 43
 		<div class="wpshopHide alignright wps-alert wps-alert-info" id="wpspos-back-cash" >
44
-			<?php _e( 'Change due', 'wps-pos-i18n' ); ?> : <span class="wpspos-due-change" ></span>
44
+			<?php _e('Change due', 'wps-pos-i18n'); ?> : <span class="wpspos-due-change" ></span>
45 45
 		</div>
46 46
 	</div>
47 47
 	<div class="wpspos-order-cash-area" >
48 48
 		<div class="alignright" >
49
-			<button class="wps-bton-second-rounded" id="wpspos-cancel-order-cash" ><?php _e( 'Cancel', 'wps-pos-i18n' ); ?></button>
50
-			<button class="wps-bton-first-rounded wps-bton-loader" id="wpspos-order-cash" ><?php _e( 'Cash', 'wps-pos-i18n' ); ?></button>
49
+			<button class="wps-bton-second-rounded" id="wpspos-cancel-order-cash" ><?php _e('Cancel', 'wps-pos-i18n'); ?></button>
50
+			<button class="wps-bton-first-rounded wps-bton-loader" id="wpspos-order-cash" ><?php _e('Cash', 'wps-pos-i18n'); ?></button>
51 51
 		</div>
52 52
 	</div>
53 53
 </form>
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
 				    }
74 74
 
75 75
 				    if ( !payment_method_found ) {
76
-					    alert( "<?php _e( 'Please select a payment method', 'wps-pos-i18n' ); ?>" );
76
+					    alert( "<?php _e('Please select a payment method', 'wps-pos-i18n'); ?>" );
77 77
 					    return false;
78 78
 				    }
79 79
 				    else if ( ( parseFloat( deposit_amount ) > parseFloat( total_amount ) ) && ( "money" != payment_method_chosen ) ) {
80
-					    alert( "<?php _e( 'Deposit amount exceeds order amount', 'wps-pos-i18n' ); ?>" );
80
+					    alert( "<?php _e('Deposit amount exceeds order amount', 'wps-pos-i18n'); ?>" );
81 81
 				    	return false;
82 82
 				    }
83 83
 
Please login to merge, or discard this patch.
includes/modules/wps-pos-addon/templates/backend/tab_pos.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <h2 class="nav-tab-wrapper"><?php
4
-	$current = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : 'dashboard';
5
-	$tabs = array( 'dashboard' => __( 'Order', 'wps-pos-i18n'), 'bank_deposit' => __( 'Bank deposit', 'wps-pos-i18n' ) );
6
-	foreach( $tabs as $tab => $name ){
7
-		$class = ( $tab == $current ) ? ' nav-tab-active' : '';
4
+	$current = isset($_GET['tab']) ? sanitize_text_field($_GET['tab']) : 'dashboard';
5
+	$tabs = array('dashboard' => __('Order', 'wps-pos-i18n'), 'bank_deposit' => __('Bank deposit', 'wps-pos-i18n'));
6
+	foreach ($tabs as $tab => $name) {
7
+		$class = ($tab == $current) ? ' nav-tab-active' : '';
8 8
 		echo "<a class='nav-tab$class' href='?page=wps-pos&tab=$tab'>$name</a>";
9 9
 	}
10 10
 ?></h2>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 <h2 class="nav-tab-wrapper"><?php
4 6
 	$current = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : 'dashboard';
Please login to merge, or discard this patch.
includes/modules/wps-pos-addon/assets/js/header.js.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <script type="text/javascript">
4 4
 	var wpspos_sure_to_load_element_having_nothing = "<?php _e('It seems that no element exists for this letter, would you like to load the list?', 'wps-pos-i18n'); ?>";
5
-	var wpspos_confirm_product_deletion_from_order = "<?php _e( 'Are you sure you want to delete this product from the order?', 'wps-pos-I18n' ); ?>";
6
-	var wps_pos_product_with_variation_box = "<?php _e( 'Product with variation selection', 'wps-pos-I18n' ); ?>";
5
+	var wpspos_confirm_product_deletion_from_order = "<?php _e('Are you sure you want to delete this product from the order?', 'wps-pos-I18n'); ?>";
6
+	var wps_pos_product_with_variation_box = "<?php _e('Product with variation selection', 'wps-pos-I18n'); ?>";
7 7
 </script>
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 <script type="text/javascript">
4 6
 	var wpspos_sure_to_load_element_having_nothing = "<?php _e('It seems that no element exists for this letter, would you like to load the list?', 'wps-pos-i18n'); ?>";
Please login to merge, or discard this patch.