mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0
This commit is contained in:
commit
d3dd3dacfe
|
|
@ -155,7 +155,7 @@ if ($action == 'add') {
|
|||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."overwrite_trans(lang, transkey, transvalue, entity) VALUES ('".$db->escape($langcode)."','".$db->escape($transkey)."','".$db->escape($transvalue)."', ".((int) $conf->entity).")";
|
||||
$result = $db->query($sql);
|
||||
if ($result > 0) {
|
||||
if ($result) {
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
|
||||
$action = "";
|
||||
|
|
@ -177,7 +177,7 @@ if ($action == 'add') {
|
|||
if ($action == 'delete') {
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."overwrite_trans WHERE rowid = ".((int) $id);
|
||||
$result = $db->query($sql);
|
||||
if ($result >= 0) {
|
||||
if ($result) {
|
||||
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
|
|
@ -297,7 +297,7 @@ foreach ($modulesdir as $keydir => $tmpsearchdir) {
|
|||
|
||||
$result = $newlang->load($langkey, 0, 0, '', 0); // Load translation files + database overwrite
|
||||
$result = $newlangfileonly->load($langkey, 0, 0, '', 1); // Load translation files only
|
||||
if ($result < 0) {
|
||||
if (!$result) {
|
||||
print 'Failed to load language file '.$tmpfile.'<br>'."\n";
|
||||
} else {
|
||||
$listoffiles[$langkey] = $tmpfile;
|
||||
|
|
|
|||
|
|
@ -1036,7 +1036,8 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!$error && ($qty >= 0) && (!empty($product_desc) || (!empty($idprod) && $idprod > 0))) {
|
||||
$propal_qty_requirement = (!empty($conf->global->PROPAL_ENABLE_NEGATIVE_QTY) ? ($qty >= 0 || $qty <= 0) : $qty >= 0);
|
||||
if (!$error && $propal_qty_requirement && (!empty($product_desc) || (!empty($idprod) && $idprod > 0))) {
|
||||
$pu_ht = 0;
|
||||
$pu_ttc = 0;
|
||||
$pu_ht_devise = 0;
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO
|
|||
$action = 'presend';
|
||||
} else {
|
||||
$result = $mailfile->sendfile();
|
||||
if ($result) {
|
||||
if ($result >= 0) {
|
||||
// Initialisation of datas of object to call trigger
|
||||
if (is_object($object)) {
|
||||
if (empty($actiontypecode)) {
|
||||
|
|
|
|||
|
|
@ -9349,7 +9349,12 @@ abstract class CommonObject
|
|||
$line = (object) $line;
|
||||
}
|
||||
|
||||
$result = $line->create($user, 1);
|
||||
$result = 0;
|
||||
if (method_exists($line, 'insert')) {
|
||||
$result = $line->insert($user, 1);
|
||||
} elseif (method_exists($line, 'create')) {
|
||||
$result = $line->create($user, 1);
|
||||
}
|
||||
if ($result < 0) {
|
||||
$this->error = $line->error;
|
||||
$this->db->rollback();
|
||||
|
|
|
|||
|
|
@ -67,16 +67,16 @@ print '<script type="text/javascript">
|
|||
init_price();
|
||||
});
|
||||
jQuery("#nbpiece").keyup(function(event) {
|
||||
console.log("We enter a qty on "+event.which);
|
||||
if ( event.which == 54 ) { /* char - */
|
||||
console.log("We enter a qty on "+event.key);
|
||||
if ( event.key == "-" ) { /* char - */
|
||||
console.log("We set direction to value 1");
|
||||
jQuery("#nbpiece").val(jQuery("#nbpiece").val().replace("-", ""));
|
||||
|
||||
jQuery("#mouvement option").removeAttr("selected").change();
|
||||
jQuery("#mouvement option[value=1]").attr("selected","selected").trigger("change");
|
||||
jQuery("#mouvement").trigger("change");
|
||||
} else if ( event.which == 187 ) { /* char + */
|
||||
} else if ( event.key == "+" ) { /* char + */
|
||||
console.log("We set direction to value 0");
|
||||
jQuery("#nbpiece").val(jQuery("#nbpiece").val().replace("+", ""));
|
||||
jQuery("#mouvement option").removeAttr("selected").change();
|
||||
jQuery("#mouvement option[value=0]").attr("selected","selected").trigger("change");
|
||||
jQuery("#mouvement").trigger("change");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user