Fix: We keep notes
This commit is contained in:
parent
ad953f05c8
commit
f482ba18c3
@ -1457,11 +1457,15 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print $form->selectarray('model',$liste,$conf->global->COMMANDE_ADDON_PDF);
|
||||
print "</td></tr>";
|
||||
|
||||
|
||||
// Note publique
|
||||
print '<tr>';
|
||||
print '<td class="border" valign="top">'.$langs->trans('NotePublic').'</td>';
|
||||
print '<td valign="top" colspan="2">';
|
||||
print '<textarea name="note_public" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_public.'</textarea>';
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
||||
print $doleditor->Create(1);
|
||||
//print '<textarea name="note_public" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_public.'</textarea>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Note privee
|
||||
@ -1470,7 +1474,10 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '<tr>';
|
||||
print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>';
|
||||
print '<td valign="top" colspan="2">';
|
||||
print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_private.'</textarea>';
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
||||
print $doleditor->Create(1);
|
||||
//print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_private.'</textarea>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -2143,16 +2143,18 @@ else
|
||||
$text.=$notify->confirmMessage('NOTIFY_VAL_FAC',$object->socid);
|
||||
}
|
||||
$formquestion=array();
|
||||
|
||||
if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $object->hasProductsOrServices(1))
|
||||
{
|
||||
$langs->load("stocks");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/class/html.formproduct.class.php");
|
||||
$formproduct=new FormProduct($db);
|
||||
$label=$object->type==2?$langs->trans("SelectWarehouseForStockIncrease"):$langs->trans("SelectWarehouseForStockDecrease");
|
||||
$formquestion=array(
|
||||
//'text' => $langs->trans("ConfirmClone"),
|
||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
||||
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
|
||||
}
|
||||
if ($object->type != 2 && $object->total_ttc < 0) // Can happen only if $conf->global->FACTURE_ENABLE_NEGATIVE is on
|
||||
{
|
||||
@ -2171,11 +2173,12 @@ else
|
||||
$langs->load("stocks");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/class/html.formproduct.class.php");
|
||||
$formproduct=new FormProduct($db);
|
||||
$label=$object->type==2?$langs->trans("SelectWarehouseForStockDecrease"):$langs->trans("SelectWarehouseForStockIncrease");
|
||||
$formquestion=array(
|
||||
//'text' => $langs->trans("ConfirmClone"),
|
||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
||||
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
|
||||
}
|
||||
|
||||
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('UnvalidateBill'),$text,'confirm_modif',$formquestion,"yes",1);
|
||||
|
||||
@ -47,8 +47,8 @@ class DolEditor
|
||||
/**
|
||||
* Create an object to build an HTML area to edit a large string content
|
||||
*
|
||||
* @param string $htmlname HTML name of WYSIWIG form
|
||||
* @param string $content Content of WYSIWIG form
|
||||
* @param string $htmlname HTML name of WYSIWIG field
|
||||
* @param string $content Content of WYSIWIG field
|
||||
* @param int $width Width in pixel of edit area (auto by default)
|
||||
* @param int $height Height in pixel of edit area (200px by default)
|
||||
* @param string $toolbarname Name of bar set to use ('Full', 'dolibarr_notes', 'dolibarr_details', 'dolibarr_mailings')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user