Pārlūkot izejas kodu

Fix hidden type doc

stany.ferer 1 gadu atpakaļ
vecāks
revīzija
e84318c984

+ 1 - 1
core/javascript/cms.document.php

@@ -34,7 +34,7 @@
 
         if (allFieldsFilled) {
             const selectedType = $("#id_type").val();
-            if (selectedType !== "1" || selectedType !== "0") {
+            if (selectedType !== "1" && selectedType !== "0") {
                 $("#id_client").val("");
             }
             form.submit();

+ 1 - 1
core/views/pages/cms.document.php

@@ -109,7 +109,7 @@ if (isset($document["id"]) and access::ifAccesss("add-document")) {
             $_client = (isset($document["id_client"])) ? $document["id_client"] : NULL;
             $_all_clients = clients::getAll();
             ?>
-            <div class="form-group" id="client-section"<?php if($_type_document != 1){ echo 'style=" display: none;"'; } ?>>
+            <div class="form-group" id="client-section"<?php if($_type_document != 1 AND $_type_document != 0){ echo 'style=" display: none;"'; } ?>>
                 <label>Facture(s) liée(s) à</label>
                 <select name="id_client" id="id_client" class="form-select" <?php if (!access::ifAccesss("add-client")) {
                                                                     echo "disabled";