';
// Ref
- print '| '.$langs->trans("Ref").' | '.$object->id.' |
';
+ print '| '.$langs->trans("Ref").' | '.$object->id.' |
';
// Login
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
@@ -1077,21 +1073,7 @@ else
$morphys["mor"] = $langs->trans("Morale");
print '| '.$langs->trans("Nature").' | ';
print $form->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy);
- print " | ";
-
- // Photo
- print '';
- print $form->showphoto('memberphoto',$object)."\n";
- if ($caneditfieldmember)
- {
- if ($object->photo) print " \n";
- print '';
- }
- print ' | ';
+ print "
";
// Type
print '| '.$langs->trans("Type").' | ';
@@ -1123,6 +1105,21 @@ else
print ' |
| '.$langs->trans("Firstname").' | firstname).'"> | ';
print '
';
+ // Photo
+ print '| '.$langs->trans("Photo").' | ';
+ print '';
+ print $form->showphoto('memberphoto',$object)."\n";
+ if ($caneditfieldmember)
+ {
+ if ($object->photo) print " \n";
+ print '';
+ }
+ print ' |
';
+
// EMail
print '| '.($conf->global->ADHERENT_MAIL_REQUIRED?'':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'':'').' | email).'"> |
';
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 1e3d59b7e65..bea5571730f 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -1058,7 +1058,8 @@ class Facture extends CommonInvoice
if (empty($rowid) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1;
- $sql = 'SELECT f.rowid,f.facnumber,f.ref_client,f.ref_ext,f.ref_int,f.type,f.fk_soc,f.amount,f.tva, f.localtax1, f.localtax2, f.total, f.total_ttc, f.revenuestamp';
+ $sql = 'SELECT f.rowid,f.facnumber,f.ref_client,f.ref_ext,f.ref_int,f.type,f.fk_soc,f.amount';
+ $sql.= ', f.tva, f.localtax1, f.localtax2, f.total, f.total_ttc, f.revenuestamp';
$sql.= ', f.remise_percent, f.remise_absolue, f.remise';
$sql.= ', f.datef as df, f.date_pointoftax';
$sql.= ', f.date_lim_reglement as dlr';
@@ -1204,7 +1205,7 @@ class Facture extends CommonInvoice
{
$this->lines=array();
- $sql = 'SELECT l.rowid, l.fk_product, l.fk_parent_line, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.tva_tx, ';
+ $sql = 'SELECT l.rowid, l.fk_product, l.fk_parent_line, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.vat_src_code, l.tva_tx,';
$sql.= ' l.situation_percent, l.fk_prev_id,';
$sql.= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice,';
$sql.= ' l.rang, l.special_code,';
@@ -1243,6 +1244,8 @@ class Facture extends CommonInvoice
$line->fk_product_type = $objp->fk_product_type; // Type of product
$line->qty = $objp->qty;
$line->subprice = $objp->subprice;
+
+ $line->vat_src_code = $objp->vat_src_code;
$line->tva_tx = $objp->tva_tx;
$line->localtax1_tx = $objp->localtax1_tx;
$line->localtax2_tx = $objp->localtax2_tx;
@@ -2667,11 +2670,14 @@ class Facture extends CommonInvoice
$this->line->label = $label;
$this->line->desc = $desc;
$this->line->qty = ($this->type==self::TYPE_CREDIT_NOTE?abs($qty):$qty); // For credit note, quantity is always positive and unit price negative
+
+ $this->line->vat_src_code=$vat_src_code;
$this->line->tva_tx = $txtva;
$this->line->localtax1_tx = $txlocaltax1;
$this->line->localtax2_tx = $txlocaltax2;
$this->line->localtax1_type = $localtaxes_type[0];
$this->line->localtax2_type = $localtaxes_type[2];
+
$this->line->remise_percent = $remise_percent;
$this->line->subprice = ($this->type==2?-abs($pu_ht):$pu_ht); // For credit note, unit price always negative, always positive otherwise
$this->line->date_start = $date_start;
@@ -4523,6 +4529,7 @@ class FactureLigne extends CommonInvoiceLine
$sql.= ",remise_percent=".price2num($this->remise_percent)."";
if ($this->fk_remise_except) $sql.= ",fk_remise_except=".$this->fk_remise_except;
else $sql.= ",fk_remise_except=null";
+ $sql.= ",vat_src_code = '".(empty($this->vat_src_code)?'':$this->vat_src_code)."'";
$sql.= ",tva_tx=".price2num($this->tva_tx)."";
$sql.= ",localtax1_tx=".price2num($this->localtax1_tx)."";
$sql.= ",localtax2_tx=".price2num($this->localtax2_tx)."";
diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php
index 6f2d4a2128f..672da011a79 100644
--- a/htdocs/core/actions_linkedfiles.inc.php
+++ b/htdocs/core/actions_linkedfiles.inc.php
@@ -40,7 +40,7 @@ elseif (GETPOST('linkit') && ! empty($conf->global->MAIN_UPLOAD_DOC))
$link = GETPOST('link', 'alpha');
if ($link)
{
- if (substr($link, 0, 7) != 'http://' && substr($link, 0, 8) != 'https://') {
+ if (substr($link, 0, 7) != 'http://' && substr($link, 0, 8) != 'https://' && substr($link, 0, 7) != 'file://') {
$link = 'http://' . $link;
}
dol_add_file_process($upload_dir, 0, 1, 'userfile', null, $link);
@@ -124,7 +124,7 @@ elseif ($action == 'confirm_updateline' && GETPOST('save') && GETPOST('link', 'a
if ($f)
{
$link->url = GETPOST('link', 'alpha');
- if (substr($link->url, 0, 7) != 'http://' && substr($link->url, 0, 8) != 'https://')
+ if (substr($link->url, 0, 7) != 'http://' && substr($link->url, 0, 8) != 'https://' && substr($link->url, 0, 7) != 'file://')
{
$link->url = 'http://' . $link->url;
}
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index 9bb8af69a35..d34671b9806 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -584,7 +584,7 @@ class FactureFournisseur extends CommonInvoice
*/
function fetch_lines()
{
- $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx';
+ $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.vat_src_code, f.tva_tx';
$sql.= ', f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 ';
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit';
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
@@ -609,7 +609,7 @@ class FactureFournisseur extends CommonInvoice
$line = new SupplierInvoiceLine($this->db);
$line->id = $obj->rowid;
- $line->rowid = $obj->rowid;
+ $line->rowid = $obj->rowid;
$line->description = $obj->description;
$line->product_ref = $obj->product_ref;
$line->ref = $obj->product_ref;
@@ -618,27 +618,29 @@ class FactureFournisseur extends CommonInvoice
$line->label = $obj->label;
$line->product_desc = $obj->product_desc;
$line->subprice = $obj->pu_ht;
- $line->pu_ht = $obj->pu_ht;
+ $line->pu_ht = $obj->pu_ht;
$line->pu_ttc = $obj->pu_ttc;
+
+ $line->vat_src_code = $obj->vat_src_code;
$line->tva_tx = $obj->tva_tx;
$line->localtax1_tx = $obj->localtax1_tx;
$line->localtax2_tx = $obj->localtax2_tx;
$line->qty = $obj->qty;
- $line->remise_percent = $obj->remise_percent;
+ $line->remise_percent = $obj->remise_percent;
$line->tva = $obj->total_tva;
$line->total_ht = $obj->total_ht;
- $line->total_tva = $obj->total_tva;
+ $line->total_tva = $obj->total_tva;
$line->total_localtax1 = $obj->total_localtax1;
$line->total_localtax2 = $obj->total_localtax2;
- $line->total_ttc = $obj->total_ttc;
+ $line->total_ttc = $obj->total_ttc;
$line->fk_product = $obj->fk_product;
$line->product_type = $obj->product_type;
- $line->product_label = $obj->label;
- $line->info_bits = $obj->info_bits;
- $line->fk_parent_line = $obj->fk_parent_line;
+ $line->product_label = $obj->label;
+ $line->info_bits = $obj->info_bits;
+ $line->fk_parent_line = $obj->fk_parent_line;
$line->special_code = $obj->special_code;
$line->rang = $obj->rang;
- $line->fk_unit = $obj->fk_unit;
+ $line->fk_unit = $obj->fk_unit;
// Multicurrency
$line->fk_multicurrency = $obj->fk_multicurrency;
@@ -1480,6 +1482,8 @@ class FactureFournisseur extends CommonInvoice
$line->pu_ttc = $pu_ttc;
$line->qty = $qty;
$line->remise_percent = $remise_percent;
+
+ $this->line->vat_src_code=$vat_src_code;
$line->tva_tx = $vatrate;
$line->localtax1_tx = $txlocaltax1;
$line->localtax2_tx = $txlocaltax2;
@@ -2458,6 +2462,7 @@ class SupplierInvoiceLine extends CommonObjectLine
$sql.= ", pu_ttc = ".price2num($this->pu_ttc);
$sql.= ", qty = ".price2num($this->qty);
$sql.= ", remise_percent = ".price2num($this->remise_percent);
+ $sql.= ", vat_src_code = '".(empty($this->vat_src_code)?'':$this->vat_src_code)."'";
$sql.= ", tva_tx = ".price2num($this->tva_tx);
$sql.= ", localtax1_tx = ".price2num($this->localtax1_tx);
$sql.= ", localtax2_tx = ".price2num($this->localtax2_tx);