+# gen: bitmask: bit 1 (value is 1 or 3) => file created
+# bit 2 (value is 2 or 3) => file from other source
+# gltype: is this used somewhere?
+# dir: is this used somewhere?
+# model: base name of the rose model
+# right: access right used for import
my %file_types = (
'sales_quotation' => { gen => 1, gltype => '', dir =>'SalesQuotation', model => 'Order', right => 'import_ar' },
'sales_order' => { gen => 1, gltype => '', dir =>'SalesOrder', model => 'Order', right => 'import_ar' },
my %file_types = (
'sales_quotation' => { gen => 1, gltype => '', dir =>'SalesQuotation', model => 'Order', right => 'import_ar' },
'sales_order' => { gen => 1, gltype => '', dir =>'SalesOrder', model => 'Order', right => 'import_ar' },
'csv_customer' => { gen => 1, gltype => '', dir =>'Reports', model => 'Customer', right => 'xx' },
'csv_vendor' => { gen => 1, gltype => '', dir =>'Reports', model => 'Vendor', right => 'xx' },
'shop_image' => { gen => 0, gltype => '', dir =>'ShopImages', model => 'Part', right => 'xx' },
'csv_customer' => { gen => 1, gltype => '', dir =>'Reports', model => 'Customer', right => 'xx' },
'csv_vendor' => { gen => 1, gltype => '', dir =>'Reports', model => 'Vendor', right => 'xx' },
'shop_image' => { gen => 0, gltype => '', dir =>'ShopImages', model => 'Part', right => 'xx' },
- die "No object type" unless $type;
- die "No file type" unless $::form->{file_type};
- die "Unkown object type" unless $file_types{$type};
+ die "No object type" unless $type;
+ die "No file type" unless $::form->{file_type};
+ die "Unknown object type" unless $file_types{$type};
my $first = shift @{$self->existing};
my ($first_id, $sfile) = split('_', $first, 2);
my $file = SL::File->get(id => $first_id );
my $first = shift @{$self->existing};
my ($first_id, $sfile) = split('_', $first, 2);
my $file = SL::File->get(id => $first_id );
- $self->js->run('kivi.File.askForRename', $first_id, $file->file_name, $sfile, join (',', @{$self->existing}), $self->is_global);
+ $self->js->run('kivi.File.askForRename', $first_id, $file->file_type, $file->file_name, $sfile, join (',', @{$self->existing}), $self->is_global);
'chkall_title' => $main::locale->text('Delete all'),
'file_title' => $main::locale->text('filename'),
'confirm_text' => $main::locale->text('delete'),
'chkall_title' => $main::locale->text('Delete all'),
'file_title' => $main::locale->text('filename'),
'confirm_text' => $main::locale->text('delete'),
'rename_title' => $main::locale->text('Rename Documents'),
'done_text' => $main::locale->text('deleted')
};
'rename_title' => $main::locale->text('Rename Documents'),
'done_text' => $main::locale->text('deleted')
};
'import_title' => $main::locale->text('Add Document from \'#1\'', $scanner_or_mailrx->{name}),
'path' => $scanner_or_mailrx->{directory},
'done_text' => $main::locale->text('unimported')
'import_title' => $main::locale->text('Add Document from \'#1\'', $scanner_or_mailrx->{name}),
'path' => $scanner_or_mailrx->{directory},
'done_text' => $main::locale->text('unimported')
'are_existing' => $self->existing ? 1 : 0,
'rename_title' => $main::locale->text('Rename Attachments'),
'can_upload' => 1,
'are_existing' => $self->existing ? 1 : 0,
'rename_title' => $main::locale->text('Rename Attachments'),
'can_upload' => 1,
'upload_title' => $main::locale->text('Upload Attachments'),
'done_text' => $main::locale->text('deleted')
};
'upload_title' => $main::locale->text('Upload Attachments'),
'done_text' => $main::locale->text('deleted')
};
'are_existing' => $self->existing ? 1 : 0,
'rename_title' => $main::locale->text('Rename Images'),
'can_upload' => 1,
'are_existing' => $self->existing ? 1 : 0,
'rename_title' => $main::locale->text('Rename Images'),
'can_upload' => 1,
'upload_title' => $main::locale->text('Upload Images'),
'done_text' => $main::locale->text('deleted')
};
'upload_title' => $main::locale->text('Upload Images'),
'done_text' => $main::locale->text('deleted')
};