mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Try to fix travis
This commit is contained in:
parent
5c296c679e
commit
a416ec4258
|
|
@ -305,6 +305,9 @@ script:
|
|||
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log
|
||||
php upgrade2.php 5.0.0 6.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade500600-2.log
|
||||
php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log
|
||||
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log
|
||||
php upgrade2.php 6.0.0 7.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log
|
||||
cd -
|
||||
set +e
|
||||
echo
|
||||
|
|
|
|||
|
|
@ -3854,11 +3854,12 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
$this->lines[$xnbp]=$line;
|
||||
$xnbp++;
|
||||
|
||||
$this->total_ht += $line->total_ht;
|
||||
$this->total_tva += $line->total_tva;
|
||||
$this->total_ttc += $line->total_ttc;
|
||||
|
||||
$xnbp++;
|
||||
}
|
||||
$this->revenuestamp = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -142,11 +142,12 @@ class DolEditor
|
|||
* Output depends on this->tool (fckeditor, ckeditor, textarea, ...)
|
||||
*
|
||||
* @param int $noprint 1=Return HTML string instead of printing it to output
|
||||
* @param string $morejs Add more js. For example: ".on( \'saveSnapshot\', function(e) { alert(\'ee\'); });"
|
||||
* @param boolean $disallowAnyContent Disallow to use any content. true=restrict to a predefined list of allowed elements.
|
||||
* @param string $morejs Add more js. For example: ".on( \'saveSnapshot\', function(e) { alert(\'ee\'); });". Used by CKEditor only.
|
||||
* @param boolean $disallowAnyContent Disallow to use any content. true=restrict to a predefined list of allowed elements. Used by CKEditor only.
|
||||
* @param string $titlecontent Show title content before editor area. Used by ACE editor only.
|
||||
* @return void|string
|
||||
*/
|
||||
function Create($noprint=0, $morejs='', $disallowAnyContent=true)
|
||||
function Create($noprint=0, $morejs='', $disallowAnyContent=true, $titlecontent='')
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
|
|
@ -256,6 +257,26 @@ class DolEditor
|
|||
$format=(GETPOST('format','aZ09')?GETPOST('format','aZ09'):'php');
|
||||
|
||||
$out.= '<!-- Output Ace editor -->'."\n";
|
||||
|
||||
if ($titlecontent)
|
||||
{
|
||||
$out.= '<div class="aceeditorstatusbar" id="statusBar">'.$titlecontent;
|
||||
$out.= ' - <a id="morelines" href="#" class="right morelines">'.dol_escape_htmltag($langs->trans("ShowMoreLines")).'</a> ';
|
||||
$out.= '</div>';
|
||||
$out.= '<script type="text/javascript" language="javascript">'."\n";
|
||||
$out.= 'jQuery(document).ready(function() {'."\n";
|
||||
$out.= ' var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid");
|
||||
var StatusBar = window.ace.require("ace/ext/statusbar").StatusBar; // Init status bar. Need lib ext-statusbar
|
||||
var statusBar = new StatusBar(aceEditor, document.getElementById("statusBar")); // Init status bar. Need lib ext-statusbar
|
||||
jQuery("#morelines").click(function() {
|
||||
console.log("We click on more lines");
|
||||
var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid");
|
||||
aceEditor.setOptions({ maxLines: 500 });
|
||||
});
|
||||
})';
|
||||
$out.= '</script>'."\n";
|
||||
}
|
||||
|
||||
$out.= '<pre id="'.$this->htmlname.'aceeditorid" style="'.($this->width?'width: '.$this->width.'px; ':'');
|
||||
$out.= ($this->height?' height: '.$this->height.'px; ':'');
|
||||
//$out.=" min-height: 100px;";
|
||||
|
|
|
|||
|
|
@ -1960,9 +1960,10 @@ class FactureFournisseur extends CommonInvoice
|
|||
* Used to build previews or test instances.
|
||||
* id must be 0 if object instance is a specimen.
|
||||
*
|
||||
* @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines
|
||||
* @return void
|
||||
*/
|
||||
public function initAsSpecimen()
|
||||
public function initAsSpecimen($option='')
|
||||
{
|
||||
global $langs,$conf;
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
|
@ -2002,50 +2003,54 @@ class FactureFournisseur extends CommonInvoice
|
|||
$this->mode_reglement_code = 'CHQ';
|
||||
$this->note_public='This is a comment (public)';
|
||||
$this->note_private='This is a comment (private)';
|
||||
// Lines
|
||||
$nbp = 5;
|
||||
$xnbp = 0;
|
||||
while ($xnbp < $nbp)
|
||||
{
|
||||
$line=new FactureLigne($this->db);
|
||||
$line->desc=$langs->trans("Description")." ".$xnbp;
|
||||
$line->qty=1;
|
||||
$line->subprice=100;
|
||||
$line->pu_ht=100; // the canelle template use pu_ht and not subprice
|
||||
$line->price=100;
|
||||
$line->tva_tx=19.6;
|
||||
$line->localtax1_tx=0;
|
||||
$line->localtax2_tx=0;
|
||||
if ($xnbp == 2)
|
||||
{
|
||||
$line->total_ht=50;
|
||||
$line->total_ttc=59.8;
|
||||
$line->total_tva=9.8;
|
||||
$line->remise_percent=50;
|
||||
}
|
||||
else
|
||||
{
|
||||
$line->total_ht=100;
|
||||
$line->total_ttc=119.6;
|
||||
$line->total_tva=19.6;
|
||||
$line->remise_percent=0;
|
||||
}
|
||||
|
||||
if ($num_prods > 0)
|
||||
{
|
||||
$prodid = mt_rand(1, $num_prods);
|
||||
$line->fk_product=$prodids[$prodid];
|
||||
}
|
||||
$line->product_type=0;
|
||||
if (empty($option) || $option != 'nolines')
|
||||
{
|
||||
// Lines
|
||||
$nbp = 5;
|
||||
$xnbp = 0;
|
||||
while ($xnbp < $nbp)
|
||||
{
|
||||
$line=new FactureLigne($this->db);
|
||||
$line->desc=$langs->trans("Description")." ".$xnbp;
|
||||
$line->qty=1;
|
||||
$line->subprice=100;
|
||||
$line->pu_ht=100; // the canelle template use pu_ht and not subprice
|
||||
$line->price=100;
|
||||
$line->tva_tx=19.6;
|
||||
$line->localtax1_tx=0;
|
||||
$line->localtax2_tx=0;
|
||||
if ($xnbp == 2)
|
||||
{
|
||||
$line->total_ht=50;
|
||||
$line->total_ttc=59.8;
|
||||
$line->total_tva=9.8;
|
||||
$line->remise_percent=50;
|
||||
}
|
||||
else
|
||||
{
|
||||
$line->total_ht=100;
|
||||
$line->total_ttc=119.6;
|
||||
$line->total_tva=19.6;
|
||||
$line->remise_percent=0;
|
||||
}
|
||||
|
||||
$this->lines[$xnbp]=$line;
|
||||
if ($num_prods > 0)
|
||||
{
|
||||
$prodid = mt_rand(1, $num_prods);
|
||||
$line->fk_product=$prodids[$prodid];
|
||||
}
|
||||
$line->product_type=0;
|
||||
|
||||
$this->total_ht += $line->total_ht;
|
||||
$this->total_tva += $line->total_tva;
|
||||
$this->total_ttc += $line->total_ttc;
|
||||
$this->lines[$xnbp]=$line;
|
||||
|
||||
$xnbp++;
|
||||
}
|
||||
$this->total_ht += $line->total_ht;
|
||||
$this->total_tva += $line->total_tva;
|
||||
$this->total_ttc += $line->total_ttc;
|
||||
|
||||
$xnbp++;
|
||||
}
|
||||
}
|
||||
|
||||
$this->amount_ht = $xnbp*100;
|
||||
$this->total_ht = $xnbp*100;
|
||||
|
|
|
|||
|
|
@ -760,7 +760,7 @@ $head[$h][2] = 'deletemodule';
|
|||
$h++;
|
||||
|
||||
|
||||
dol_fiche_head($head, $module, $langs->trans("Modules"), -1, 'generic');
|
||||
dol_fiche_head($head, $module, $langs->trans("Modules"), -1, 'generic'); // Modules
|
||||
|
||||
if ($module == 'initmodule')
|
||||
{
|
||||
|
|
@ -871,8 +871,6 @@ elseif (! empty($module))
|
|||
print ' '.$linktoenabledisable;
|
||||
print '<br><br>';
|
||||
|
||||
dol_fiche_head($head2, $tab, '', -1, '');
|
||||
|
||||
if ($tab == 'description')
|
||||
{
|
||||
$pathtofile = $modulelowercase.'/core/modules/mod'.$module.'.class.php';
|
||||
|
|
@ -881,7 +879,9 @@ elseif (! empty($module))
|
|||
|
||||
if ($action != 'editfile' || empty($file))
|
||||
{
|
||||
print $langs->trans("ModuleBuilderDesc".$tab).'<br><br>';
|
||||
dol_fiche_head($head2, $tab, '', -1, ''); // Description - level 2
|
||||
|
||||
print $langs->trans("ModuleBuilderDesc".$tab).'<br><br>';
|
||||
|
||||
print '<span class="fa fa-file"></span> '.$langs->trans("DescriptorFile").' : <strong>'.$pathtofile.'</strong>';
|
||||
print ' <a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.'&action=editfile&format=php&file='.urlencode($pathtofile).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>';
|
||||
|
|
@ -978,10 +978,12 @@ elseif (! empty($module))
|
|||
print $moduleobj->getChangeLog();
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
else
|
||||
{
|
||||
$fullpathoffile=dol_buildpath($file, 0);
|
||||
$fullpathoffile=dol_buildpath($file, 0); // Description - level 2
|
||||
|
||||
$content = file_get_contents($fullpathoffile);
|
||||
|
||||
|
|
@ -993,28 +995,12 @@ elseif (! empty($module))
|
|||
print '<input type="hidden" name="tab" value="'.$tab.'">';
|
||||
print '<input type="hidden" name="module" value="'.$module.'">';
|
||||
|
||||
$htmlname='editfilecontent';
|
||||
dol_fiche_head($head2, $tab, '', -1, '');
|
||||
|
||||
$out.= '<div class="aceeditorstatusbar" id="statusBar">'.$langs->trans("File").' : '.$file;
|
||||
$out.= ' - <a id="morelines" href="#" class="right morelines">'.dol_escape_htmltag($langs->trans("ShowMoreLines")).'</a> ';
|
||||
$out.= '</div>';
|
||||
$out.= '<script type="text/javascript" language="javascript">'."\n";
|
||||
$out.= 'jQuery(document).ready(function() {'."\n";
|
||||
$out.= ' var aceEditor = window.ace.edit("'.$htmlname.'aceeditorid");
|
||||
// Init status bar. Need lib ext-statusbar
|
||||
var StatusBar = window.ace.require("ace/ext/statusbar").StatusBar;
|
||||
var statusBar = new StatusBar(aceEditor, document.getElementById("statusBar"));';
|
||||
$out.= ' jQuery("#morelines").click(function() {
|
||||
console.log("We click on more lines");
|
||||
var aceEditor = window.ace.edit("'.$htmlname.'aceeditorid");
|
||||
aceEditor.setOptions({ maxLines: 500 });
|
||||
});
|
||||
})';
|
||||
$out.= '</script>'."\n";
|
||||
print $out;
|
||||
$doleditor=new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', '');
|
||||
print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file);
|
||||
|
||||
$doleditor=new DolEditor($htmlname, $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', '');
|
||||
print $doleditor->Create(1, '', false);
|
||||
dol_fiche_end();
|
||||
|
||||
print '<center>';
|
||||
print '<input type="submit" class="button" id="savefile" name="savefile" value="'.dol_escape_htmltag($langs->trans("Save")).'">';
|
||||
|
|
@ -1025,6 +1011,10 @@ elseif (! empty($module))
|
|||
print '</form>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_fiche_head($head2, $tab, '', -1, ''); // Level 2
|
||||
}
|
||||
|
||||
|
||||
if ($tab == 'specifications')
|
||||
|
|
@ -1062,7 +1052,7 @@ elseif (! empty($module))
|
|||
print '<input type="hidden" name="module" value="'.$module.'">';
|
||||
|
||||
$doleditor=new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%');
|
||||
print $doleditor->Create(1, '', false);
|
||||
print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file);
|
||||
print '<br>';
|
||||
print '<center>';
|
||||
print '<input type="submit" class="button" id="savefile" name="savefile" value="'.dol_escape_htmltag($langs->trans("Save")).'">';
|
||||
|
|
@ -1112,7 +1102,7 @@ elseif (! empty($module))
|
|||
else $tabobj = 'newobject';
|
||||
}
|
||||
|
||||
dol_fiche_head($head3, $tabobj, '', -1, '');
|
||||
dol_fiche_head($head3, $tabobj, '', -1, ''); // Level 3
|
||||
|
||||
if ($tabobj == 'newobject')
|
||||
{
|
||||
|
|
@ -1324,7 +1314,7 @@ elseif (! empty($module))
|
|||
print '<input type="hidden" name="module" value="'.$module.'">';
|
||||
|
||||
$doleditor=new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%');
|
||||
print $doleditor->Create(1, '', false);
|
||||
print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file);
|
||||
print '<br>';
|
||||
print '<center>';
|
||||
print '<input type="submit" class="button" id="savefile" name="savefile" value="'.dol_escape_htmltag($langs->trans("Save")).'">';
|
||||
|
|
@ -1335,6 +1325,8 @@ elseif (! empty($module))
|
|||
print '</form>';
|
||||
}
|
||||
}
|
||||
|
||||
dol_fiche_end(); // Level 3
|
||||
}
|
||||
|
||||
if ($tab == 'menus')
|
||||
|
|
@ -1373,7 +1365,7 @@ elseif (! empty($module))
|
|||
print '<input type="hidden" name="module" value="'.$module.'">';
|
||||
|
||||
$doleditor=new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%');
|
||||
print $doleditor->Create(1, '', false);
|
||||
print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file);
|
||||
print '<br>';
|
||||
print '<center>';
|
||||
print '<input type="submit" class="button" id="savefile" name="savefile" value="'.dol_escape_htmltag($langs->trans("Save")).'">';
|
||||
|
|
@ -1418,7 +1410,7 @@ elseif (! empty($module))
|
|||
print '<input type="hidden" name="module" value="'.$module.'">';
|
||||
|
||||
$doleditor=new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%');
|
||||
print $doleditor->Create(1, '', false);
|
||||
print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file);
|
||||
print '<br>';
|
||||
print '<center>';
|
||||
print '<input type="submit" class="button" id="savefile" name="savefile" value="'.dol_escape_htmltag($langs->trans("Save")).'">';
|
||||
|
|
@ -1462,7 +1454,7 @@ elseif (! empty($module))
|
|||
print '<input type="hidden" name="module" value="'.$module.'">';
|
||||
|
||||
$doleditor=new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%');
|
||||
print $doleditor->Create(1, '', false);
|
||||
print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file);
|
||||
print '<br>';
|
||||
print '<center>';
|
||||
print '<input type="submit" class="button" id="savefile" name="savefile" value="'.dol_escape_htmltag($langs->trans("Save")).'">';
|
||||
|
|
@ -1559,11 +1551,14 @@ elseif (! empty($module))
|
|||
print '</form>';
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
if ($tab != 'description')
|
||||
{
|
||||
dol_fiche_end();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
dol_fiche_end(); // End modules
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3672,7 +3672,7 @@ a.cke_dialog_ui_button_ok span {
|
|||
bottom: 0;
|
||||
height: 20px;
|
||||
background-color: #ebebeb;
|
||||
/* color: gray; */
|
||||
color: #666;
|
||||
}
|
||||
.ace_status-indicator {
|
||||
color: gray;
|
||||
|
|
@ -3680,12 +3680,11 @@ a.cke_dialog_ui_button_ok span {
|
|||
right: 0;
|
||||
border-left: 1px solid;
|
||||
}
|
||||
.aceeditorstatusbar {
|
||||
|
||||
pre#editfilecontentaceeditorid {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* File upload */
|
||||
/* ============================================================================== */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user