From 1381373c95250e161ff569c6469490b544572b13 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 18 Apr 2013 09:24:29 +0200 Subject: [PATCH] Fix : set emetteur to MYCOMPANY when payment is a customer --- htdocs/compta/paiement.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 4a8f93a52f6..232126d68e2 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -286,7 +286,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $(\'.fieldrequireddyn\').addClass(\'fieldrequired\'); if ($(\'#fieldchqemetteur\').val() == \'\') { - $(\'#fieldchqemetteur\').val(jQuery(\'#thirdpartylabel\').val()); + var emetteur = ('.$facture->type.' == 2) ? \''.dol_escape_htmltag(MAIN_INFO_SOCIETE_NOM).'\' : jQuery(\'#thirdpartylabel\').val(); + $(\'#fieldchqemetteur\').val(emetteur); } } else