Revision 2e2873a4
Von Werner Hahn vor etwa 1 Jahr hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
48 | 48 |
|
49 | 49 |
use SL::DB::BankTransactionAccTrans; |
50 | 50 |
use SL::DB::Default; |
51 |
use SL::DB::Chart; |
|
51 | 52 |
use SL::DB::Customer; |
52 | 53 |
use SL::DB::Department; |
53 | 54 |
use SL::DB::Invoice; |
... | ... | |
262 | 263 |
|
263 | 264 |
$form->{paidaccounts} = 1 unless (exists $form->{paidaccounts}); |
264 | 265 |
|
266 |
foreach my $ref (@{ $form->{AR_links}{AR} } ) { |
|
267 |
if ( $ref->{chart_id} == $::instance_conf->get_ar_chart_id ) { |
|
268 |
$form->{AR_1} = "$ref->{accno}--$ref->{description}"; |
|
269 |
} |
|
270 |
} |
|
265 | 271 |
$form->{AR} = $form->{AR_1} unless $form->{id}; |
272 |
my ($chart_accno) = split /--/, $form->{AR}; |
|
273 |
$form->{AR_chart_id} = $form->{id} ? SL::DB::Manager::Chart->find_by( accno => $chart_accno)->id : $::instance_conf->get_ar_chart_id ; |
|
266 | 274 |
|
267 | 275 |
$form->{locked} = ($form->datetonum($form->{invdate}, \%myconfig) |
268 | 276 |
<= $form->datetonum($form->{closedto}, \%myconfig)); |
... | ... | |
694 | 702 |
), @custom_hiddens, |
695 | 703 |
map { $_.'_rate', $_.'_description', $_.'_taxnumber', $_.'_tax_id' } split / /, $form->{taxaccounts}]; |
696 | 704 |
|
697 |
$::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.Draft kivi.File kivi.SalesPurchase kivi.Part kivi.CustomerVendor kivi.Validator ckeditor/ckeditor ckeditor/adapters/jquery kivi.io client_js)); |
|
705 |
$::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.Draft kivi.File kivi.SalesPurchase kivi.Part kivi.CustomerVendor kivi.Validator ckeditor/ckeditor ckeditor/adapters/jquery kivi.io client_js autocomplete_chart));
|
|
698 | 706 |
|
699 | 707 |
$TMPL_VAR{payment_terms_obj} = get_payment_terms_for_invoice(); |
700 | 708 |
$form->{duedate} = $TMPL_VAR{payment_terms_obj}->calc_date(reference_date => $form->{invdate}, due_date => $form->{duedate})->to_kivitendo if $TMPL_VAR{payment_terms_obj}; |
... | ... | |
1046 | 1054 |
} |
1047 | 1055 |
} |
1048 | 1056 |
|
1049 |
($form->{AR}) = split /--/, $form->{AR}; |
|
1057 |
#($form->{AR}) = split /--/, $form->{AR}; |
|
1058 |
$form->{AR} = SL::DB::Manager::Chart->find_by( id => $form->{AR_chart_id} )->accno; |
|
1050 | 1059 |
($form->{AR_paid}) = split /--/, $form->{AR_paid}; |
1051 | 1060 |
relink_accounts(); |
1052 | 1061 |
if ( IS->post_payment(\%myconfig, \%$form) ) { |
... | ... | |
1146 | 1155 |
} |
1147 | 1156 |
} |
1148 | 1157 |
|
1149 |
($form->{AR}) = split /--/, $form->{AR}; |
|
1158 |
#($form->{AR}) = split /--/, $form->{AR}; |
|
1159 |
$form->{AR} = SL::DB::Manager::Chart->find_by( id => $form->{AR_chart_id} )->accno; |
|
1150 | 1160 |
($form->{AR_paid}) = split /--/, $form->{AR_paid}; |
1151 | 1161 |
$form->{storno} ||= 0; |
1152 | 1162 |
|
Auch abrufbar als: Unified diff
FIX: 'Buchen auf' in EK/VK Rechnungen richtig vorbelegen
Behebt #363