diff --git a/include/class_document.php b/include/class_document.php index b97125936..b064ff6bd 100644 --- a/include/class_document.php +++ b/include/class_document.php @@ -560,6 +560,14 @@ class Document $r=$tiers->strAttribut(ATTR_DEF_PAYS); break; + case 'CUST_COUNTRY': + $tiers=new fiche($this->db); + $qcode=isset($_REQUEST['qcode_dest'])?$_REQUEST['qcode_dest']:$_REQUEST['e_client']; + $tiers->getByQcode($qcode,false); + $r=$tiers->strAttribut(ATTR_DEF_PAYS); + break; + // Marchandise in $_POST['e_march*'] + // \see user_form_achat.php or user_form_ven.php case 'CUST_VAT': $tiers=new fiche($this->db); $qcode=isset($_REQUEST['qcode_dest'])?$_REQUEST['qcode_dest']:$_REQUEST['e_client'];