Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
4f582609
Commit
4f582609
authored
10 years ago
by
Marcos García de La Fuente
Browse files
Options
Downloads
Patches
Plain Diff
Added formConfirm and doAction for supplier invoice card
parent
ecd99608
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+2
-0
2 additions, 0 deletions
ChangeLog
htdocs/fourn/facture/fiche.php
+18
-5
18 additions, 5 deletions
htdocs/fourn/facture/fiche.php
with
20 additions
and
5 deletions
ChangeLog
+
2
−
0
View file @
4f582609
...
@@ -56,6 +56,8 @@ For developers:
...
@@ -56,6 +56,8 @@ For developers:
- LINEBILL_DELETE, LINK_DELETE, ORDER_SUPPLIER_DELETE, RESOURCE_DELETE trigger called before SQL delete
- LINEBILL_DELETE, LINK_DELETE, ORDER_SUPPLIER_DELETE, RESOURCE_DELETE trigger called before SQL delete
- New: [ Task #1481 ] Add trigger BILL_SUPPLIER_UPDATE.
- New: [ Task #1481 ] Add trigger BILL_SUPPLIER_UPDATE.
- New: [ Task #1495 ] Add trigger LINECONTRACT_CREATE.
- New: [ Task #1495 ] Add trigger LINECONTRACT_CREATE.
- New: Added hook "formConfirm" and "doActions" for supplier invoice card
- New: Added hook "doActions" for supplier order card
WARNING: Following change may create regression for some external modules, but was necessary to make
WARNING: Following change may create regression for some external modules, but was necessary to make
Dolibarr better:
Dolibarr better:
...
...
This diff is collapsed.
Click to expand it.
htdocs/fourn/facture/fiche.php
+
18
−
5
View file @
4f582609
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -85,6 +86,9 @@ $permissionnote=$user->rights->fournisseur->facture->creer; // Used by the inclu
...
@@ -85,6 +86,9 @@ $permissionnote=$user->rights->fournisseur->facture->creer; // Used by the inclu
* Actions
* Actions
*/
*/
$parameters
=
array
(
'socid'
=>
$socid
);
$reshook
=
$hookmanager
->
executeHooks
(
'doActions'
,
$parameters
,
$object
,
$action
);
// Note that $action and $object may have been modified by some hooks
include
DOL_DOCUMENT_ROOT
.
'/core/actions_setnotes.inc.php'
;
// Must be include, not includ_once
include
DOL_DOCUMENT_ROOT
.
'/core/actions_setnotes.inc.php'
;
// Must be include, not includ_once
// Action clone object
// Action clone object
...
@@ -1476,7 +1480,7 @@ else
...
@@ -1476,7 +1480,7 @@ else
// Confirmation de la suppression d'une ligne produit
// Confirmation de la suppression d'une ligne produit
if
(
$action
==
'confirm_delete_line'
)
if
(
$action
==
'confirm_delete_line'
)
{
{
print
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
.
'&lineid='
.
$_GET
[
"lineid"
],
$langs
->
trans
(
'DeleteProductLine'
),
$langs
->
trans
(
'ConfirmDeleteProductLine'
),
'confirm_delete_line'
,
''
,
1
,
1
);
$formconfirm
=
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
.
'&lineid='
.
$_GET
[
"lineid"
],
$langs
->
trans
(
'DeleteProductLine'
),
$langs
->
trans
(
'ConfirmDeleteProductLine'
),
'confirm_delete_line'
,
''
,
1
,
1
);
}
}
// Clone confirmation
// Clone confirmation
...
@@ -1488,7 +1492,7 @@ else
...
@@ -1488,7 +1492,7 @@ else
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
);
);
// Paiement incomplet. On demande si motif = escompte ou autre
// Paiement incomplet. On demande si motif = escompte ou autre
print
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
,
$langs
->
trans
(
'CloneInvoice'
),
$langs
->
trans
(
'ConfirmCloneInvoice'
,
$object
->
ref
),
'confirm_clone'
,
$formquestion
,
'yes'
,
1
);
$formconfirm
=
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
,
$langs
->
trans
(
'CloneInvoice'
),
$langs
->
trans
(
'ConfirmCloneInvoice'
,
$object
->
ref
),
'confirm_clone'
,
$formquestion
,
'yes'
,
1
);
}
}
// Confirmation de la validation
// Confirmation de la validation
...
@@ -1544,24 +1548,33 @@ else
...
@@ -1544,24 +1548,33 @@ else
array
(
'type'
=>
'other'
,
'name'
=>
'idwarehouse'
,
'label'
=>
$langs
->
trans
(
"SelectWarehouseForStockIncrease"
),
'value'
=>
$formproduct
->
selectWarehouses
(
GETPOST
(
'idwarehouse'
),
'idwarehouse'
,
''
,
1
)));
array
(
'type'
=>
'other'
,
'name'
=>
'idwarehouse'
,
'label'
=>
$langs
->
trans
(
"SelectWarehouseForStockIncrease"
),
'value'
=>
$formproduct
->
selectWarehouses
(
GETPOST
(
'idwarehouse'
),
'idwarehouse'
,
''
,
1
)));
}
}
print
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
,
$langs
->
trans
(
'ValidateBill'
),
$text
,
'confirm_valid'
,
$formquestion
,
1
,
1
,
240
);
$formconfirm
=
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
,
$langs
->
trans
(
'ValidateBill'
),
$text
,
'confirm_valid'
,
$formquestion
,
1
,
1
,
240
);
}
}
// Confirmation set paid
// Confirmation set paid
if
(
$action
==
'paid'
)
if
(
$action
==
'paid'
)
{
{
print
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
,
$langs
->
trans
(
'ClassifyPaid'
),
$langs
->
trans
(
'ConfirmClassifyPaidBill'
,
$object
->
ref
),
'confirm_paid'
,
''
,
0
,
1
);
$formconfirm
=
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
,
$langs
->
trans
(
'ClassifyPaid'
),
$langs
->
trans
(
'ConfirmClassifyPaidBill'
,
$object
->
ref
),
'confirm_paid'
,
''
,
0
,
1
);
}
}
// Confirmation de la suppression de la facture fournisseur
// Confirmation de la suppression de la facture fournisseur
if
(
$action
==
'delete'
)
if
(
$action
==
'delete'
)
{
{
print
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
,
$langs
->
trans
(
'DeleteBill'
),
$langs
->
trans
(
'ConfirmDeleteBill'
),
'confirm_delete'
,
''
,
0
,
1
);
$formconfirm
=
$form
->
formconfirm
(
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$object
->
id
,
$langs
->
trans
(
'DeleteBill'
),
$langs
->
trans
(
'ConfirmDeleteBill'
),
'confirm_delete'
,
''
,
0
,
1
);
}
}
if
(
!
$formconfirm
)
{
$parameters
=
array
(
'lineid'
=>
$lineid
);
$formconfirm
=
$hookmanager
->
executeHooks
(
'formConfirm'
,
$parameters
,
$object
,
$action
);
// Note that $action and $object may have been modified by hook
}
// Print form confirm
print
$formconfirm
;
/**
/**
* Invoice
* Invoice
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment