61 lines
1.1 KiB
PHP
Executable File
61 lines
1.1 KiB
PHP
Executable File
<?php
|
|
|
|
|
|
|
|
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
|
|
|
|
|
|
|
require_once('modules/EcmReceipts/EcmInvoiceOut.php');
|
|
|
|
$source = new EcmReceipt();
|
|
|
|
$source->retrieve($outId);
|
|
|
|
if(isset($source->id) && $source->id != '') {
|
|
|
|
|
|
|
|
$focus->name = $source->name;
|
|
|
|
$focus->position_list = $source->getPositionList(true);
|
|
|
|
$focus->template_id = $source->template_id;
|
|
|
|
$focus->template_name = $source->template_name;
|
|
|
|
$focus->total = $source->total;
|
|
|
|
$focus->subtotal = $source->subtotal;
|
|
|
|
|
|
|
|
$focus->to_parent = $source->parent_type;
|
|
|
|
$focus->to_id = $source->parent_id;
|
|
|
|
$focus->to_name = $source->parent_name;
|
|
|
|
$focus->invoice_type_id = 'normal';
|
|
|
|
$focus->to_address = $source->parent_address_street;
|
|
|
|
$focus->to_city = $source->parent_address_city;
|
|
|
|
$focus->to_postalcode = $source->parent_address_postalcode;
|
|
|
|
$focus->to_country = $source->parent_address_country;
|
|
|
|
$focus->to_nip = $source->to_nip;
|
|
|
|
$focus->to_vatid = $source->to_vatid;
|
|
|
|
$focus->to_is_vat_free = $source->to_is_vat_free;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|