Merge branch 'fixes/fix-code-from-client-to-lieu' into staging
This commit is contained in:
commit
4a1a39c551
@ -130,7 +130,7 @@ return [
|
||||
['name' => 'page#addClientGroupDiscountFeatureTables', 'url' => '/addClientGroupDiscountFeatureTables', 'verb' => 'POST'],
|
||||
['name' => 'page#addClientGroupFacturationFeatureTables', 'url' => '/addClientGroupFacturationFeatureTables', 'verb' => 'POST'],
|
||||
['name' => 'page#addProductTypeTables', 'url' => '/addProductTypeTables', 'verb' => 'POST'],
|
||||
['name' => 'page#addClientCodesColumn', 'url' => '/addClientCodesColumn', 'verb' => 'POST'],
|
||||
['name' => 'page#addLocationCodesColumn', 'url' => '/addLocationCodesColumn', 'verb' => 'POST'],
|
||||
|
||||
//clients discount
|
||||
['name' => 'page#getClientGroupDiscounts', 'url' => '/getClientGroupDiscounts', 'verb' => 'PROPFIND'],
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2724,9 +2724,9 @@ class PageController extends Controller {
|
||||
*
|
||||
*/
|
||||
|
||||
public function addClientCodesColumn(){
|
||||
public function addLocationCodesColumn(){
|
||||
try{
|
||||
$this->myDb->addClientCodesColumn();
|
||||
$this->myDb->addLocationCodesColumn();
|
||||
return true;
|
||||
}
|
||||
catch(\OCP\Files\NotFoundException $e) { }
|
||||
|
||||
@ -230,7 +230,8 @@ class Bdd {
|
||||
}
|
||||
|
||||
public function getLieux($idNextcloud){
|
||||
$sql = "SELECT lieu.nom, lieu.adresse, lieu.latitude,lieu.longitude, lieu.user_id, lieu.id
|
||||
$sql = "SELECT lieu.nom, lieu.adresse, lieu.latitude,lieu.longitude, lieu.user_id, lieu.id,
|
||||
lieu.portal_code,lieu.alarm_code,lieu.funeral_code
|
||||
FROM ".$this->tableprefix."lieu as lieu
|
||||
ORDER BY lieu.id DESC";
|
||||
return $this->execSQL($sql, array());
|
||||
@ -659,8 +660,10 @@ class Bdd {
|
||||
.$this->tableprefix."defunt.id as id_defunt, ".$this->tableprefix."defunt.nom as nom_defunt,"
|
||||
.$this->tableprefix."client.id as clientid, ".$this->tableprefix."client.nom, "
|
||||
.$this->tableprefix."client.prenom, legal_one, entreprise, telephone, mail, ".$this->tableprefix."client.adresse,"
|
||||
.$this->tableprefix."client.portal_code, alarm_code, funeral_code,"
|
||||
.$this->tableprefix."lieu.nom as lieu, ".$this->tableprefix."lieu.adresse as adresse_soin ,"
|
||||
.$this->tableprefix."lieu.portal_code as portal_code,"
|
||||
.$this->tableprefix."lieu.alarm_code as alarm_code,"
|
||||
.$this->tableprefix."lieu.funeral_code as funeral_code,"
|
||||
.$this->tableprefix."thanato.nom as nom_thanato, ".$this->tableprefix."thanato.prenom as prenom_thanato
|
||||
FROM ".$this->tableprefix."devis
|
||||
LEFT JOIN ".$this->tableprefix."client on id_client = ".$this->tableprefix."client.id
|
||||
@ -1440,7 +1443,7 @@ class Bdd {
|
||||
if(floatval($lieu->latitude)!=0 && floatval($lieu->longitude)!=0) {
|
||||
$adresse = $this->recuperer_adresse(floatval($lieu->latitude), floatval($lieu->longitude));
|
||||
$sql = "UPDATE ".$this->tableprefix.$table." SET adresse = ? WHERE `id` = ?";
|
||||
$this->execSQLNoData($sql, array(htmlentities($adresse), $id));
|
||||
$this->execSQLNoData($sql, array($adresse, $id));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3286,16 +3289,16 @@ class Bdd {
|
||||
"Code alarme" => $devis->alarm_code,
|
||||
"Code funéraire" => $devis->funeral_code
|
||||
];
|
||||
$clientCodeMessageContent = "";
|
||||
$locationCodeMessageContent = "";
|
||||
foreach($clientCodes as $label => $code){
|
||||
$value = "Aucun";
|
||||
if($code != null && trim($code) != ""){
|
||||
$value = $code;
|
||||
}
|
||||
$clientCodeMessageContent .= $label. ": ".$value.". ";
|
||||
$locationCodeMessageContent .= $label. ": ".$value.". ";
|
||||
}
|
||||
$clientCodeMessageContent = trim($clientCodeMessageContent);
|
||||
$message .= $clientCodeMessageContent;
|
||||
$locationCodeMessageContent = trim($locationCodeMessageContent);
|
||||
$message .= $locationCodeMessageContent;
|
||||
return $message;
|
||||
}
|
||||
|
||||
@ -3499,16 +3502,16 @@ class Bdd {
|
||||
return $productTypes;
|
||||
}
|
||||
|
||||
public function addClientCodesColumn(){
|
||||
$sql = "ALTER TABLE oc_gestion_client
|
||||
public function addLocationCodesColumn(){
|
||||
$sql = "ALTER TABLE oc_gestion_lieu
|
||||
ADD portal_code VARCHAR(255) DEFAULT NULL;";
|
||||
$this->execSQLNoData($sql,[]);
|
||||
|
||||
$sql = "ALTER TABLE oc_gestion_client
|
||||
$sql = "ALTER TABLE oc_gestion_lieu
|
||||
ADD alarm_code VARCHAR(255) DEFAULT NULL;";
|
||||
$this->execSQLNoData($sql,[]);
|
||||
|
||||
$sql = "ALTER TABLE oc_gestion_client
|
||||
$sql = "ALTER TABLE oc_gestion_lieu
|
||||
ADD funeral_code VARCHAR(255) DEFAULT NULL;";
|
||||
$this->execSQLNoData($sql,[]);
|
||||
}
|
||||
|
||||
@ -18,9 +18,6 @@ export class Client {
|
||||
this.adresse = ((myresp.adresse.length === 0) ? '-' : myresp.adresse);
|
||||
this.clientGroupName = ((myresp.client_group_name.length === 0) ? '-' : myresp.client_group_name);
|
||||
this.clientGroupFacturationName = ((myresp.client_group_facturation_name.length === 0) ? '-' : myresp.client_group_facturation_name);
|
||||
this.portalCode = myresp.portal_code != null && myresp.portal_code.length > 0 ? myresp.portal_code : "-";
|
||||
this.alarmCode = myresp.alarm_code != null && myresp.alarm_code.length > 0 ? myresp.alarm_code : "-";
|
||||
this.funeralCode = myresp.funeral_code != null && myresp.funeral_code.length > 0 ? myresp.funeral_code : "-";
|
||||
|
||||
let clientGroupId = 0;
|
||||
if(myresp.fk_client_group_id != null && myresp.fk_client_group_id.length > 0){
|
||||
@ -51,9 +48,6 @@ export class Client {
|
||||
'<div class="editable" data-table="client" data-column="adresse" data-id="' + this.id + '">' + this.adresse + '</div>',
|
||||
'<div class="selectClientGroupList" data-table="client" data-column="fk_client_group_id" data-id="' + this.id + '" data-current="' + this.clientGroupId + '">' + this.clientGroupName + '</div>',
|
||||
'<div class="selectClientGroupFacturationList" data-table="client" data-column="fk_client_group_facturation_id" data-id="' + this.id + '" data-current="' + this.clientGroupFacturationId + '">' + this.clientGroupFacturationName + '</div>',
|
||||
'<div class="editable" data-table="client" data-column="portal_code" data-id="' + this.id + '">' + this.portalCode + '</div>',
|
||||
'<div class="editable" data-table="client" data-column="alarm_code" data-id="' + this.id + '">' + this.alarmCode + '</div>',
|
||||
'<div class="editable" data-table="client" data-column="funeral_code" data-id="' + this.id + '">' + this.funeralCode + '</div>',
|
||||
'<center><div data-modifier="client" data-id=' + this.id + ' data-table="client" style="display:inline-block;margin-right:0px;" class="deleteItem icon-delete"></div></center>'
|
||||
];
|
||||
return myrow;
|
||||
|
||||
@ -14,6 +14,9 @@ export class Lieu {
|
||||
this.adresse = ((myresp.adresse == null || myresp.adresse.length === 0) ? '-' : myresp.adresse);
|
||||
this.latitude = ((myresp.latitude == null || myresp.latitude.length === 0) ? '-' : myresp.latitude);
|
||||
this.longitude = ((myresp.longitude == null || myresp.longitude.length === 0) ? '-' : myresp.longitude);
|
||||
this.portalCode = myresp.portal_code != null && myresp.portal_code.length > 0 ? myresp.portal_code : "-";
|
||||
this.alarmCode = myresp.alarm_code != null && myresp.alarm_code.length > 0 ? myresp.alarm_code : "-";
|
||||
this.funeralCode = myresp.funeral_code != null && myresp.funeral_code.length > 0 ? myresp.funeral_code : "-";
|
||||
}
|
||||
|
||||
/**undefined
|
||||
@ -26,6 +29,9 @@ export class Lieu {
|
||||
'<div class="editable" data-table="lieu" data-column="adresse" data-id="' + this.id + '" style="display:inline">' + this.adresse + '</div>',
|
||||
'<div class="editable" data-table="lieu" data-column="latitude" data-id="' + this.id + '" style="display:inline">' + this.latitude + '</div>',
|
||||
'<div class="editable" data-table="lieu" data-column="longitude" data-id="' + this.id + '" style="display:inline">' + this.longitude + '</div>',
|
||||
'<div class="editable" data-table="lieu" data-column="portal_code" data-id="' + this.id + '">' + this.portalCode + '</div>',
|
||||
'<div class="editable" data-table="lieu" data-column="alarm_code" data-id="' + this.id + '">' + this.alarmCode + '</div>',
|
||||
'<div class="editable" data-table="lieu" data-column="funeral_code" data-id="' + this.id + '">' + this.funeralCode + '</div>',
|
||||
'<div data-modifier="lieu" data-id=' + this.id + ' data-table="lieu" style="display:inline-block;margin-right:0px;" class="deleteItem icon-delete"></div>'
|
||||
];
|
||||
return myrow;
|
||||
|
||||
@ -34,9 +34,6 @@
|
||||
<th><?php p($l->t('Address'));?></th>
|
||||
<th><?php p($l->t('Groupes tarifaires'));?></th>
|
||||
<th><?php p($l->t('Groupes facturations'));?></th>
|
||||
<th><?php p($l->t('Code portail'));?></th>
|
||||
<th><?php p($l->t('Code alarme'));?></th>
|
||||
<th><?php p($l->t('Code funéraire'));?></th>
|
||||
<th><?php p($l->t('Actions'));?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@ -21,6 +21,9 @@
|
||||
<th>Adresse</th>
|
||||
<th>Latitude</th>
|
||||
<th>Longitude</th>
|
||||
<th><?php p($l->t('Code portail'));?></th>
|
||||
<th><?php p($l->t('Code alarme'));?></th>
|
||||
<th><?php p($l->t('Code funéraire'));?></th>
|
||||
<th><?php p($l->t('Actions'));?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user