mirror of https://github.com/itflow-org/itflow
Fix Guest URL Key Generation on copied Quotes
This commit is contained in:
parent
2cbaef82f3
commit
835f3fbe52
5
post.php
5
post.php
|
|
@ -1884,7 +1884,10 @@ if(isset($_POST['add_quote_copy'])){
|
|||
$client_id = $row['client_id'];
|
||||
$category_id = $row['category_id'];
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO quotes SET quote_prefix = '$config_quote_prefix', quote_number = $quote_number, quote_scope = '$quote_scope', quote_date = '$date', category_id = $category_id, quote_status = 'Draft', quote_amount = '$quote_amount', quote_currency_code = '$quote_currency_code', quote_note = '$quote_note', quote_created_at = NOW(), client_id = $client_id, company_id = $session_company_id");
|
||||
//Generate a unique URL key for clients to access
|
||||
$quote_url_key = keygen();
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO quotes SET quote_prefix = '$config_quote_prefix', quote_number = $quote_number, quote_scope = '$quote_scope', quote_date = '$date', category_id = $category_id, quote_status = 'Draft', quote_amount = '$quote_amount', quote_currency_code = '$quote_currency_code', quote_note = '$quote_note', quote_url_key = '$quote_url_key', quote_created_at = NOW(), client_id = $client_id, company_id = $session_company_id");
|
||||
|
||||
$new_quote_id = mysqli_insert_id($mysqli);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue