Skip to content

Commit

Permalink
Update boletopaghiper.php
Browse files Browse the repository at this point in the history
correção para atualização de taxas extras do pedido
  • Loading branch information
loja5combr authored May 1, 2019
1 parent 0540369 commit 84fc66b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function getFrete(){
}

public function getTaxas(){
$query = $this->db->query("SELECT SUM(value) AS taxa FROM " . DB_PREFIX . "order_total WHERE order_id = '" . (int)$this->session->data['order_id'] . "' AND code = 'tax'");
$query = $this->db->query("SELECT SUM(value) AS taxa FROM " . DB_PREFIX . "order_total WHERE value > 0 AND order_id = '" . (int)$this->session->data['order_id'] . "' AND (code = 'handling' || code = 'tax')");
if(isset($query->row['taxa'])){
return abs($query->row['taxa']);
}else{
Expand Down Expand Up @@ -212,4 +212,4 @@ public function confirm() {
echo json_encode($json);
}
}
?>
?>

0 comments on commit 84fc66b

Please sign in to comment.