当前位置: 首页>>代码示例>>PHP>>正文


PHP dollar函数代码示例

本文整理汇总了PHP中dollar函数的典型用法代码示例。如果您正苦于以下问题:PHP dollar函数的具体用法?PHP dollar怎么用?PHP dollar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dollar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: htmlspecialchars

            <label for="subscription_<?php 
        echo $subscription['subscription_id'];
        ?>
">
                <input type="checkbox" name="subscription[subscriptions][<?php 
        echo $subscription['subscription_id'];
        ?>
]" value="1" id="subscription_<?php 
        echo $subscription['subscription_id'];
        ?>
">
            <?php 
        echo htmlspecialchars($subscription['name']);
        ?>
 - <?php 
        echo dollar($subscription['amount']);
        if (!$subscription['days'] && !$subscription['months'] && !$subscription['years']) {
            //echo _l('Once off');
        } else {
            $bits = array();
            if ($subscription['days'] > 0) {
                $bits[] = _l('%s days', $subscription['days']);
            }
            if ($subscription['months'] > 0) {
                $bits[] = _l('%s months', $subscription['months']);
            }
            if ($subscription['years'] > 0) {
                $bits[] = _l('%s years', $subscription['years']);
            }
            echo ' ';
            echo _l('Every %s', implode(', ', $bits));
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:customer_signup_form.php

示例2: dollar

        }
        ?>

                                    </td>
                                    <td>
                                        <span class="currency">
                                        <?php 
        /* echo $invoice_payment_data['amount']>0 ? dollar($invoice_payment_data['amount'],true,$invoice['currency_id']) : dollar($invoice_payment_data['hours']*$invoice['hourly_rate'],true,$invoice['currency_id']); */
        ?>

                                        <?php 
        echo dollar($invoice_payment_data['amount'], true, $invoice_payment_data['currency_id']);
        // is there a fee?
        if ($invoice_payment_data['fee_total'] != 0) {
            echo ' ';
            _e('(includes %s %s)', dollar($invoice_payment_data['fee_total'], true, $invoice_payment_data['currency_id']), htmlspecialchars($invoice_payment_data['fee_description']));
        }
        ?>

                                        </span>
                                    </td>
                                    <td>
                                        <?php 
        if (isset($invoice_payment_data['data']) && $invoice_payment_data['data']) {
            $details = @unserialize($invoice_payment_data['data']);
            if ($details && isset($details['custom_notes'])) {
                echo htmlspecialchars($details['custom_notes']) . '<br>';
            }
            if ($details && isset($details['log'])) {
                ?>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:30,代码来源:invoice_admin_edit.php

示例3: dollar

    </td>
    <td>
        <?php 
echo $total['hours_billed'];
?>

    </td>
    <td>
        <?php 
echo dollar($total['amount_billed']);
?>

    </td>
    <td>
        <?php 
echo dollar($total['amount_invoiced']);
?>

    </td>
</tr>
</tfoot>
</table>

<ul>
    <li>Staff Members: users who have the "Job Tasks" - "edit" permission</li>
    <li>Assigned Jobs: number of jobs where job "Create Date" is within range and staff members is assigned to overall job</li>
    <li>Assigned Tasks: number of individual job tasks where job "Create Date" is within range and staff members is assigned to individual job task</li>
    <li>Tasks Completed: number of tasks that were assigned to this staff member and have a "done date" within specified range</li>
    <li>Hours Logged: how many hours were logged against all tasks (complete or not) within date range. Staff can log more (or less) hours than task was quoted.</li>
    <li>Hours Billed: how many hours were logged against all completed tasks.</li>
    <li>Amount Billed: value of the "hours billed" </li>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:statistic_staff.php

示例4: dollar

                        continue;
                    }
                    echo module_invoice::link_open($invoice['invoice_id'], true);
                    echo " ";
                    echo '<span class="';
                    if ($invoice['total_amount_due'] > 0) {
                        echo 'error_text';
                    } else {
                        echo 'success_text';
                    }
                    echo '">';
                    if ($invoice['total_amount_due'] > 0) {
                        echo dollar($invoice['total_amount_due'], true, $invoice['currency_id']);
                        echo ' ' . _l('due');
                    } else {
                        echo _l('%s paid', dollar($invoice['total_amount'], true, $invoice['currency_id']));
                    }
                    echo '</span>';
                    echo "<br>";
                }
            }
        });
    }
}
if (class_exists('module_group', false)) {
    $columns['group'] = array('title' => 'Group', 'callback' => function ($quote) {
        $groups = module_group::get_groups_search(array('owner_table' => 'quote', 'owner_id' => $quote['quote_id']));
        $g = array();
        foreach ($groups as $group) {
            $g[] = $group['name'];
        }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:quote_admin_list.php

示例5: round

				$grand_total = round($grand_total);
			}	
			// FORM FOR PAYPAL
?>
			<body onLoad="document.order_form.submit();">
			<form action="https://www.paypal.com/cgi-bin/webscr" name="order_form" method="post">
			<input type="hidden" name="cmd" value="_xclick">
			<input type="hidden" name="business" value="<? echo $setting->paypal_email; ?>">
			<input type="hidden" name="item_name" value="<? echo $setting->site_title;?> Photos - <? echo $_SESSION['visitor_id'] ; ?>">
			<input type="hidden" name="item_number" value="<? echo $order_num; ?>">
			<input type="hidden" name="amount" value="<? echo $grand_total; ?>">
			<input type="hidden" name="return" value="<? echo $setting->site_url; ?>/download.php?order=<?php echo $order_num; ?>">
			<input type="hidden" name="cancel_return" value="<? echo $setting->site_url; ?>">
			<input type="hidden" name="tax" value="<? echo dollar($tax); ?>">
			<input type="hidden" name="no_shipping" value="2">
			<input type="hidden" name="shipping" value="<?php echo dollar($shipping); ?>">	
			<input type="hidden" name="no_note" value="1">		
			<input type="hidden" name="notify_url" value="<? echo $setting->site_url; ?>/paypal_ipn.php">	
			<input type="hidden" name="currency_code" value="<? echo $currency->code; ?>">
			<!--<input type="hidden" name="currency_code" value="EUR"> EUROS-->
			<!--<input type="hidden" name="lc" value="US"> NOT USED-->
			</form>
			<?PHP echo $public_paypal_redirect; ?>
<?	
		break;
		
		case "purchase3":
		//ADDED IN PS350 FOR EXTRA SECURITY
		if($setting->force_members == 1 && !$_SESSION['sub_member']){
			echo $order_error_no_login;
			exit;
开发者ID:GansukhB,项目名称:phtstr,代码行数:31,代码来源:public_actions.php

示例6: dollar

                <?php 
    if ($recurring['type'] == 'i') {
        $balance += $recurring['amount'];
        ?>
<span class="success_text">+<?php 
        echo dollar($recurring['amount'], true, $recurring['currency_id']);
        ?>
</span><?php 
    }
    ?>
            </td>
            <td>
                <?php 
    if ($recurring['type'] == 'e') {
        $balance -= $recurring['amount'];
        ?>
<span class="error_text">-<?php 
        echo dollar($recurring['amount'], true, $recurring['currency_id']);
        ?>
</span><?php 
    }
    ?>
            </td>
        </tr>
    <?php 
}
?>
  </tbody>
</table>

    <!-- end -->
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:recurring_list.php

示例7: process

 public function process()
 {
     $errors = array();
     if ($_REQUEST['_process'] == 'make_payment') {
         $this->handle_payment();
     } else {
         if (isset($_REQUEST['butt_del']) && $_REQUEST['butt_del'] && $_REQUEST['invoice_id'] && module_invoice::can_i('delete', 'Invoices')) {
             $data = self::get_invoice($_REQUEST['invoice_id']);
             if (module_form::confirm_delete('invoice_id', _l("Really delete invoice: %s", htmlspecialchars($data['name'])), self::link_open($_REQUEST['invoice_id']))) {
                 $invoice_data = self::get_invoice($_REQUEST['invoice_id'], true);
                 $this->delete_invoice($_REQUEST['invoice_id']);
                 set_message("Invoice deleted successfully");
                 if (isset($invoice_data['job_ids']) && $invoice_data['job_ids']) {
                     redirect_browser(module_job::link_open(current($invoice_data['job_ids'])));
                 } else {
                     redirect_browser(self::link_open(false));
                 }
             }
         } else {
             if ("assign_credit_to_customer" == $_REQUEST['_process']) {
                 $invoice_id = (int) $_REQUEST['invoice_id'];
                 if ($invoice_id > 0) {
                     $invoice_data = $this->get_invoice($invoice_id);
                     $credit = $invoice_data['total_amount_credit'];
                     if ($credit > 0) {
                         if ($invoice_data['customer_id']) {
                             // assign to customer.
                             module_customer::add_credit($invoice_data['customer_id'], $credit);
                             // assign this as a negative payment, and also give it to the customer account.
                             $this->add_history($invoice_id, 'Added ' . dollar($credit) . ' credit to customers account from this invoice overpayment');
                             update_insert('invoice_payment_id', 'new', 'invoice_payment', array('invoice_id' => $invoice_id, 'amount' => -$credit, 'payment_type' => _INVOICE_PAYMENT_TYPE_OVERPAYMENT_CREDIT, 'currency_id' => $invoice_data['currency_id'], 'method' => _l('Assigning Credit'), 'date_paid' => date('Y-m-d')));
                             module_cache::clear('invoice');
                         }
                     }
                     redirect_browser($this->link_open($invoice_id));
                 }
             } else {
                 if ("save_invoice" == $_REQUEST['_process']) {
                     $invoice_id = isset($_REQUEST['invoice_id']) ? (int) $_REQUEST['invoice_id'] : false;
                     // check the user has permissions to edit this page.
                     if ($invoice_id > 0) {
                         $invoice = $this->get_invoice($invoice_id);
                         if (!module_security::can_access_data('invoice', $invoice, $invoice_id)) {
                             echo 'Data access denied. Sorry.';
                             exit;
                         }
                     }
                     if (!$this->can_i('edit', 'Invoices')) {
                         // bug fix, customer making a payment displays this edit access denied.
                         if (isset($_REQUEST['butt_makepayment']) && $_REQUEST['butt_makepayment'] == 'yes') {
                             //redirect_browser(self::link_public_pay($invoice_id));
                             self::handle_payment();
                             return;
                         } else {
                             echo 'Edit access denied. Sorry.';
                             exit;
                         }
                     }
                     $data = $_POST;
                     if (isset($data['default_renew_auto']) && !isset($data['renew_auto'])) {
                         $data['renew_auto'] = 0;
                     }
                     if (isset($data['default_renew_email']) && !isset($data['renew_email'])) {
                         $data['renew_email'] = 0;
                     }
                     if (isset($data['default_overdue_email_auto']) && !isset($data['overdue_email_auto'])) {
                         $data['overdue_email_auto'] = 0;
                     }
                     if (isset($data['set_manual_company_id'])) {
                         $data['company_id'] = $data['set_manual_company_id'];
                     }
                     if (isset($data['customer_id']) && $data['customer_id'] && (!isset($data['user_id']) || !$data['user_id'])) {
                         // find the primary contact for this invoice and set that there?
                         // no - we don't! we leave it as blank so we can update the customer primary contact when needed.
                         /*
                                         $customer_data = module_customer::get_customer($data['customer_id']);
                                         if($customer_data && $customer_data['customer_id'] == $data['customer_id']){
                                             if($customer_data['primary_user_id']){
                                                 $data['user_id'] = $customer_data['primary_user_id'];
                                             }else{
                                                 $customer_contacts = module_user::get_contacts(array('customer_id'=>$data['customer_id']));
                                                 foreach($customer_contacts as $contact){
                                                     // todo - search roles or something to find the accountant.
                                                     $data['user_id'] = $contact['user_id'];
                                                     break;
                                                 }
                                             }
                                         }*/
                     }
                     // check for credit assessment.
                     if (isset($_POST['apply_credit_from_customer']) && $_POST['apply_credit_from_customer'] == 'do') {
                         $invoice_data = $this->get_invoice($invoice_id);
                         $customer_data = module_customer::get_customer($invoice_data['customer_id']);
                         if ($customer_data['credit'] > 0) {
                             $apply_credit = min($invoice_data['total_amount_due'], $customer_data['credit']);
                             //$invoice_data['discount_amount'] += $customer_data['credit'];
                             //$this->save_invoice($invoice_id,array('discount_amount'=>$invoice_data['discount_amount'],'discount_description'=>_l('Credit:')));
                             update_insert('invoice_payment_id', false, 'invoice_payment', array('invoice_id' => $invoice_id, 'payment_type' => _INVOICE_PAYMENT_TYPE_CREDIT, 'method' => _l('Credit'), 'amount' => $apply_credit, 'currency_id' => $invoice_data['currency_id'], 'other_id' => $invoice_data['customer_id'], 'date_paid' => date('Y-m-d')));
                             $this->add_history($invoice_id, _l('Applying %s customer credit to this invoice.', dollar($apply_credit)));
                             module_cache::clear('invoice');
//.........这里部分代码省略.........
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:invoice.php

示例8: external_hook

    public function external_hook($hook)
    {
        switch ($hook) {
            case 'public':
                $job_id = isset($_REQUEST['i']) ? (int) $_REQUEST['i'] : false;
                $hash = isset($_REQUEST['hash']) ? trim($_REQUEST['hash']) : false;
                if ($job_id && $hash) {
                    $correct_hash = $this->link_public($job_id, true);
                    if ($correct_hash == $hash) {
                        // all good to print a receipt for this payment.
                        $job_data = $this->get_job($job_id);
                        if ($job_data) {
                            $job_data = self::get_replace_fields($job_id, $job_data);
                            $customer_data = $job_data['customer_id'] ? module_customer::get_replace_fields($job_data['customer_id']) : array();
                            $website_data = $job_data['website_id'] ? module_website::get_replace_fields($job_data['website_id']) : array();
                            module_template::init_template('external_job', '{HEADER}<h2>Job Overview</h2>
Job Name: <strong>{JOB_NAME}</strong> <br/>
{PROJECT_TYPE} Name: <strong>{PROJECT_NAME}</strong> <br/>

<br/>
<h3>Task List: {TASK_PERCENT_COMPLETED}</h3> <br/>
{TASK_LIST}
<br/><br/>
{JOB_INVOICES}
', 'Used when displaying the external view of a job.', 'code');
                            // correct!
                            // load up the receipt template.
                            $template = module_template::get_template_by_key('external_job');
                            // generate the html for the task output
                            ob_start();
                            include module_theme::include_ucm('includes/plugin_job/pages/job_public.php');
                            $public_html = ob_get_clean();
                            $job_data['task_list'] = $public_html;
                            // do we link the job name?
                            $job_data['header'] = '';
                            if (module_security::is_logged_in() && $this->can_i('edit', 'Jobs')) {
                                $job_data['header'] = '<div style="text-align: center; padding: 0 0 10px 0; font-style: italic;">' . _l('You can send this page to your customer as a quote or progress update (this message will be hidden).') . '</div>';
                            }
                            // is this a job or a quote?
                            if ($job_data['date_quote'] != '0000-00-00' && ($job_data['date_start'] == '0000-00-00' && $job_data['date_completed'] == '0000-00-00')) {
                                $job_data['job_or_quote'] = _l('Quote');
                            } else {
                                $job_data['job_or_quote'] = _l('Job');
                            }
                            //$job_data['job_name'] = $job_data['name'];
                            $job_data['job_name'] = self::link_open($job_id, true);
                            // format some dates:
                            $job_data['date_quote'] = $job_data['date_quote'] == '0000-00-00' ? _l('N/A') : print_date($job_data['date_quote']);
                            $job_data['date_start'] = $job_data['date_start'] == '0000-00-00' ? _l('N/A') : print_date($job_data['date_start']);
                            $job_data['date_due'] = $job_data['date_due'] == '0000-00-00' ? _l('N/A') : print_date($job_data['date_due']);
                            $job_data['date_completed'] = $job_data['date_completed'] == '0000-00-00' ? _l('N/A') : print_date($job_data['date_completed']);
                            $job_data['TASK_PERCENT_COMPLETED'] = $job_data['total_percent_complete'] > 0 ? _l('(%s%% completed)', $job_data['total_percent_complete'] * 100) : '';
                            $job_data['job_invoices'] = '';
                            $invoices = module_invoice::get_invoices(array('job_id' => $job_id));
                            $job_data['project_type'] = _l(module_config::c('project_name_single', 'Website'));
                            //$website_data = $job_data['website_id'] ? module_website::get_website($job_data['website_id']) : array();
                            $job_data['project_name'] = isset($website_data['name']) && strlen($website_data['name']) ? $website_data['name'] : _l('N/A');
                            if (count($invoices)) {
                                $job_data['job_invoices'] .= '<h3>' . _l('Job Invoices:') . '</h3>';
                                $job_data['job_invoices'] .= '<ul>';
                                foreach ($invoices as $invoice) {
                                    $job_data['job_invoices'] .= '<li>';
                                    $invoice = module_invoice::get_invoice($invoice['invoice_id']);
                                    $job_data['job_invoices'] .= module_invoice::link_open($invoice['invoice_id'], true);
                                    $job_data['job_invoices'] .= "<br/>";
                                    $job_data['job_invoices'] .= _l('Total: ') . dollar($invoice['total_amount'], true, $invoice['currency_id']);
                                    $job_data['job_invoices'] .= "<br/>";
                                    $job_data['job_invoices'] .= '<span class="';
                                    if ($invoice['total_amount_due'] > 0) {
                                        $job_data['job_invoices'] .= 'error_text';
                                    } else {
                                        $job_data['job_invoices'] .= 'success_text';
                                    }
                                    $job_data['job_invoices'] .= '">';
                                    if ($invoice['total_amount_due'] > 0) {
                                        $job_data['job_invoices'] .= dollar($invoice['total_amount_due'], true, $invoice['currency_id']);
                                        $job_data['job_invoices'] .= ' ' . _l('due');
                                    } else {
                                        $job_data['job_invoices'] .= _l('All paid');
                                    }
                                    $job_data['job_invoices'] .= '</span>';
                                    $job_data['job_invoices'] .= "<br>";
                                    // view receipts:
                                    $payments = module_invoice::get_invoice_payments($invoice['invoice_id']);
                                    if (count($payments)) {
                                        $job_data['job_invoices'] .= "<ul>";
                                        foreach ($payments as $invoice_payment_id => $invoice_payment_data) {
                                            $job_data['job_invoices'] .= "<li>";
                                            $job_data['job_invoices'] .= '<a href="' . module_invoice::link_receipt($invoice_payment_data['invoice_payment_id']) . '" target="_blank">' . _l('View Receipt for payment of %s', dollar($invoice_payment_data['amount'], true, $invoice_payment_data['currency_id'])) . '</a>';
                                            $job_data['job_invoices'] .= "</li>";
                                        }
                                        $job_data['job_invoices'] .= "</ul>";
                                    }
                                    $job_data['job_invoices'] .= '</li>';
                                }
                                $job_data['job_invoices'] .= '</ul>';
                            }
                            $template->assign_values($customer_data);
                            $template->assign_values($website_data);
                            $template->assign_values($job_data);
//.........这里部分代码省略.........
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:job.php

示例9: array

    });
}
if (class_exists('module_invoice', false) && module_invoice::can_i('view', 'Invoices') && module_config::c('customer_list_show_invoices', 1)) {
    $columns['customer_invoices'] = array('title' => 'Invoices', 'callback' => function ($customer) {
        $invoices = module_invoice::get_invoices(array('customer_id' => $customer['customer_id']));
        if (count($invoices)) {
            $total_due = 0;
            $total_paid = 0;
            foreach ($invoices as $invoice) {
                $invoice = module_invoice::get_invoice($invoice['invoice_id']);
                $total_due += $invoice['total_amount_due'];
                $total_paid += $invoice['total_amount_paid'];
            }
            $old_customer_id = isset($_REQUEST['customer_id']) ? $_REQUEST['customer_id'] : false;
            $_REQUEST['customer_id'] = $customer['customer_id'];
            echo '<a href="' . module_invoice::link_open(false) . '">' . _l('%s invoice%s: %s', count($invoices), count($invoices) > 1 ? 's' : '', ($total_due > 0 ? '<span class="error_text">' . _l('%s due', dollar($total_due, true, $invoice['currency_id'])) . ' </span>' : '') . ($total_paid > 0 ? '<span class="success_text">' . _l('%s paid', dollar($total_paid, true, $invoice['currency_id'])) . ' </span>' : '')) . '</a>';
            if ($old_customer_id) {
                $_REQUEST['customer_id'] = $old_customer_id;
            } else {
                unset($_REQUEST['customer_id']);
            }
        }
    });
}
if (class_exists('module_extra', false)) {
    // do extra before "table sorting" so that it can hook in with the table sort call
    $table_manager->display_extra('customer', function ($customer) {
        module_extra::print_table_data('customer', $customer['customer_id']);
    }, 'customer_id');
    $table_manager->display_extra('user', function ($customer) {
        module_extra::print_table_data('user', $customer['primary_user_id']);
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:customer_admin_list.php

示例10: strtotime

        // skip empty ones.
    }
    if (!isset($options['credit'])) {
        // we dont want to show credit items.
        if ($recent_transaction['credit'] > 0) {
            continue;
        }
    }
    if (!isset($options['debit'])) {
        // we dont want to show credit items.
        if ($recent_transaction['debit'] > 0) {
            continue;
        }
    }
    $time = strtotime($timezone_hours . ' hours', strtotime($recent_transaction['transaction_date']));
    echo 'BEGIN:VEVENT
UID:' . md5(mt_rand(1, 100)) . '@ultimateclientmanager.com
';
    if (strlen($recent_transaction['name'])) {
        $recent_transaction['name'] = '(' . $recent_transaction['name'] . ")";
    }
    // work out the UTC time for this event, based on the timezome we have set in the configuration options
    echo 'DTSTAMP:' . date('Ymd') . 'T090000Z
DTSTART;VALUE=DATE:' . date('Ymd', $time) . '
DTEND;VALUE=DATE:' . date('Ymd', strtotime('+1 day', $time)) . '
SUMMARY:' . ($recent_transaction['credit'] > 0 ? '+' . dollar($recent_transaction['credit']) : '') . ($recent_transaction['debit'] > 0 ? '-' . dollar($recent_transaction['debit']) : '') . " " . $recent_transaction['name'] . '
DESCRIPTION:' . preg_replace('#[\\r\\n]+#', '<br>', $recent_transaction['description']) . ' <br><a href="' . $recent_transaction['url'] . '">' . _('Open Link') . '</a>
END:VEVENT
';
}
echo 'END:VCALENDAR';
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:ical_finance_transactions.php

示例11: ob_get_clean

    ?>

                    <input type="checkbox" name="finance_category_new_checked" value="new">
                    <input type="text" name="finance_category_new" value="">
                </div> &nbsp;
	<?php 
    $header_cats = ob_get_clean();
    $header_rows[] = array('sort_date' => array('data' => '<input type="text" name="transaction_date" class="date_field" value="' . print_date(time()) . '"> '), 'sort_name' => array('data' => '<input type="text" name="name" id="new_transaction_name">'), 'finance_description' => array('data' => '<input type="text" name="description">'), 'finance_customer' => array('data' => ''), 'sort_credit' => array('data' => currency('') . '<input type="text" name="credit" class="currency">', 'cell_class' => 'success_text'), 'sort_debit' => array('data' => currency('') . '<input type="text" name="debit" class="currency">', 'cell_class' => 'error_text'), 'sort_account' => array('data' => print_select_box(module_finance::get_accounts(), 'finance_account_id', '', '', true, 'name', true)), 'finance_categories' => array('data' => $header_cats), 'finance_tick' => array('data' => '<input type="submit" name="addnew" value="' . _l('Quick Add') . '" class="small_button">'));
    $table_manager->set_header_rows($header_rows);
}
$table_manager->set_rows($recent_transactions);
if (module_config::c('finance_list_show_totals', 1)) {
    $footer_rows = array();
    foreach ($finance_credit_total + $finance_debit_total as $currency_id => $foo) {
        $currency = get_single('currency', 'currency_id', $currency_id);
        $footer_rows[] = array('sort_date' => array('data' => ' ', 'cell_colspan' => 3), 'finance_customer' => array('data' => '<strong>' . _l('%s Totals:', $currency && isset($currency['code']) ? $currency['code'] : '') . '</strong>', 'cell_class' => 'text-right'), 'sort_credit' => array('data' => '<strong>' . dollar(isset($finance_credit_total[$currency_id]) ? $finance_credit_total[$currency_id] : 0, true, $currency_id) . '</strong>'), 'sort_debit' => array('data' => '<strong>' . dollar(isset($finance_debit_total[$currency_id]) ? $finance_debit_total[$currency_id] : 0, true, $currency_id) . '</strong>'), 'sort_account' => array('data' => ' ', 'cell_colspan' => 4));
    }
    $footer_rows[] = array('sort_date' => array('data' => ' ', 'cell_colspan' => 8), 'finance_tick' => array('data' => '<input type="button" name="link" value="' . _l('Link') . '" class="small_button" onclick="$(\'#link_go\').val(\'go\'); $(\'#quick_add_form\')[0].submit();">
						<input type="hidden" name="link_go" value="0" id="link_go">
                        ' . _hr('Combine transactions together. eg: an invoice payment history with corresponding bank statement transaction. Transactions need to be the same dollar amount to link successfully.'), 'cell_colspan' => 4));
    $table_manager->set_footer_rows($footer_rows);
}
$table_manager->pagination = true;
$table_manager->print_table();
?>

</form>
<?php 
if ($show_excluded_payment_info) {
    ?>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:30,代码来源:finance_list.php

示例12: dollar

     $row_replace['item_amount_or_rate'] = dollar($quote_item_data['task_hourly_rate'], true, $quote['currency_id'], $task_decimal_places_trim, $task_decimal_places);
 } else {
     $row_replace['item_amount_or_rate'] = '-';
 }
 $row_replace['item_total'] = dollar($quote_item_data['quote_item_amount'], true, $quote['currency_id']);
 // taxes per item
 if (isset($quote_item_data['taxes']) && is_array($quote_item_data['taxes']) && $quote_item_data['taxable'] && class_exists('module_finance', false)) {
     // this passes off the tax calculation to the 'finance' class, which modifies 'amount' to match the amount of tax applied here.
     $this_taxes = module_finance::sanatise_taxes($quote_item_data['taxes'], $quote_item_data['quote_item_amount']);
     $this_taxes_amounts = array();
     $this_taxes_rates = array();
     if (!count($this_taxes)) {
         $this_taxes = array('amount' => 0, 'percent' => 0);
     }
     foreach ($this_taxes as $this_tax) {
         $this_taxes_amounts[] = dollar($this_tax['amount'], true, $quote['currency_id']);
         $this_taxes_rates[] = $this_tax['percent'] . '%';
     }
     $row_replace['item_tax'] = implode(', ', $this_taxes_amounts);
     $row_replace['item_tax_rate'] = implode(', ', $this_taxes_rates);
 }
 $this_item_row_html = $item_row_html;
 $this_item_row_html = str_replace(' data-item-row="true"', '', $this_item_row_html);
 // we pass this through the template system so we can make use of things like arithmatic.
 $temp_template = new module_template();
 $temp_template->assign_values($row_replace);
 $temp_template->content = $this_item_row_html;
 $this_item_row_html = $temp_template->replace_content();
 /*foreach($row_replace as $key=>$val){
       $this_item_row_html = str_replace('{'.strtoupper($key).'}', $val, $this_item_row_html);
   }*/
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:quote_task_list.php

示例13: array

        echo module_customer::link_open($ticket['customer_id'], true);
    });
}
$columns['ticket_contact'] = array('title' => 'Contact', 'callback' => function ($ticket) {
    echo module_user::link_open($ticket['user_id'], true, array(), true);
});
if (class_exists('module_faq', false) && module_config::c('ticket_show_product_list', 1)) {
    $columns['ticket_product'] = array('title' => 'Product', 'callback' => function ($ticket) {
        if ($ticket['faq_product_id']) {
            $faq_product = module_faq::get_faq_product($ticket['faq_product_id']);
            echo $faq_product && isset($faq_product['name']) ? htmlspecialchars($faq_product['name']) : '';
        }
    });
}
if (class_exists('module_envato', false)) {
    $columns['ticket_envato'] = array('title' => _l('Envato%s', module_config::c('envato_show_ticket_earning', 0) ? ' (' . dollar($envato_count * 0.7) . ')' : ''), 'callback' => function ($ticket) {
        $items = module_envato::get_items_by_ticket($ticket['ticket_id']);
        foreach ($items as $item) {
            echo '<a href="' . $item['url'] . '">' . htmlspecialchars($item['name']) . '</a> ';
        }
    });
}
if (class_exists('module_group', false) && module_config::c('ticket_enable_groups', 1) && module_group::groups_enabled()) {
    $columns['ticket_group'] = array('title' => 'Group', 'callback' => function ($ticket) {
        // find the groups for this customer.
        $groups = module_group::get_groups_search(array('owner_table' => 'ticket', 'owner_id' => $ticket['ticket_id']));
        $g = array();
        foreach ($groups as $group) {
            $g[] = $group['name'];
        }
        echo implode(', ', $g);
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:ticket_admin_list.php

示例14: start_payment


//.........这里部分代码省略.........
                     // not really sure what to do here, just redirect to paypal as if the user is doing it for the first time.
                     $_REQUEST['payment_subscription'] = true;
                     // hacks!
                 }
                 if (isset($_REQUEST['payment_subscription']) || module_config::c('payment_method_paypal_force_subscription', 0)) {
                     // user is setting up a subscription! yes!!
                     // we create an entry in our database for this particular subscription
                     // or if one exists for this payment already then we just continue with that (ie: the user is going in again to redo it)
                     // setup a new subscription in the database for us.
                     if (isset($invoice_payment_data['invoice_payment_subscription_id']) && (int) $invoice_payment_data['invoice_payment_subscription_id'] > 0) {
                         $invoice_payment_subscription_id = $invoice_payment_data['invoice_payment_subscription_id'];
                     } else {
                         $invoice_payment_subscription_id = update_insert('invoice_payment_subscription_id', false, 'invoice_payment_subscription', array('status' => _INVOICE_SUBSCRIPTION_PENDING, 'days' => isset($is_subscription['days']) ? $is_subscription['days'] : 0, 'months' => isset($is_subscription['months']) ? $is_subscription['months'] : 0, 'years' => isset($is_subscription['years']) ? $is_subscription['years'] : 0, 'date_start' => '0000-00-00', 'date_last_pay' => '0000-00-00', 'date_next' => '0000-00-00'));
                         update_insert('invoice_payment_id', $invoice_payment_id, 'invoice_payment', array('invoice_payment_subscription_id' => $invoice_payment_subscription_id));
                     }
                     $description = _l('Recurring payment for %s every %s', $is_subscription['name'], implode(', ', $bits));
                     unset($is_subscription['name']);
                     // so reset/key cals below rosk.
                     $currency = module_config::get_currency($invoice_payment_data['currency_id']);
                     $url = 'https://www.' . (self::is_sandbox() ? 'sandbox.' : '') . 'paypal.com/cgi-bin/webscr?';
                     // if there are more than 1 recurring amounts then we convert it to days, as paypal only supports one time period.
                     if (count($is_subscription) > 1) {
                         $days = isset($is_subscription['days']) ? $is_subscription['days'] : 0;
                         if (isset($is_subscription['months'])) {
                             $days += $is_subscription['months'] * 30;
                             unset($is_subscription['months']);
                         }
                         if (isset($is_subscription['years'])) {
                             $days += $is_subscription['years'] * 365;
                             unset($is_subscription['years']);
                         }
                         $is_subscription['days'] = $days;
                     }
                     reset($is_subscription);
                     $time = key($is_subscription);
                     if ($time == 'days') {
                         $time = 'D';
                     } else {
                         if ($time == 'months') {
                             $time = 'M';
                         } else {
                             if ($time == 'years') {
                                 $time = 'Y';
                             }
                         }
                     }
                     $fields = array('cmd' => '_xclick-subscriptions', 'business' => module_config::c('payment_method_paypal_email', _ERROR_EMAIL), 'currency_code' => $currency['code'], 'item_name' => $description, 'no_shipping' => 1, 'page_style' => module_config::c('paypal_page_style', ''), 'return' => module_invoice::link_public_payment_complete($invoice_id), 'rm' => 1, 'cancel_return' => module_invoice::link_public($invoice_id), 'notify_url' => full_link(_EXTERNAL_TUNNEL . '?m=paymethod_paypal&h=ipn&method=paypal'), 'custom' => self::paypal_custom($user_id, $invoice_payment_id, $invoice_id, $invoice_payment_subscription_id), 'a3' => $payment_amount, 'p3' => current($is_subscription), 't3' => $time, 'src' => 1, 'sra' => 1, 'no_note' => 1);
                     // is there a subscription trail period
                     if (isset($subscription['settings']['trial_period']) && $subscription['settings']['trial_period'] > 0) {
                         // we have to hacck the payment_amount here.
                         // $payment_amount will be the discounted amount (eg: $5 instead of $10)
                         // so we reverse that discounted amount for the real amount.
                         $real_amount = $payment_amount - $fee_amount - (isset($subscription['settings']['trial_price_adjust']) ? $subscription['settings']['trial_price_adjust'] : 0);
                         $real_fee_total = module_invoice::calculate_fee($invoice_id, $invoice_data, $real_amount, array('percent' => $fee_percent, 'amount' => $fee_amount, 'description' => $fee_description));
                         $real_amount += $real_fee_total;
                         $fields['a3'] = $real_amount;
                         $fields['a1'] = $payment_amount;
                         // $real_amount + (isset($subscription['settings']['trial_price_adjust']) ? $subscription['settings']['trial_price_adjust'] : 0);
                         $fields['p1'] = current($is_subscription);
                         // * $subscription['settings']['trial_period'];
                         $fields['t1'] = $time;
                     }
                     //echo '<pre>'; print_r($fields);exit;
                     foreach ($fields as $key => $val) {
                         $url .= $key . '=' . urlencode($val) . '&';
                     }
                     //echo '<a href="'.$url.'">'.$url.'</a>';exit;
                     redirect_browser($url);
                 } else {
                     if (isset($_REQUEST['payment_single'])) {
                         // use is choosing to continue payment as a once off amount
                     } else {
                         // give the user an option
                         module_template::init_template('invoice_payment_subscription', '<h2>Payment for Invoice {INVOICE_NUMBER}</h2>
                     <p>Please choose from the available payment options below:</p>
                     <form action="{PAYMENT_URL}" method="post">
                     <input type="hidden" name="invoice_payment_id" value="{INVOICE_PAYMENT_ID}">
                     <input type="hidden" name="payment_method" value="{PAYMENT_METHOD}">
                     <input type="hidden" name="payment_amount" value="{PAYMENT_AMOUNT}">
                     <p><input type="submit" name="payment_single" value="Pay a Once Off amount of {PRETTY_PAYMENT_AMOUNT}"></p>
                     <p><input type="submit" name="payment_subscription" value="Setup Automatic Payments of {PRETTY_PAYMENT_AMOUNT} every {SUBSCRIPTION_PERIOD}"></p>
                     </form>
                     ', 'Used when a customer tries to pay an invoice that has a subscription option.', 'code');
                         $template = module_template::get_template_by_key('invoice_payment_subscription');
                         $template->page_title = htmlspecialchars($invoice_data['name']);
                         $template->assign_values($invoice_payment_data);
                         $template->assign_values(module_invoice::get_replace_fields($invoice_data['invoice_id'], $invoice_data));
                         $template->assign_values(array('invoice_payment_id' => $invoice_payment_id, 'payment_url' => module_invoice::link_public_pay($invoice_data['invoice_id']), 'payment_method' => 'paymethod_paypal', 'payment_amount' => $payment_amount, 'pretty_payment_amount' => dollar($payment_amount, true, $invoice_data['currency_id']), 'subscription_period' => implode(', ', $bits), 'fee_amount' => dollar($fee_amount, true, $invoice_data['currency_id']), 'fee_total' => dollar($fee_total, true, $invoice_data['currency_id']), 'fee_percent' => $fee_percent, 'fee_description' => $fee_description));
                         echo $template->render('pretty_html');
                         exit;
                     }
                 }
             }
         }
         $description = _l('Payment for Invoice %s', $invoice_data['name']);
         self::paypal_redirect($description, $payment_amount, $user_id, $invoice_payment_id, $invoice_id, $invoice_payment_data['currency_id']);
         return true;
     }
     return false;
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:paymethod_paypal.php

示例15: dollar

" value="1"></td>
													<td></td>
												</tr>
										<?php 
            }
            ?>
											<tr>
												<td align="center" bgcolor="#89A6DB"><b>&nbsp;</b></td>
												<td align="center" bgcolor="#89A6DB"><b>&nbsp;</b></td>
												<td align="Center" bgcolor="#89A6DB"><b>&nbsp;</b></td>
												<td align="Center" bgcolor="#89A6DB"><?php 
            echo $photog_d_unpaid_title;
            ?>
 <b><?php 
            echo $currency->sign;
            echo dollar($unpaid2);
            ?>
</b></td>
											  <td align="Center" bgcolor="#89A6DB"><td align="Center" bgcolor="#89A6DB"><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
											  <td align="Center" bgcolor="#89A6DB"><?php 
            echo $photog_u_upload_title;
            ?>
<br><b><?php 
            echo $photog2_rows;
            ?>
</b></td>
											</tr>
											<tr>
											<td colspan="11" align="right"><a href="javascript:mark_hide_upload();"><img src="images/hide_all.gif" border="0"></a>&nbsp;<a href="javascript:mark_paid_upload();"><img src="images/mgr_button_mark_paid_sel.gif" border="0"></a>&nbsp;<a href="javascript:delete_upload_data();"><img src="images/delete_all.gif" border="0"></a></td>
											</tr>
										</form>
开发者ID:GansukhB,项目名称:phtstr,代码行数:31,代码来源:photographers_addon.php


注:本文中的dollar函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。