set status as draft and removed payments #94

This commit is contained in:
denisdulici
2017-11-26 19:45:49 +03:00
parent e227c1d8ff
commit 5e923024c2
4 changed files with 54 additions and 38 deletions

View File

@ -51,7 +51,7 @@ class Invoice extends Model
*
* @var array
*/
protected $cloneable_relations = ['histories', 'items', 'payments', 'totals'];
protected $cloneable_relations = ['items', 'totals'];
public function user()
{
@ -110,6 +110,7 @@ class Invoice extends Model
public function onCloning($src, $child = null)
{
$this->invoice_status_code = 'draft';
$this->invoice_number = $this->getNextInvoiceNumber();
}