return $lxdebug->leave_sub() if (load_draft_maybe());
$form->{title} = $locale->text('Add Vendor Invoice');
return $lxdebug->leave_sub() if (load_draft_maybe());
$form->{title} = $locale->text('Add Vendor Invoice');
<input type=button name=invdate id="trigger1" value=| . $locale->text('button') . qq|></td>\n|;
$button2 = qq|
<td width="13"><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value="$form->{duedate}" onBlur=\"check_right_date_format(this)\">
<input type=button name=invdate id="trigger1" value=| . $locale->text('button') . qq|></td>\n|;
$button2 = qq|
<td width="13"><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value="$form->{duedate}" onBlur=\"check_right_date_format(this)\">
$form->{invtotal} = $form->{invsubtotal};
if (($rows = $form->numtextrows($form->{notes}, 25, 8)) < 2) {
$form->{invtotal} = $form->{invsubtotal};
if (($rows = $form->numtextrows($form->{notes}, 25, 8)) < 2) {
map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno);
$form->{paidaccounts} = 1;
$form->{rowcount}--;
map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno);
$form->{paidaccounts} = 1;
$form->{rowcount}--;
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
for $i (1 .. $form->{paidaccounts}) {
if ($form->{"paid_$i"}) {
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
for $i (1 .. $form->{paidaccounts}) {
if ($form->{"paid_$i"}) {
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
$form->isblank("invdate", $locale->text('Invoice Date missing!'));
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
$form->isblank("invdate", $locale->text('Invoice Date missing!'));
if (IR->delete_invoice(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition}) {
if (IR->delete_invoice(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition}) {