diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 4de2be6fcbb..059e1eb57b1 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Florian Henry - * Copyright (C) 2016-2019 Alexandre Spangaro + * Copyright (C) 2016-2020 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -31,6 +31,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; +require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; @@ -244,7 +245,7 @@ if ($action != 'export_csv') print ''; print ''; - print ''; print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("OpeningBalance", $_SERVER['PHP_SELF'], "", $param, "", 'class="right"', $sortfield, $sortorder); print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'class="right"', $sortfield, $sortorder); @@ -274,6 +274,8 @@ if ($action != 'export_csv') $sous_total_credit = 0; $displayed_account = ""; + $accountingaccountstatic = new AccountingAccount($db); + $sql = "select t.numero_compte, (SUM(t.debit) - SUM(t.credit)) as opening_balance from ".MAIN_DB_PREFIX."accounting_bookkeeping as t where entity in ".$conf->entity; $sql .= " AND t.doc_date < '".$db->idate($search_date_start)."' GROUP BY t.numero_compte"; $resql = $db->query($sql); @@ -286,12 +288,18 @@ if ($action != 'export_csv') foreach ($object->lines as $line) { + $accountingaccountstatic->fetch(null, $line->numero_compte, true); + if (!empty($accountingaccountstatic->account_number)) { + $accounting_account = $accountingaccountstatic->getNomUrl(0, 1, 1, '', 1); + } else { + $accounting_account = length_accountg($line->numero_compte); + } + $link = ''; $total_debit += $line->debit; $total_credit += $line->credit; - $description = $object->get_compte_desc($line->numero_compte); // Search description of the account $root_account_description = $object->get_compte_racine($line->numero_compte); - if (empty($description)) { + if (empty($accountingaccountstatic->account_number)) { $link = ''.img_edit_add().''; } print ''; @@ -303,7 +311,7 @@ if ($action != 'export_csv') // Show subtotal per accounting account if ($displayed_account != "") { print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -313,7 +321,7 @@ if ($action != 'export_csv') // Show first line of a break print ''; - print ''; + print ''; print ''; $displayed_account = $root_account_description; @@ -321,10 +329,9 @@ if ($action != 'export_csv') $sous_total_credit = 0; } } - // $object->get_compte_racine($line->numero_compte); - print ''; - print ''; + // $object->get_compte_racine($line->numero_compte); + print ''; print ''; print ''; print ''; @@ -340,12 +347,12 @@ if ($action != 'export_csv') if (!empty($show_subgroup)) { - print ''; + print ''; print "\n"; print ''; } - print ''; + print ''; print "\n"; print ''; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 43442fa0ca5..7cb30a74bc6 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -448,9 +448,10 @@ class AccountingAccount extends CommonObject * @param int $notooltip 1=Disable tooltip * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @param int $withcompletelabel 0=Short label (field short label), 1=Complete label (field label) + * @param int $option 'bookkeeping', 'bookkeepinglistbyaccount', 'accountcard' * @return string String with URL */ - public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0) + public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0, $option = '') { global $langs, $conf, $user; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -459,7 +460,13 @@ class AccountingAccount extends CommonObject $result = ''; - $url = DOL_URL_ROOT.'/accountancy/admin/card.php?id='.$this->id; + if (empty($option)) { + $url = DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?search_accountancy_code_start=' . $this->account_number . '&search_accountancy_code_end=' . $this->account_number; + } elseif ($option == 'bookkeepinglistbyaccount') { + $url = DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start=' . $this->account_number . '&search_accountancy_code_end=' . $this->account_number; + } elseif ($option == 'accountcard') { + $url = DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . $this->id; + } // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 3121aeffb17..a313f47cc13 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -7,6 +7,7 @@ * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2016 Marcos García * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2020 Tobias Sekan * * 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 @@ -32,12 +33,9 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -if (!empty($conf->commande->enabled)) - require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->commande->enabled)) - require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; -if (!empty($conf->tax->enabled)) - require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; +require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; // L'espace compta/treso doit toujours etre actif car c'est un espace partage // par de nombreux modules (banque, facture, commande a facturer, etc...) independamment @@ -148,7 +146,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE s.rowid = f.fk_soc AND f.fk_statut = 0"; + $sql .= " WHERE s.rowid = f.fk_soc AND f.fk_statut = ".Facture::STATUS_DRAFT; $sql .= " AND f.entity IN (".getEntity('invoice').")"; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; @@ -175,10 +173,18 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { $num = $db->num_rows($resql); - print '
'; + print '
'; print '
'; + print ''; print $langs->trans('From'); print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, ''); print ' '; @@ -260,7 +261,6 @@ if ($action != 'export_csv') print '
'.$langs->trans("SubTotal").':'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_credit - $sous_total_debit)).'
'.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').''.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'
'.length_accountg($line->numero_compte).''.$description.''.$accounting_account.''.price($opening_balances["'".$line->numero_compte."'"]).''.price($line->debit).''.price($line->credit).'
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_debit - $sous_total_credit)).'
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_debit - $sous_total_credit)).'
'.$langs->trans("AccountBalance").':'.price($total_debit).''.price($total_credit).''.price(price2num($total_debit - $total_credit)).'
'.$langs->trans("AccountBalance").':'.price($total_debit).''.price($total_credit).''.price(price2num($total_debit - $total_credit)).'
'; + print ''; - print ''; + print ''; + print ''; + if ($num) { $companystatic = new Societe($db); @@ -244,7 +250,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $sql .= ", cc.rowid as country_id, cc.code as country_code"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f, ".MAIN_DB_PREFIX."societe as s LEFT JOIN ".MAIN_DB_PREFIX."c_country as cc ON cc.rowid = s.fk_pays"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE s.rowid = f.fk_soc AND f.fk_statut = 0"; + $sql .= " WHERE s.rowid = f.fk_soc AND f.fk_statut = ".FactureFournisseur::STATUS_DRAFT; $sql .= " AND f.entity IN (".getEntity('invoice').')'; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND f.fk_soc = ".$socid; @@ -258,10 +264,18 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU { $num = $db->num_rows($resql); - print '
'; + print '
'; print '
'.$langs->trans("CustomersDraftInvoices").($num ? ''.$num.'' : '').'
'; + print $langs->trans("CustomersDraftInvoices").' '; + print ''; + print ''.$num.''; + print ''; + print '
'; + print ''; - print ''; + print ''; + print ''; + if ($num) { $companystatic = new Societe($db); @@ -709,7 +723,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user $sql .= " AND c.entity = ".$conf->entity; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND c.fk_soc = ".$socid; - $sql .= " AND c.fk_statut = 3"; + $sql .= " AND c.fk_statut = ".Commande::STATUS_CLOSED; $sql .= " AND c.facture = 0"; // Add where from hooks $parameters = array(); @@ -729,8 +743,15 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user print '
'; print '
'.$langs->trans("SuppliersDraftInvoices").($num ? ''.$num.'' : '').'
'; + print $langs->trans("SuppliersDraftInvoices").' '; + print ''; + print ''.$num.''; + print ''; + print '
'; + print ""; - print ''; + print ''; + if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; @@ -822,7 +843,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) $sql .= " FROM ".MAIN_DB_PREFIX."societe as s LEFT JOIN ".MAIN_DB_PREFIX."c_country as cc ON cc.rowid = s.fk_pays,".MAIN_DB_PREFIX."facture as f"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE s.rowid = f.fk_soc AND f.paye = 0 AND f.fk_statut = 1"; + $sql .= " WHERE s.rowid = f.fk_soc AND f.paye = 0 AND f.fk_statut = ".Facture::STATUS_VALIDATED; $sql .= " AND f.entity IN (".getEntity('invoice').')'; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND f.fk_soc = ".$socid; @@ -843,7 +864,15 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) print '
'; print '
'.$langs->trans("OrdersDeliveredToBill").' '.$num.''; + print $langs->trans("OrdersDeliveredToBill").' '; + print ''; + print ''.$num.''; + print ''; + print ''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("ToBill").'
'; - print ''; + + print ''; + print ''; + print ''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; @@ -954,7 +983,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $sql .= " WHERE s.rowid = ff.fk_soc"; $sql .= " AND ff.entity = ".$conf->entity; $sql .= " AND ff.paye = 0"; - $sql .= " AND ff.fk_statut = 1"; + $sql .= " AND ff.fk_statut = ".FactureFournisseur::STATUS_VALIDATED; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND ff.fk_soc = ".$socid; // Add where from hooks @@ -973,7 +1002,17 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU print '
'; print '
'.$langs->trans("BillsCustomersUnpaid", $num).' '.$num.'
'; + print $langs->trans("BillsCustomersUnpaid", $num).' '; + print ''; + print ''.$num.''; + print ''; + print ''.$langs->trans("DateDue").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").'
'; - print ''; + + print ''; + print ''; + print ''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a913a878251..3daaf572ca6 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7992,8 +7992,8 @@ class Form $formmail = new FormMail($db); $result = $formmail->fetchAllEMailTemplate($modelType, $user, $langs); + if ($default) $TModels[0] = $langs->trans('DefaultMailModel'); if ($result > 0) { - if ($default) $TModels[0] = $langs->trans('DefaultMailModel'); foreach ($formmail->lines_model as $model){ $TModels[$model->id] = $model->label; } diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 31b16b7fb65..65e44b86efc 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -122,7 +122,7 @@ class FormFile $out .= ''; } - $out .= '
'.$langs->trans("BillsSuppliersUnpaid", $num).' '.$num.'
'; + print $langs->trans("BillsSuppliersUnpaid", $num).' '; + print ''; + // TODO: "impayees.php" looks very outdatetd and should be set to deprecated or directly remove in the next version + // + print ''.$num.''; + print ''; + print ''.$langs->trans("DateDue").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").'
'; + $out .= '
'; $out .= ''; if (!empty($options)) $out .= ''; diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index fc43d5e8ce3..f144fe38a75 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -1,8 +1,9 @@ - * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2019 Nicolas ZABOURI +/* Copyright (C) 2003-2006 Rodolphe Quiedeville + * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2020 Tobias Sekan * * 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 @@ -19,9 +20,9 @@ */ /** - * \file htdocs/product/stock/index.php - * \ingroup stock - * \brief Home page of stock area + * \file htdocs/product/stock/index.php + * \ingroup stock + * \brief Home page of stock area */ require '../../main.inc.php'; @@ -60,22 +61,22 @@ print '
'; if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo { - print '
'; - print ''; - print '
'; - print '
'.$options.'
'; - print ""; - print ''; - print ''; - print "
'.$langs->trans("Search").'
'; - print $langs->trans("Warehouse").':

"; + print '
'; + print ''; + print '
'; + print ''; + print ""; + print ''; + print ''; + print "
'.$langs->trans("Search").'
'; + print $langs->trans("Warehouse").':

"; } $max = 15; $sql = "SELECT e.rowid, e.ref as label, e.lieu, e.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e"; -$sql .= " WHERE e.statut in (0,1)"; +$sql .= " WHERE e.statut in (".Entrepot::STATUS_CLOSED.",".Entrepot::STATUS_OPEN_ALL.")"; $sql .= " AND e.entity IN (".getEntity('stock').")"; $sql .= $db->order('e.statut', 'DESC'); $sql .= $db->plimit($max + 1, 0); @@ -84,45 +85,55 @@ $result = $db->query($sql); if ($result) { - $num = $db->num_rows($result); + $num = $db->num_rows($result); - $i = 0; + print '
'; + print ''; + print ''; + print ''; + print ''; - print '
'; - print '
'; + print $langs->trans("Warehouses").' '; + print ''; + // TODO: "search_status" on "/product/stock/list.php" currently only accept a single integer value + //print ''; + print ''.$num.''; + print ''; + print '
'; - print ''; + $i = 0; + if ($num) + { + while ($i < min($max, $num)) + { + $objp = $db->fetch_object($result); - if ($num) - { - while ($i < min($max, $num)) - { - $objp = $db->fetch_object($result); + $warehouse->id = $objp->rowid; + $warehouse->statut = $objp->status; + $warehouse->label = $objp->label; + $warehouse->lieu = $objp->lieu; - $warehouse->id = $objp->rowid; - $warehouse->statut = $objp->status; - $warehouse->label = $objp->label; - $warehouse->lieu = $objp->lieu; + print ''; + print ''."\n"; + print ''; + print "\n"; + $i++; + } + $db->free($result); + } else { + print ''; + } + if ($num > $max) { + print ''; + } - print ''; - print ''."\n"; - print ''; - print "\n"; - $i++; - } - $db->free($result); - } - if ($num > $max) { - print ''; - } - - print "
'.$langs->trans("Warehouses").'
'; + print $warehouse->getNomUrl(1); + print ''; + print $warehouse->getLibStatut(5); + print '
'.$langs->trans("None").'
'.$langs->trans("More").'...
'; - print $warehouse->getNomUrl(1); - print ''; - print $warehouse->getLibStatut(5); - print '
'.$langs->trans("More").'...
"; - print '
'; + print ""; + print ''; } else { - dol_print_error($db); + dol_print_error($db); } @@ -141,7 +152,7 @@ $sql .= ", ".MAIN_DB_PREFIX."product as p"; $sql .= " WHERE m.fk_product = p.rowid"; $sql .= " AND m.fk_entrepot = e.rowid"; $sql .= " AND e.entity IN (".getEntity('stock').")"; -if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql .= " AND p.fk_product_type = 0"; +if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql .= " AND p.fk_product_type = ".Product::TYPE_PRODUCT; $sql .= $db->order("datem", "DESC"); $sql .= $db->plimit($max, 0); @@ -151,7 +162,7 @@ if ($resql) { $num = $db->num_rows($resql); - print '
'; + print '
'; print ''; print ""; print ''; @@ -206,7 +217,7 @@ if ($resql) $db->free($resql); print "
'.$langs->trans("LastMovements", min($num, $max)).'
"; - print '
'; + print '
'; } else { dol_print_error($db); } diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index 50c0dedaced..4c25e32c9da 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -165,18 +165,12 @@ class ProductCombination /** * for auto retrocompatibility with last behavior */ - $productCombinationLevel = new ProductCombinationLevel($this->db); - $productCombinationLevel->fk_price_level = intval($fk_price_level); - $productCombinationLevel->fk_product_attribute_combination = $this->id; - $productCombinationLevel->variation_price = $this->variation_price; - $productCombinationLevel->variation_price_percentage = $this->variation_price_percentage; - if ($fk_price_level>0){ - $combination_price_levels[$fk_price_level] = $productCombinationLevel; + $combination_price_levels[$fk_price_level] = ProductCombinationLevel::createFromParent($this->db, $this, $fk_price_level); } else { for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++){ - $combination_price_levels[$i] = $productCombinationLevel; + $combination_price_levels[$i] = ProductCombinationLevel::createFromParent($this->db, $this, $i); } } } @@ -1211,4 +1205,24 @@ class ProductCombinationLevel return $res ? 1 : -1; } + + + /** + * Create new Product Combination Price level from Parent + * + * @param DoliDB $db Database handler + * @param ProductCombination $productCombination Product combination + * @param int $fkPriceLevel Price level + * @return ProductCombinationLevel + */ + public static function createFromParent(DoliDB $db, ProductCombination $productCombination, $fkPriceLevel) + { + $productCombinationLevel = new self($db); + $productCombinationLevel->fk_price_level = $fkPriceLevel; + $productCombinationLevel->fk_product_attribute_combination = $productCombination->id; + $productCombinationLevel->variation_price = $productCombination->variation_price; + $productCombinationLevel->variation_price_percentage = $productCombination->variation_price_percentage; + + return $productCombinationLevel; + } }